OpenAI-Compatible Video Flow

MethodPathUse
POST/v1/video/generationsCreate an OpenAI-compatible video task
GET/v1/videos/{task_id}Poll video task status and result
GET/v1/videos/{task_id}/contentFetch the produced content of a finished video task

This set of endpoints is the platform's standard video protocol: the request uses OpenAI Video-compatible fields, and the platform translates it into the upstream vendor's async video task format.

Create a task

bash
curl https://api.modelgo.ai/v1/video/generations \
  -H "Authorization: Bearer $MODELGO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"<model>","prompt":"a neon city cat","duration":4}'

A successful create returns a task_id. Subsequent polling and content fetches are all keyed by that task_id.

Poll task status

bash
curl https://api.modelgo.ai/v1/videos/task_123 \
  -H "Authorization: Bearer $MODELGO_API_KEY"
json
{
  "id": "task_123",
  "object": "video",
  "status": "completed",
  "progress": 100,
  "metadata": { "url": "https://.../video.mp4", "duration": 4, "resolution": "..." }
}

status is one of queued / in_progress / completed / failed; on completed, the produced asset URL appears in metadata.url.

Fetch the asset

Once the task is done, you can fetch the asset bytes through the content endpoint. The gateway streams the video/mp4 bytes directly (no 302 redirect to object storage), supports Range requests, and only the API key that owns the task (or a console session in the same tenant) may read it:

bash
curl https://api.modelgo.ai/v1/videos/task_123/content \
  -H "Authorization: Bearer $MODELGO_API_KEY" \
  -o video.mp4

Content availability depends on the backend "media delivery" setting:

  • 404 (content_delivery_disabled) when delivery is disabled
  • 409 (task_not_completed) when the task is still running
  • 404 (content_not_available) when the asset has expired or is missing

Key conventions

  • This is the standard OpenAI-compatible video entrypoint; clients do not need to understand vendor-native protocols.
  • Whether fields such as duration or size are supported, and which upstream vendor is selected, depends on the logical model referenced by model.
  • Video generation is asynchronous. Poll with backoff to avoid unnecessary rate-limit pressure.

For the more generic async task entrypoint, see Generic Async Content Generation Tasks. To write against a vendor's own payload style while keeping platform-managed billing and task handling, see the Seedance Video Inbound Protocol and the MiniMax Video Inbound Protocol.