Skip to content

Stream or run a video response ​

POST /v1/responses

stream=true reports progress and a final video link via Responses SSE, ending with response.completed. background=true returns a resp_ ID to poll. SSE does not contain video frames.

Guide and limits

Try this endpoint ​

Enter your API key and request parameters, then send. Generation requests are billed normally; authentication is not persisted in your browser.

application/json ​

Use stream=true or background=true for long video requests. Video-specific fields are site extensions; no chat/completions protocol.

NameTypeRequiredDefault / valuesDescription
modelstringyescogvideo-fast, cogvideo-pro, cogvideo-basic, cogvideo-short
promptstringno—Non-blank prompt, at most 4096 Unicode characters.
secondsinteger / stringno—Defaults: fast/pro/basic=5; short=8. Basic maximum 5; reference mode minimum 3; short exactly 8.
durationinteger / stringno—Defaults: fast/pro/basic=5; short=8. Basic maximum 5; reference mode minimum 3; short exactly 8.
sizestringno1920x1080, 1080x1920, 1080x1080, 1440x1080, 1080x1440, 720x1280fast/pro/basic: 1080p sizes only; short: 720x1280 only. Actual encoding dimensions are read from the file.
resolutionstringno1080p, 720p
aspect_ratiostringno16:9, 9:16, 1:1, 4:3, 3:4
input_referencestringno—HTTP(S) image URL or Base64 image data URL.
image_urlstringno—HTTP(S) image URL or Base64 image data URL.
reference_imagesarrayno—
generation_modestringnospeed, pro, pro_ad
metadataobjectno—
nintegerno1
sample_countintegerno1
inputstring / arrayno—Text or structured text/image messages; cannot be combined with prompt.
streambooleannofalse
backgroundbooleannofalse
storebooleanno—Responses protocol field accepted by the host.

Example request ​

json
{
  "model": "cogvideo-fast",
  "input": "红色纸船在池塘上缓缓漂浮",
  "seconds": "5",
  "stream": true
}

Responses ​

StatusDescription
200Response envelope or Responses SSE; inspect the terminal response status, not HTTP status alone.
400Unsupported or conflicting parameters.
401Missing or invalid customer API Key.
429Capacity or rate limit exceeded.