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".

Headers

Idempotency-Key
string

A unique string for this request, such as a UUID. Sending the same key again within 24 hours returns the original project instead of creating and charging for a new one. A key applies across all video, image, and audio endpoints on your account, so use a new key for every project.

Example:

"5f3c1b9e-8a41-4a0e-9d3e-2f6a1c7b9e10"

Body

application/json

Body

start_seconds
number<float>
required

Start time of your clip (seconds). Must be ≥ 0.

Required range: x >= 0
Example:

0

end_seconds
number<float>
required

End time of your clip (seconds). Must be greater than start_seconds.

Required range: x >= 0.1
Example:

5

assets
object
required

Provide the assets for auto subtitle generator

style
object
required

Style of the subtitle. At least one of .style.template or .style.custom_config must be provided.

  • If only .style.template is provided, default values for the template will be used.
  • If both are provided, the fields in .style.custom_config will be used to overwrite the fields in .style.template.
  • If only .style.custom_config is provided, then all fields in .style.custom_config will be used.

To use custom config only, the following custom_config params are required:

  • .style.custom_config.font
  • .style.custom_config.text_color
  • .style.custom_config.vertical_position
  • .style.custom_config.horizontal_position
name
string
default:Auto Subtitle - dateTime

Give your video a custom name for easy identification.

Example:

"My Auto Subtitle video"

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