Skip to main content
POST
/
v1
/
video
/
generations
curl --request POST \
  --url https://api.getinfinityblue.com/v1/video/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "kling-v2-5-turbo",
  "prompt": "An astronaut walking on the Moon, Earth slowly rising in the background, cinematic shot, 4K",
  "duration": 5,
  "width": 1280,
  "height": 720
}
'
{
  "task_id": "abcd1234efgh",
  "status": "queued"
}

Available models

Pass any video generation model ID in model, for example:
Model IDNotes
kling-v2-5-turboKling latest Turbo — balanced speed and quality
kling-v2-1-masterKling flagship Master — highest quality
veo_3_1Google Veo 3.1 — top-tier video quality
veo_3_1-fastGoogle Veo 3.1 Fast — lower cost

Call flow

  1. POST /v1/video/generations — submit task, get task_id
  2. GET /v1/video/generations/{task_id} — poll until status=completed
  3. Read the url field from the response to download the video

Image-to-video

Set the image field (URL or Base64) to trigger image-to-video mode. The model will animate the content of the provided image.

Extended parameters

For some models, metadata accepts model-specific fields such as negative_prompt, style, or quality_level. Supported fields vary by model — refer to the model’s own documentation.

Authorizations

Authorization
string
header
required

Bearer token authentication, format: Authorization: Bearer sk-xxxxxx. Get your API key in the console.

Body

application/json

Generic video generation request body.

model
string
required

Model ID. Supports multi-vendor video models such as Kling and Veo. Examples: kling-v2-5-turbo, kling-v2-1-master, veo_3_1, veo_3_1-fast.

Example:

"kling-v2-5-turbo"

prompt
string
required

Text prompt describing the video content, scene, camera work, and style.

Example:

"An astronaut walking on the Moon, Earth rising in the background, cinematic shot"

image
string

Reference image — URL or Base64 data URI. When set, triggers image-to-video mode and the model animates the image content.

Example:

"https://example.com/image.jpg"

duration
number

Video duration in seconds.

Example:

5

width
integer

Video width in pixels.

Example:

1280

height
integer

Video height in pixels.

Example:

720

fps
integer

Video frame rate (fps).

Example:

30

seed
integer

Random seed. Using the same seed and parameters tends to produce similar results.

Example:

20231234

n
integer

Number of videos to generate. Recommended to keep at 1 for async tasks.

Example:

1

response_format
string

Response format. Use url.

Example:

"url"

user
string

End-user identifier for auditing and abuse monitoring; not used in generation.

Example:

"user-1234"

metadata
object

Extended parameters for model-specific fields such as negative_prompt, style, or quality_level. Supported fields vary by model.

Response

Video generation task created successfully

Response from the generic video generation create endpoint.

task_id
string

Task ID — use this to poll for status.

Example:

"abcd1234efgh"

status
string

Initial task status, typically queued.

Example:

"queued"