Skip to main content

Avatars

An avatar is the persona your users talk to — its face, voice, model, and instructions.

An avatar bundles everything that defines a conversational persona: the appearance it was trained on, the voice it speaks with, the language model behind it, and the system prompt that shapes how it behaves.

Stock and custom avatars​

Stock avatars are pre-trained and shared across all accounts. They are ready the moment you find them, which makes them the right choice for prototyping and for any use case where a generic presenter is fine.

Custom avatars are trained from video you supply, so they look and sound like a specific person. Training takes time; see Train a custom avatar.

Listing them​

There are two listing endpoints and they return different sets. Mixing them up is the most common early mistake:

EndpointReturns
GET /v1/avatarsOnly avatars you created. Excludes stock avatars.
GET /v1/avatars/stockOnly stock avatars

There is no combined listing on /v1/ — call both and merge them if you need one list. Each is paginated with skip and limit (max 100) and returns { items, total, skip, limit }.

cURL
curl -s "https://backend.goldenengine.ai/v1/avatars?limit=20" \
-H "X-Api-Key: $GOLDENENGINE_API_KEY"

The is_stock boolean on each avatar tells you which kind you are looking at. GET /v1/avatars/{avatar_id} fetches one avatar — yours or a stock one — and GET /v1/avatars/stock/{avatar_id} fetches a stock avatar only, returning 404 for anything else.

Training lifecycle​

A custom avatar moves through five states:

pending → queued → training → ready
↘ failed
StatusMeaning
pendingThe avatar record exists; training has not been submitted
queuedThe training job was accepted into the queue
trainingA worker is actively training the model
readyThe checkpoint is saved — the avatar can hold conversations
failedTraining errored, timed out, or was cancelled; see error_message on the avatar

Only a ready avatar can start a conversation. Creating one against an avatar in any other state returns 404.

Poll GET /v1/avatars/{avatar_id}/status while you wait. It reports status, progress_percent (0–100 through the current run — a completion figure, not a time estimate), and error_message when a run ends in failed. GET /v1/avatars/{avatar_id}/training-jobs lists the individual job attempts, each with its own status (pending, running, completed, failed, cancelled).

Managing a custom avatar​

EndpointWhat it does
POST /v1/avatars/{avatar_id}/retrainRe-runs training from the original source video. Returns 202 with the avatar back at pending; 409 while a run is queued or training
POST /v1/avatars/{avatar_id}/cancelStops a queued or training run. The avatar ends failed with an error_message saying it was cancelled; 409 in any other state
DELETE /v1/avatars/{avatar_id}Deletes the avatar, its source video, and its training artifacts, aborting any active run first. Returns 204. Documents attached to it are deleted too

Video requirements​

Custom avatars are only as good as the source footage. Recording conditions — framing, lighting, background, how much the subject moves — matter more than camera quality.

To review the footage an avatar was trained from, GET /v1/avatars/{avatar_id}/video-url returns a signed link to it. The URL is short-lived — expires_in says how long — so fetch it when you need it rather than storing it.

Configuration​

Every avatar carries the settings that shape its behavior. The ones you will set most often:

FieldWhat it controlsDefault
name, bioIdentity, and the background the model is givenRequired
awards_achievementsFree-text credentials the avatar may mentionNone
known_for, personality_traits, interaction_guardrailsPersona shaping used to build the prompt, from fixed listsNone
primary_goalWhat the avatar is for, in one lineNone
llm_modelWhich language model answersgpt-4o
web_search_enabledWhether the avatar may search the web for current factstrue
guardrail_level, guardrail_fallback_line, guardrail_blocked_wordsHow strictly its speech is checked before it is spoken — see Guardrailsnormal, the default line, none
tts_provider, voice_id, tts_speedThe synthesized voice and its paceelevenlabs, the provider's default voice, 1.0
stt_engine, stt_speedHow speech is transcribeddeepgram-flux, 1.0
primary_language, ai_languagesThe language it opens in, and those it can use"English (US)", none
knowledge_base_idsAccount bank documents attached to this avatarNone

See Models for the available engines and voices. The accepted values for the list fields are listed on the request body in the API reference. Languages are labels, not codes — "English (US)", "French", "Mandarin Chinese" — and anything outside the list is rejected with 422. tts_speed and stt_speed must be greater than zero.

The system prompt is not a field you set. It is generated from the persona fields and returned read-only as system_prompt; sending system_prompt on create or update is rejected with 422, as is any other unknown field.

