Skip to main content
POST
/
script-to-video
/
createVideo
Text To Video Generator
curl --request POST \
  --url https://api.trugen.ai/v1/script-to-video/createVideo \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "avatar_id": "avatar_abc123",
  "voice_id": "ZUrEGyu8GFMwnHbvLhv2",
  "provider_name": "elevenlabs",
  "model_name": "eleven_multilingual_v2",
  "script": "Welcome to Trugen AI. This is a demonstration of our text to video generation capability.",
  "callback_url": "https://your-app.com/webhook/video-ready"
}
'
{
  "estimated_duration": 2.09,
  "generation_id": "529fb61c-da5d-4b2d-9d49-b612deede60f",
  "status": "processing"
}

Authorizations

x-api-key
string
header
required

Body

application/json
avatar_id
string
required

The unique identifier of the avatar to use for video generation.

Example:

"avatar_abc123"

voice_id
string
required

The unique identifier of the voice to use for the audio narration.

Example:

"ZUrEGyu8GFMwnHbvLhv2"

provider_name
string
required

The name of the TTS provider to use for audio synthesis.

Example:

"elevenlabs"

model_name
string
required

The model name within the provider to use for audio synthesis.

Example:

"eleven_multilingual_v2"

script
string
required

The text script that the avatar will speak in the generated video.

Example:

"Welcome to Trugen AI. This is a demonstration of our text to video generation capability."

callback_url
string

An optional URL that will receive a POST request when the video generation is complete.

Example:

"https://your-app.com/webhook/video-ready"

Response

Video generation successfully initiated.

estimated_duration
number

Estimated duration of the generated video in seconds.

Example:

2.09

generation_id
string

Unique identifier for this video generation job. Use this to track or retrieve the result.

Example:

"529fb61c-da5d-4b2d-9d49-b612deede60f"

status
string

Current status of the video generation job.

Example:

"processing"