跳到正文
文档版本 r8
OpenAPIJSONYAML
指南 / Model inputs and media

Model inputs and media

Every model takes its own input fields, in the model's own names. Media goes in as a public URL or as a file you upload first.

Markdown 文件在 Playground 试运行文档版本 r8

One request shape

Every create sends model and input. input follows that model's inputSchema, which get a model returns and each model's reference page lists field by field. A field the schema does not list is refused with HTTP 422.

You never name a price tier: the input selects it, for example by resolution or by including a video.

Seedance

{
  "model": "seedance-2-5",
  "input": {
    "content": [{ "type": "text", "text": "A paper boat drifting on a pond" }],
    "resolution": "720p",
    "ratio": "16:9",
    "duration": 5
  }
}

Kling

{
  "model": "kling-4-0",
  "input": {
    "prompt": "A paper boat drifting on a pond",
    "settings": { "duration": 5, "resolution": "720p", "aspect_ratio": "16:9" }
  }
}

Wan

{
  "model": "wan-3-0",
  "input": {
    "prompt": "A paper boat drifting on a pond",
    "parameters": { "duration": 5, "ratio": "16:9" }
  }
}

MiniMax

{
  "model": "minimax-h3",
  "input": {
    "content": [{ "type": "text", "text": "A paper boat drifting on a pond" }],
    "resolution": "768P",
    "ratio": "16:9",
    "duration": 6
  }
}

Seedream

{
  "model": "seedream-5-0-pro",
  "input": { "prompt": "A paper boat on a pond, watercolor", "size": "2k" }
}
FamilyModelsPrompt goes in
Seedanceseedance-2-5, seedance-2-0-pro, seedance-2-0-fast, seedance-2-0-minia text item of input.content
Klingkling-4-0input.prompt, or a prompt item of input.contents
Wanwan-3-0, wan-3-0-primeinput.prompt
MiniMaxminimax-h3a text item of input.content
Seedreamseedream-5-0-pro, seedream-5-0-liteinput.prompt

Values are case-sensitive and must match the schema exactly: MiniMax takes 768P and Wan takes 720P, while Seedance and Kling take 720p.

Media inputs

Wherever a schema takes a media URL, send one of:

  • **A public https link**, up to 4,000 characters. Before the task is accepted, we read the start of the file to check its format and size, and its duration where the file header states it. We do not download or store your file: the task passes your original URL to the model, which fetches the file itself, possibly some time after acceptance. Keep the URL reachable, with the same file, until the task closes. If the model cannot fetch it, the task fails with input_media_unreachable.
  • An uploaded asset ID (ast_...) from your own project. We store the file and give the model a link to it. Using an asset needs the assets:reference scope.

Plain http links, links to private or local addresses, links with a user name, password or #fragment, links that need cookies or headers, file IDs from other platforms and Base64 data are refused with 422 invalid_input.

Linked fileFormatsLargest file
ImagePNG, JPEG, WebP. Seedance and Seedream also take BMP, TIFF, GIF and HEIC; MiniMax H3 also takes HEIC; Kling takes PNG and JPEG only.30 MB (30,000,000 bytes)
VideoMP4, MOV300 MB; 200 MB on Seedance, 50 MB on MiniMax H3
AudioMP3, WAV15 MB (15,000,000 bytes)

A linked file in another format is refused with 422 input_media_invalid, and one over its size limit with 422 input_media_too_large. A measured video or audio outside the model's length limits, alone or added up, is refused with 422 input_duration_out_of_range. These refusals happen before the task exists, so nothing is held. When the check cannot read a file, for example because the server does not answer partial reads, the request is accepted and the model checks the file when it fetches it.

Image to video (Seedance)

{
  "model": "seedance-2-5",
  "input": {
    "content": [
      { "type": "text", "text": "The boat drifts toward the camera" },
      { "type": "image_url", "role": "first_frame", "image_url": { "url": "ast_01JD8Z7K3M9P" } }
    ],
    "ratio": "adaptive",
    "duration": 5
  }
}

Image to video (Kling)

{
  "model": "kling-4-0",
  "input": {
    "contents": [
      { "type": "prompt", "text": "The boat drifts toward the camera" },
      { "type": "first_frame", "url": "ast_01JD8Z9M2C4V" }
    ],
    "settings": { "duration": 5 }
  }
}

Upload a file

Upload a file when it is not on a public https URL, or when you do not want to keep one public while the task runs.

  1. Start an upload with the file's mime and its size in max_bytes. You get an asset_id and an upload_url.
  2. PUT the bytes to upload_url within 5 minutes, with the same Content-Type.
  3. Complete the upload. The asset is checked and becomes usable as input.
cURL
# 1. Start the upload
curl https://api.vizoapi.com/v1/assets/uploads \
  -H "Authorization: Bearer $VIZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"mime": "image/jpeg", "max_bytes": 482113}'

# 2. Send the bytes to the returned upload_url
curl -X PUT "$UPLOAD_URL" -H "Content-Type: image/jpeg" --data-binary @boat.jpg

# 3. Complete it, then use the asset_id as a media URL
curl -X POST https://api.vizoapi.com/v1/assets/$ASSET_ID/complete \
  -H "Authorization: Bearer $VIZO_API_KEY"
LimitValue
File typesimage/png, image/jpeg, image/webp, video/mp4, audio/mpeg, audio/wav
File sizeUp to 20,000,000 bytes per file
Uploads in progress3 per organization at a time
Upload URLValid for 5 minutes
Kept for24 hours after the upload completes

