Skip to main content
POST
cURL

Documentation by X-Pilot

This request starts work that may consume workspace credits. Check credits and capacity before sending it.
Required scope: avatars:write. A stable Idempotency-Key is required for exact retries. Manage API keys · Authentication and recovery
An application sends a scoped API key to the X-Pilot REST API and receives an HTTP status and JSON response.
REST requests use a scoped API key. Keys, credits and usage are managed in the App console.

Authorizations

Authorization
string
header
required

Scoped X-Pilot API key

Headers

Idempotency-Key
string
required

Stable key for exact retries only. Use a different key for a different operation or input.

Required string length: 8 - 128

Path Parameters

avatar_id
string
required

Owned avatar ID with training_status ready.

Body

application/json
text
string

Spoken text for platform TTS. Use with voice_id; omit when sending audio.

Maximum string length: 5000
Example:

"Welcome to our lesson."

voice_id
string

Catalog voice ID or owned ready clone ID from list_voices. Required with text.

voice_version
enum<integer>
default:1

Voice version of voice_id: Voice I (1, default) or Voice II (2).

Available options:
1,
2
locale
string

Optional native locale for the voice.

speed
number

TTS playback speed.

Required range: 0.5 <= x <= 2
audio_url
string

Public http(s) speech audio URL (≤20 MB). The backend archives third-party audio to your owned storage first. Use this or asset_id instead of text.

asset_id
string

Owned audio asset ID returned by POST /v1/assets. Use this or audio_url instead of text.

callback_url
string

Optional public HTTPS URL notified once with avatar-video.completed or avatar-video.failed. Signed with the workspace callback secret (X-XPilot-Signature). Only set it when you run a receiving service.

Maximum string length: 2048
callback_id
string

Optional reference echoed back as data.callback_id. Requires callback_url.

Maximum string length: 128

Response

Success