cURL
curl --fail-with-body --request GET \
--url "$XPILOT_API_BASE_URL/v1/avatars/%3Cavatar_id%3E/videos/%3Cvideo_id%3E" \
--header "Authorization: Bearer $XPILOT_API_KEY"const response = await fetch(process.env.XPILOT_API_BASE_URL + "/v1/avatars/%3Cavatar_id%3E/videos/%3Cvideo_id%3E", {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.XPILOT_API_KEY}`,
},
});
const result = await response.json();
if (!response.ok) throw new Error(JSON.stringify(result));
console.log(result);import os, json, requests
response = requests.request(
"GET",
os.environ["XPILOT_API_BASE_URL"] + "/v1/avatars/%3Cavatar_id%3E/videos/%3Cvideo_id%3E",
headers={
"Authorization": "Bearer " + os.environ["XPILOT_API_KEY"],
},
timeout=70,
)
print(response.status_code, response.text)
response.raise_for_status(){
"data": {
"id": "<video_id>",
"avatar_id": "<avatar_id>",
"status": "completed",
"source": "text",
"video_url": "<webm_url>",
"format": "webm",
"has_alpha": true,
"duration_seconds": 12.4,
"width": 1080,
"height": 1920,
"cost_credits": 9.18,
"error": null,
"created_at": 1791849600,
"updated_at": 1791849680
}
}{
"error": {
"code": "invalid_parameter",
"message": "Check parameter types, required fields and idempotency key."
},
"request_id": "<request_id>"
}{
"error": {
"code": "invalid_token",
"message": "Use an active scoped API Key. MCP OAuth tokens cannot call REST."
},
"request_id": "<request_id>"
}{
"error": {
"code": "insufficient_scope",
"message": "Check the credential scope and resource ownership."
},
"request_id": "<request_id>"
}{
"error": {
"code": "not_found",
"message": "Use an existing owned conversation, message, brand kit or render ID."
},
"request_id": "<request_id>"
}{
"error": {
"code": "rate_limited",
"message": "Credential/workspace rate or concurrency limit reached. Respect Retry-After before retrying.",
"retry_after": 60
},
"request_id": "<request_id>"
}Avatars
get avatar video
Read an avatar video job: status (queued, processing, completed, failed), video_url (transparent WebM) once completed, duration_seconds, width, height and the settled cost_credits. Poll at least 5 seconds apart.
GET
/
v1
/
avatars
/
{avatar_id}
/
videos
/
{video_id}
cURL
curl --fail-with-body --request GET \
--url "$XPILOT_API_BASE_URL/v1/avatars/%3Cavatar_id%3E/videos/%3Cvideo_id%3E" \
--header "Authorization: Bearer $XPILOT_API_KEY"const response = await fetch(process.env.XPILOT_API_BASE_URL + "/v1/avatars/%3Cavatar_id%3E/videos/%3Cvideo_id%3E", {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.XPILOT_API_KEY}`,
},
});
const result = await response.json();
if (!response.ok) throw new Error(JSON.stringify(result));
console.log(result);import os, json, requests
response = requests.request(
"GET",
os.environ["XPILOT_API_BASE_URL"] + "/v1/avatars/%3Cavatar_id%3E/videos/%3Cvideo_id%3E",
headers={
"Authorization": "Bearer " + os.environ["XPILOT_API_KEY"],
},
timeout=70,
)
print(response.status_code, response.text)
response.raise_for_status(){
"data": {
"id": "<video_id>",
"avatar_id": "<avatar_id>",
"status": "completed",
"source": "text",
"video_url": "<webm_url>",
"format": "webm",
"has_alpha": true,
"duration_seconds": 12.4,
"width": 1080,
"height": 1920,
"cost_credits": 9.18,
"error": null,
"created_at": 1791849600,
"updated_at": 1791849680
}
}{
"error": {
"code": "invalid_parameter",
"message": "Check parameter types, required fields and idempotency key."
},
"request_id": "<request_id>"
}{
"error": {
"code": "invalid_token",
"message": "Use an active scoped API Key. MCP OAuth tokens cannot call REST."
},
"request_id": "<request_id>"
}{
"error": {
"code": "insufficient_scope",
"message": "Check the credential scope and resource ownership."
},
"request_id": "<request_id>"
}{
"error": {
"code": "not_found",
"message": "Use an existing owned conversation, message, brand kit or render ID."
},
"request_id": "<request_id>"
}{
"error": {
"code": "rate_limited",
"message": "Credential/workspace rate or concurrency limit reached. Respect Retry-After before retrying.",
"retry_after": 60
},
"request_id": "<request_id>"
}Documentation by X-Pilot
Required scope:avatars:read.
Manage API keys · Authentication and recovery

