Skip to main content
POST
/
v1
/
videos
Generate a video
curl --request POST \
  --url http://localhost:8080/v1/videos \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "<string>",
  "prompt": "<string>",
  "input_reference": "<string>",
  "seconds": "<string>",
  "size": "<string>",
  "negative_prompt": "<string>",
  "seed": 123,
  "video_uri": "<string>",
  "audio": true,
  "fallbacks": [
    {
      "provider": "openai",
      "model": "<string>"
    }
  ]
}
'
{
  "id": "<string>",
  "object": "video",
  "model": "<string>",
  "status": "queued",
  "progress": 50,
  "prompt": "<string>",
  "remixed_from_video_id": "<string>",
  "seconds": "<string>",
  "size": "<string>",
  "created_at": 123,
  "completed_at": 123,
  "expires_at": 123,
  "videos": [
    {
      "type": "url",
      "url": "<string>",
      "base64": "<string>",
      "content_type": "<string>"
    }
  ],
  "error": {
    "code": "<string>",
    "message": "<string>"
  },
  "content_filter": {
    "filtered_count": 123,
    "reasons": [
      "<string>"
    ]
  },
  "extra_fields": {
    "request_type": "<string>",
    "provider": "openai",
    "model_requested": "<string>",
    "model_deployment": "<string>",
    "latency": 123,
    "chunk_index": 123,
    "raw_request": {},
    "raw_response": {},
    "cache_debug": {
      "cache_hit": true,
      "cache_id": "<string>",
      "hit_type": "<string>",
      "provider_used": "<string>",
      "model_used": "<string>",
      "input_tokens": 123,
      "threshold": 123,
      "similarity": 123
    }
  }
}

Body

application/json
model
string
required

Model identifier in format provider/model

prompt
string
required

Text prompt describing the video to generate

input_reference
string

Optional reference image for image-to-video. OpenAI and Gemini require a base64 data URL (e.g., data:image/png;base64,...). Runway and Replicate accept both data URLs and plain URLs.

seconds
string

Duration of the video in seconds as a string (e.g., "4")

size
string

Resolution of the generated video (e.g., 1280x720, 720x1280, 1920x1080)

negative_prompt
string

Text describing what to avoid in the generated video

seed
integer

Seed for reproducible generation

video_uri
string

Source video URI for video-to-video generation (provider-specific, e.g. GCS URI)

audio
boolean

Enable audio generation in the video (supported by select providers/models)

fallbacks
object[]

Fallback models to try if primary model fails

Response

Successful response. Returns a video generation job object with status information. Poll the retrieve endpoint to check completion status.

id
string

Provider-native job ID. To use in path parameters (retrieve/delete/download), combine as {id}:{provider} (e.g., task_abc123:runway)

object
enum<string>

Object type, always "video"

Available options:
video
model
string

Model used for video generation

status
enum<string>

Current lifecycle status of the video generation job:

  • queued: Job is waiting to be processed
  • in_progress: Video is currently being generated
  • completed: Video generation completed successfully
  • failed: Video generation failed
Available options:
queued,
in_progress,
completed,
failed
progress
number<float>

Approximate completion percentage (0-100)

Required range: 0 <= x <= 100
prompt
string

Prompt used to generate the video

remixed_from_video_id
string

Source video ID if this is a remix

seconds
string

Duration of the generated video in seconds as a string (e.g., "4")

size
string

Resolution of the generated video (e.g., "1920x1080")

created_at
integer<int64>

Unix timestamp (seconds) when the job was created

completed_at
integer<int64>

Unix timestamp (seconds) when the job completed

expires_at
integer<int64>

Unix timestamp (seconds) when downloadable assets expire

videos
object[]

Generated video outputs (only present when status is "completed")

error
object
content_filter
object

Information about content that was filtered due to safety policies

extra_fields
object

Additional fields included in responses