cURL
curl --fail-with-body --request GET \
--url "$XPILOT_API_BASE_URL/v1/avatars/%3Cavatar_id%3E" \
--header "Authorization: Bearer $XPILOT_API_KEY"const response = await fetch(process.env.XPILOT_API_BASE_URL + "/v1/avatars/%3Cavatar_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",
headers={
"Authorization": "Bearer " + os.environ["XPILOT_API_KEY"],
},
timeout=70,
)
print(response.status_code, response.text)
response.raise_for_status(){
"data": {
"id": "<avatar_id>",
"name": "Presenter",
"avatar_type": "human_video",
"status": "ready",
"training_status": "ready",
"preview_status": "ready",
"selectable": true,
"stage": null,
"preview_image_url": "<image_url>",
"preview_video_url": "<video_url>",
"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
Read an owned avatar. status is the overall state (draft, generating, ready, failed, deleting, migration_required); training_status and preview_status track training and the preview sample; selectable must be true before video generation can use it; stage names the step in progress (queued, generating_training_video, provider_processing, generating_preview, deleting_provider_asset) or null when idle; error is on failure. Training ready alone does not mean it can be used in a video.
GET
/
v1
/
avatars
/
{avatar_id}
cURL
curl --fail-with-body --request GET \
--url "$XPILOT_API_BASE_URL/v1/avatars/%3Cavatar_id%3E" \
--header "Authorization: Bearer $XPILOT_API_KEY"const response = await fetch(process.env.XPILOT_API_BASE_URL + "/v1/avatars/%3Cavatar_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",
headers={
"Authorization": "Bearer " + os.environ["XPILOT_API_KEY"],
},
timeout=70,
)
print(response.status_code, response.text)
response.raise_for_status(){
"data": {
"id": "<avatar_id>",
"name": "Presenter",
"avatar_type": "human_video",
"status": "ready",
"training_status": "ready",
"preview_status": "ready",
"selectable": true,
"stage": null,
"preview_image_url": "<image_url>",
"preview_video_url": "<video_url>",
"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

