Skip to main content
POST
Python

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <api_key>, where <api_key> is your API key. To get your API key, go to Developer Hub and click "Create new API Key".

Body

application/json

Body

assets
object
required
script
string
required

The words the actor should speak. Character limits apply after trimming:

  • kling-3.0: 2500 characters.
  • ltx-2.5: 1804 characters.
  • veo3.1: 2500 characters. LTX's dialogue wrapper counts toward its model prompt limit.
Minimum string length: 1
Example:

"Meet your new everyday essential."

end_seconds
number
required

Video duration in seconds. Supported values by model:

  • kling-3.0: 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 seconds.
  • ltx-2.5: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60 seconds.
  • veo3.1: 4, 6, 8, 15, 22, 29, 36, 43, 50, 57, 64, 71, 78, 85, 92, 99, 106, 113, 120, 127, 134, 141 seconds. Free plans are limited to 5 seconds unless a credit pack has been purchased.
Required range: x >= 1
Example:

4

model
enum<string>

Defaults to kling-3.0 on paid plans and ltx-2.5 on free plans.

Available options:
kling-3.0,
ltx-2.5,
veo3.1
resolution
enum<string>

Defaults to 720p on paid plans and 480p on free plans. Unsupported model/resolution combinations and resolutions unavailable for your plan are rejected.

Available options:
480p,
720p,
1080p

Response

Success

Success

id
string
required

Unique ID of the video. Use it with the Get video Project API to fetch status and downloads.

Example:

"cuid-example"

credits_charged
integer
required

The amount of credits deducted from your account to generate the video. If the status is not 'complete', this value is an estimate and may be adjusted upon completion based on the actual FPS of the output video.

If video generation fails, credits will be refunded, and this field will be updated to include the refund.

Example:

450