Update an avatar with PATCH /v1/avatars/{avatar_id}, sending only the fields you are changing. A few changes do more than they appear to:

  • Editing name, bio, awards_achievements, known_for, personality_traits or interaction_guardrails regenerates the system prompt through a model call, so the change is to the brief, not to the wording — and the request can fail with 502 if that call does. primary_goal and the language fields are stored without regenerating it.
  • Changing tts_provider without also sending voice_id resets the voice to that provider's default. voice_id is not checked against the provider or the catalog, so a mismatched or mistyped voice is accepted — confirm it in GET /v1/models first.
  • knowledge_base_ids replaces the avatar's full set of documents; see Knowledge bank.

web_search_enabled lets the avatar look up current facts — news, weather, prices — when a question needs them. How the search runs depends on the model; see Models. Set it to false to keep an avatar to its prompt and documents.

Stock avatars cannot be updated, retrained, or deleted — you do not own them, and there is no public endpoint for overriding their prompt. Create your own avatar when you need a persona of your own. You can still give a stock avatar documents: the knowledge endpoints below work on stock avatars, and what you attach is visible only to your account.

Guardrails​

Every sentence an avatar is about to say is checked before it is spoken. What fails the check is never heard and never reaches the transcript — the saved transcript holds only what was actually spoken.

The check runs in layers:

  1. Profanity filter. Swear words — including disguised spellings like f*ck, leetspeak and spaced-out letters — are removed from the sentence. This runs at every level, off included, and also removes anything in the avatar's guardrail_blocked_words.
  2. Content classifier. The sentence is scored for toxicity. A rude sentence is rewritten into a polite one and checked again; a sentence that is sexual, hateful, threatening or harmful stops the reply, and the avatar says its fallback line instead. If the very first sentence of a reply is flagged, the avatar goes straight to the fallback line.

Three fields control it, on an avatar you own (stock avatars keep the settings they ship with):

FieldValuesDefault
guardrail_leveloff, relaxed, normal, strictnormal
guardrail_fallback_lineUp to 300 characters, one line of plain textEmpty — "Sorry, I can't help with that. Is there something else I can do for you?"
guardrail_blocked_wordsUp to 200 words or short phrases, 1–50 characters eachNone

guardrail_level sets how readily the classifier acts: strict rewrites and stops at lower scores than normal, relaxed at higher ones, and off skips the classifier entirely — the profanity filter still runs. Blocked words are matched as whole words, case-insensitively, on top of the built-in list; duplicates are removed.

cURL
curl -s -X PATCH "https://backend.goldenengine.ai/v1/avatars/$AVATAR_ID" \
-H "X-Api-Key: $GOLDENENGINE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"guardrail_level": "strict",
"guardrail_fallback_line": "I can only help with questions about your account.",
"guardrail_blocked_words": ["competitor name", "refund guarantee"]
}'

Changing these fields does not regenerate the system prompt. guardrail_blocked_words replaces the whole list; send [] to clear it.

Attaching knowledge​

Avatars answer from their prompt plus the documents uploaded or attached to them. A document left unattached in your account's knowledge bank is used by no avatar. Uploading to an avatar attaches the document to it alone:

cURL
curl -s "https://backend.goldenengine.ai/v1/avatars/$AVATAR_ID/knowledge" \
-H "X-Api-Key: $GOLDENENGINE_API_KEY" \

GET /v1/avatars/{avatar_id}/knowledge lists what is attached, and DELETE /v1/avatars/{avatar_id}/knowledge/{knowledge_id} deletes a document outright — it does not return it to the bank. See Knowledge bank for how scoping and retrieval work, and Memory for what an avatar keeps from past conversations.

Preloading​

The first conversation with an avatar that is not already loaded on the engine waits a few seconds while it cold-loads. POST /v1/avatars/{avatar_id}/preload starts that load early and returns 202; call it as soon as you know a session is coming, such as when a user opens the page. Then poll GET /v1/avatars/{avatar_id}/preload-status and connect once status is ready:

statusMeaning
readyLoaded — connect now
loadingLoad in progress; keep polling
cold or errorNot loaded; send the preload request again
unknownThe engine could not be reached; keep polling

Both endpoints return 409 for an avatar that is not ready, and work on stock avatars as well as your own. Preloading is best-effort: if it fails, the conversation cold-loads as it would have anyway.