Videos

Generate a video (async)

Queue a text-to-video generation job (optionally seeded by a library image as the start frame). Returns immediately with a job_id - poll GET /v1/jobs/{id} until status is completed. Allowed duration and resolution values depend on the chosen model.

post/v1/videos/generate

Request

  • Base URL: https://contentmaschine.ai/api
  • URL: https://contentmaschine.ai/api/v1/videos/generate
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://contentmaschine.ai/api/oauth/authorize, token URL https://contentmaschine.ai/api/oauth/token)

Request body

promptstring required

Description of the video to generate.

model'omni' | 'grok' | 'kling' | 'seedance'

Video model to use. omni is Gemini Omni Flash. The retired id veo3 is still accepted and runs on omni.

aspect_ratio'1:1' | '16:9' | '9:16' | '4:3' | '3:4' | '3:2' | '2:3'

Aspect ratio of the video. Defaults to the start image's shape when image_file_uuid is given, else 16:9. omni renders 16:9 or 9:16 only: portrait ratios become 9:16, square and landscape ratios 16:9.

durationinteger

Length in seconds. omni: 3 to 10 (values outside are clamped). grok: 5, 8, 10 or 15. kling: 3, 5, 8, 10 or 15. seedance: 4, 6, 8, 10, 15, 20 or 30. For grok, kling and seedance other values snap down to the nearest of these (below the first, the first), so the generated length is the billed length; the 202 response reports the duration used.

resolution'720p' | '480p' | 'standard' | 'pro'

Per model: omni 720p; grok 480p or 720p; kling standard or pro; seedance 480p or 720p. Omit it for the model's default (omni 720p, grok 480p, kling standard, seedance 480p); a value the model does not support also falls back to that default.

negative_promptstring

What the video should avoid. omni has no negative prompt parameter, so it is appended to the prompt text.

image_file_uuidstring

Optional uuid of an image already in your library to use as the start frame (no upload needed).

start_frame_datastring

The start frame inline, as base64 or a data URL. Use this or image_file_uuid.

end_image_file_uuidstring

Optional uuid of a library image to use as the end frame. Needs a start frame; omni, kling and seedance only.

end_frame_datastring

The end frame inline, as base64 or a data URL. Use this or end_image_file_uuid.

reference_image_uuidsstring[]

omni only: up to 3 images from your library the video should match (look, characters, products).

client_refstring

Idempotency key (letters, digits, . _ : -). A repeat with the same client_ref within 24 hours returns the first response and is not charged again; while the first is still being queued the repeat gets 409 request_in_progress.

optionsobject

Model-specific options.

Example request

{
  "prompt": "A timelapse of clouds rolling over a mountain range at dawn"
}

Response

Job queued. data also carries model, duration, resolution and aspect_ratio: the values that will be generated and billed, after defaults and snapping. A client_ref repeat gets the first response again, with the header Idempotent-Replayed: true.

successboolean
timestampstring date-time

Example response

{
  "success": true,
  "data": {
    "status": "pending"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.