Each model's schema sets its own media limits as well: how many images, videos and audio files it takes, and how long the videos may be.

Seedance input limits

Counts are always checked when the task is created. Lengths and sizes are checked then only when the file can be measured; otherwise the model checks them when it fetches the file. Each model page lists these limits under its rules.

LimitSeedance 2.5Seedance 2.0 Pro, Fast and Mini
Images (image_url)Up to 30Up to 9
Videos (video_url)Up to 10Up to 3
Audio (audio_url)Up to 10Up to 3, and only with an image or video in content
Each video or audio item2 to 30 seconds; an edit source video 4 to 30 seconds2 to 15 seconds
All videos together30 seconds15 seconds
All audio together30 seconds15 seconds
Items in totalNo limit beyond the counts aboveNo limit beyond the counts above
File sizeImage 30 MB, video 200 MB, audio 15 MBImage 30 MB, video 200 MB, audio 15 MB

Every image, video and audio item needs a role; an item without one is refused with 422 invalid_input. A count over its limit is refused with 422 invalid_input. A length is checked only when the file can be measured: outside its limit, the request is refused with 422 input_duration_out_of_range.

We do not check image pixel size or aspect ratio, or video resolution or frame rate, when the request is made. The model checks them when the task runs. A file it refuses usually fails the task with input_media_invalid, and otherwise with generation_failed; either way the hold is released and nothing is charged.

Input video and price

Seedance 2.0 Pro supports resolution: "4k" with or without reference video: 157 Credits per output second, or 97 Credits per billed second with video input. Fast and Mini support up to 720p; Seedance 2.5 supports up to 1080p.

Seedance 2.0 Pro, Fast and Mini accept up to 3 video_url items with role reference_video, each 2–15 seconds and at most 15 seconds total. Do not combine reference media with first or last frames. The 2.0 models do not accept omni_reference_task_type or drafts; their video inputs use reference pricing. The task selector and drafts are available on Seedance 2.5 only.

Seedance video-input estimates count input plus output seconds, with a minimum of output seconds × 5/3 rounded up. Unknown input lengths on 2.0 reserve 15 input seconds. A successful task settles on reported tokens at the selected tier’s rate.

On a tier that bills input video, the price counts the input seconds too. The linked video is measured before the task is priced. If its length cannot be read, the hold covers the longest input the tier accepts, and the task is charged on the length actually used.

Content moderation

Every task's prompt, input media and result are checked for content safety. Moderation is always on: no request field turns it off or changes it, and a field the schema does not list is refused with 422.

  • Refused input: the task usually fails with input_moderated.
  • Refused result: the task usually fails with output_moderated, and no result is delivered.

On some models, such as Kling 4.0, the refusal carries no reason and the task fails with generation_failed. Either way the hold is released and nothing is charged. See Task errors and Hold, charge and release.

Outputs

A succeeded task lists its files in result.outputs, each with an asset_id, in order. Get a short-lived download URL for each with download an asset. Outputs are kept for 7 days; download the ones you want to keep. See Get results.

Watermarks, automatic length and task expiry

Prices and tiers are unchanged for these options. Watermarks default to false: use watermark on Seedance and Seedream, parameters.watermark on Wan 3.0 / Prime, or aigc_watermark on MiniMax H3. Kling watermarked output is not available yet.

Wan accepts parameters.duration: -1; Kling infers length when settings.duration is omitted. Automatic length reserves up to 30 output seconds. With measured Wan input video, the output reserve is reduced so input plus output fits 30 seconds. Wan settles on reported usage; Kling settles on delivered duration. Missing usage or duration keeps the hold as the charge and is flagged for reconciliation.

All Seedance models accept execution_expires_after, an integer from 3600 to 259200 seconds, default 86400. The delivery deadline, reference access and Credit hold follow this lifetime from acceptance. The 30-minute funding/start limit still applies before dispatch. Results arriving after closure are free.

Seedance 2.5 accepts omni_reference_task_type: "auto", or omission, with reference video. The video content selects the video tier. Because inference can choose edit or extend, estimates hold the maximum output duration plus billable input, including the tier's minimum billing rule, even if a shorter duration was sent. Actual tokens determine the charge. Explicit edit still requires duration: -1; media roles remain required.

Kling reference video and editing

Kling 4.0 accepts feature_video for motion/reference and base_video for editing in contents, alongside exactly one prompt. Use 720p or 1080p; video input automatically selects the matching -video tier at 18 or 27 Credits per billed second.

Billed seconds = max(2 × output seconds, input seconds + output seconds).

Up to 5 videos, at most one base_video, 3–30 seconds each and 30 seconds total; up to 10 images. Video URLs must be MP4/MOV and at most 300 MB each; direct uploads retain the smaller upload limit. Multiple feature_video entries need unique ids.

Input duration is measured; unknown input reserves 30 seconds, and omitted output duration reserves 30 seconds.

Settlement uses delivered output plus measured input and the same 2× output floor; unknown duration keeps the conservative hold for reconciliation.

Wan 3.0 resolutions and reference video

Set parameters.resolution to 480P, 720P (default), or 1080P on Wan 3.0. Prime supports 720P. Wan 3.0 costs 10, 19, or 38 Credits per second respectively. Reference video selects the matching -video tier: input and output seconds are billed at the same rate. Reference video input totals at most 15 seconds; input plus output totals at most 30 seconds. Unknown input reserves 15 input seconds; automatic output reserves the maximum, reduced by known input to fit 30 seconds. Final billing uses reported usage.