Skip to content

Avatar X

Integrate

Model id mirage-api/avatar-x/text-to-video
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/mirage-api/avatar-x/text-to-video?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "script": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

This request: ≈$54.00 54,000 API credits Run it on this page

Get API key
Mirage Lipsync & Avatars Reference inputsLipsync #avatar#talking-head

Talking-avatar video from a script, using a stock avatar or your own reference video and voice

Mirage · Video

Your first result goes here

Build a request below and run it with your API key. Outputs are copied to our storage, kept forever or 7 days for free.

Build a request

Controls are generated from the model schema. The code and the price update as you change them.

•required 88 / 1500

Script constrained by both character count and generated duration: speech may not exceed 180 seconds, even when speaking pace pushes a shorter script past that limit. Supply 50 to 1,500 characters; the 50-character minimum generally yields about four seconds of speech.

Advanced avatar · video_reference_url · audio_reference_url
default Jasmine

Stock appearance-and-voice selection, unnecessary when both video_reference_url and audio_reference_url are supplied because those references replace it completely. Use None to leave the avatar unset, or copy an exact Avatar value after previewing all options in the [avatar catalog](https://captions.ai/help/docs/api/actor-catalog).

Reference-video URL that replaces the selected avatar and requires audio_reference_url; any audio embedded in the video is disregarded. Media must last from 1 to 120 seconds, stay within 1 GiB, and have a display aspect ratio within 5% of 9:16 or 16:9; supported codec/container combinations are H.264, H.265/HEVC, or ProRes in .mp4, .mov, or .m4v, and VP8 or VP9 in .webm. Retrieval must be public over HTTPS without cookies or authorization headers.

Voice-reference HTTPS URL that requires an accompanying video_reference_url and causes the chosen avatar to be disregarded; retrieval must work publicly without authorization headers or cookies. Processing uses only the first 60 seconds, but the file must last 10 to 180 seconds, remain within 64 MiB, and contain a single mono or stereo stream at 8 to 48 kHz. Accepted formats include FLAC, MP3, PCM WAV or AIFF, AAC or ALAC, and Opus or Vorbis.

POST /run/mirage-api/avatar-x/text-to-video?wait=20 quote → $54.00
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/mirage-api/avatar-x/text-to-video?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "script": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

Run this request

Your key stays in this browser: it is sent only to the Doitong API and saved (localStorage) only if you tick Remember. Get an API key

About Avatar X

Turns a `script` of 50 to 1,500 characters into a speaking avatar video, with generated speech limited to 180 seconds. Choose a stock `avatar` such as Jasmine, Luke or Maya, including 16:9 variants. Alternatively supply both `video_reference_url` and `audio_reference_url` to use your own footage and voice reference, in which case the stock avatar is ignored.

Parameters

NameType DefaultAllowed Description
scriptrequired
Typestring
≤ 1,500 characters≥ 50 characters
Script constrained by both character count and generated duration: speech may not exceed 180 seconds, even when speaking pace pushes a shorter script past that limit. Supply 50 to 1,500 characters; the 50-character minimum generally yields about four seconds of speech.
avataroptional
Typeenum
DefaultJasmine
NoneAyeshaAyesha (16:9)FarhanFarhan (16:9)GiuliaGiulia (16:9)JasmineJasmine (16:9)LukeLuke (16:9)MayaMaya (16:9)MichaelMichael (16:9)Neha
+5 moreNeha (16:9)TariqTariq (16:9)ValerieValerie (16:9)
Stock appearance-and-voice selection, unnecessary when both video_reference_url and audio_reference_url are supplied because those references replace it completely. Use None to leave the avatar unset, or copy an exact Avatar value after previewing all options in the [avatar catalog](https://captions.ai/help/docs/api/actor-catalog).
video_reference_urloptional
Typestring | null
Reference-video URL that replaces the selected avatar and requires audio_reference_url; any audio embedded in the video is disregarded. Media must last from 1 to 120 seconds, stay within 1 GiB, and have a display aspect ratio within 5% of 9:16 or 16:9; supported codec/container combinations are H.264, H.265/HEVC, or ProRes in .mp4, .mov, or .m4v, and VP8 or VP9 in .webm. Retrieval must be public over HTTPS without cookies or authorization headers.
audio_reference_urloptional
Typestring | null
Voice-reference HTTPS URL that requires an accompanying video_reference_url and causes the chosen avatar to be disregarded; retrieval must work publicly without authorization headers or cookies. Processing uses only the first 60 seconds, but the file must last 10 to 180 seconds, remain within 64 MiB, and contain a single mono or stereo stream at 8 to 48 kHz. Accepted formats include FLAC, MP3, PCM WAV or AIFF, AAC or ALAC, and Opus or Vorbis.
required

Output

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "mirage-api/avatar-x/text-to-video",
  "status": "succeeded",
  "created_at": "2026-10-20T12:00:00Z",
  "started_at": "2026-10-20T12:00:02Z",
  "completed_at": "2026-10-20T12:00:09Z",
  "queue_position": null,
  "cost": {
    "credits": 54000,
    "usd": "54.00",
    "charged": 54000,
    "refunded": 0
  },
  "input": {
    "script": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  },
  "output": {
    "video": {
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp4",
      "content_type": "video/mp4",
      "file_name": "0-output.mp4",
      "file_size": 1843200
    }
  },
  "outputs": [
    {
      "type": "video",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp4",
      "content_type": "video/mp4",
      "file_size": 1843200,
      "width": 1280,
      "height": 720,
      "duration": 5,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
Your files, your choiceEvery outputs[].url is a copy on our storage: kept forever (paid per GB-month) or 7 days for free, by your account setting or ?storage=.
Same shape on every modeltype, url, content_type, width, height and duration, for images, video and audio alike. output is the model’s own result object.
Fields of output
video
object {url, content_type, file_name, file_size}

More models: Lipsync & Avatars

For AI agents: this page as Markdown is at https://doitong.com/developers/models/mirage-api/avatar-x/text-to-video.md. All models and guides: https://doitong.com/developers/llms.txt