API Platform

Multimodal Understanding

Use MOSS-VL to understand images or video and return text in a Responses API object. Every request must include a text instruction and media: either 1–5 images or 1 video. Images and video cannot be mixed.

POST
/v1/responses

A synchronous multimodal understanding endpoint. Pass images or video by URL or file_id; the current output is text.

Authentication

Add Authorization: Bearer <API_KEY> to the request headers. Create API keys on the API Keys page in the console.

Example
curl -X POST https://api.mosi.cn/v1/responses \
  -H "Authorization: Bearer $MOSS_API_KEY"

Supported model

FieldAllowed value
model

moss-vl-1.0

Input combinations

Scenariocontent partsQuantity
Single-image understandinginput_text + input_image1 image
Multi-image understandinginput_text + multiple input_image partsUp to 5 images
Video understandinginput_text + input_video1 video

Request fields

FieldTypeRequiredDescription
modelstringYes

The model ID. Multimodal understanding uses moss-vl-1.0; use moss-vl-1.0-2026-07-08 when you need to pin a version.

inputarrayYes

The input message array. It must currently contain exactly one message with role=user.

input[].rolestringYes

Currently fixed to user.

input[].contentarrayYes

The content array. It must include at least one non-empty input_text part and one valid set of media parts.

input[].content[].typestringYes

The content type: input_text, input_image, or input_video.

input_text.textstringYes

The image or video understanding instruction. It must be a non-empty string.

input_image.image_urlstringConditional

An image URL reachable by the service; mutually exclusive with file_id in the same content item.

input_image.file_idstringConditional

The ID of an uploaded image; mutually exclusive with image_url in the same content item. Obtain it through Upload File.

input_video.video_urlstringConditional

A video URL reachable by the service; mutually exclusive with file_id in the same content item.

input_video.file_idstringConditional

The ID of an uploaded video; mutually exclusive with video_url in the same content item. Obtain it through Upload File.

max_output_tokensintegerNo

The maximum number of output tokens, from 1 to 8192.

Request examples

curl https://api.mosi.cn/v1/responses \
  -H "Authorization: Bearer $MOSS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "moss-vl-1.0",
    "input": [
      {
        "role": "user",
        "content": [
          { "type": "input_text", "text": "Describe the main content of this image." },
          { "type": "input_image", "image_url": "https://example.com/image.jpg" }
        ]
      }
    ],
    "max_output_tokens": 1024
  }'

Media input methods

MethodFieldDescription
Publicly accessible URLimage_url / video_urlUse a public or signed URL reachable by the service; its signature must remain valid for the full request
File IDfile_idUse Upload File first, then reference its file_id in an image or video content item

Use a URL or file_id to provide media. Each media content item must contain either its URL field or file_id, never both.

Usage limits

ItemLimit
Image count1–5 per request
Video count1 per request
Mixed image and video inputNot supported
Image sizeUp to 30 MB per image
Video sizeUp to 200 MB per video

Supported image formats: PNG, JPG, JPEG, WebP, BMP, GIF, and TIFF.

Supported video formats: MP4, M4V, AVI, MOV, WebM, and MKV.

Response fields

The endpoint returns a standard Responses API object. The table below lists the core fields needed to read the current text result; generated text is available at output[].content[].text.

FieldTypeReturnedDescription
idstringYes

The Response ID, prefixed with resp_.

objectstringYes

Always response.

created_atintegerYes

The creation time as a Unix timestamp in seconds.

statusstringYes

The response status, currently completed or incomplete.

completed_atintegerYes

The terminal time as a Unix timestamp in seconds.

errorobject | nullYes

null for successful or incomplete output. Failed requests use the platform synchronous error structure.

incomplete_detailsobject | nullYes

null for complete output. When the output limit is reached, it contains reason=max_output_tokens.

modelstringYes

The model ID used for the request, currently moss-vl-1.0.

outputarrayYes

The output item list. It currently contains one assistant message.

output[].idstringYes

The message ID, prefixed with msg_.

output[].typestringYes

Always message.

output[].statusstringYes

Matches the response status: completed or incomplete.

output[].rolestringYes

Always assistant.

output[].contentarrayYes

The message content list. It currently contains one text output item.

output[].content[].typestringYes

Always output_text.

output[].content[].textstringYes

The text generated by the model.

usage.input_tokensintegerYes

The input token count.

usage.output_tokensintegerYes

The output token count.

usage.total_tokensintegerYes

The total input and output token count.

The actual response may also contain standard Responses API compatibility fields. Clients should read the fields they need and ignore unused additional fields. usage only reports usage returned by the endpoint; this page does not promise pricing, free quotas, or billing behavior.

Response example

Core response example
{
  "id": "resp_task_abc123",
  "object": "response",
  "created_at": 1710000000,
  "status": "completed",
  "completed_at": 1710000001,
  "error": null,
  "incomplete_details": null,
  "model": "moss-vl-1.0",
  "output": [
    {
      "id": "msg_task_abc123",
      "type": "message",
      "status": "completed",
      "role": "assistant",
      "content": [
        {
          "type": "output_text",
          "text": "There are four nuts in the image."
        }
      ]
    }
  ],
  "usage": {
    "input_tokens": 8743,
    "output_tokens": 94,
    "total_tokens": 8837
  }
}

Errors

The endpoint returns HTTP 400 before task creation for an invalid request structure, missing text or media, excessive media count, mixed image and video input, a media item containing both a URL and file_id, or max_output_tokens outside its allowed range.

The error body follows the platform synchronous error structure. Do not depend on unpublished media-specific error codes. Unavailable models, invalid URLs, service failures, and inference failures also follow the platform error contract.

Next steps