AGTCloud API Docs
GuidesAPI ReferenceIntegrations and resourcesUpdate and help
RealtimeGPT-Live Realtime Voice

Create a custom voice

Create a voice from a text description and reuse it in GPT-Live WebSocket or WebRTC sessions.

Create an original adult voice from a text description, save the returned voice ID, and use it in GPT-Live realtime voice sessions. The create endpoint does not return an audio sample; listening to the voice requires a Live session.

POST/v1/audio/voices

Submit a text description to receive a voice ID and basic details. No audio sample is returned. Currently, only JSON-based prompt voice creation is supported; cloning from an uploaded recording is not supported.

The UTF-8 encoded request body must not exceed 65,535 bytes. Each successful request saves a new voice; identical descriptions do not reuse an existing ID.

Authorization

bearerAuth
AuthorizationBearer <token>

Use Bearer your-api-key in the Authorization header.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

Use the voice in a Live session

Set session.audio.output.voice.id to the returned id, and keep the original voice description and conversation instructions in session.instructions. Set session.model to a Live model available to your account, separately from the voice creation model gpt-voice.

After connecting, configure the voice in the first session.start event:

{
  "type": "session.start",
  "session": {
    "model": "MODEL_ID",
    "instructions": "An original adult female voice with a warm, clear tone, a moderate pace, and a natural, friendly delivery. Avoid exaggerated expression. Please answer the user's questions briefly.",
    "delegation": { "type": "client" },
    "audio": {
      "format": { "type": "audio/pcm", "rate": 24000 },
      "output": {
        "voice": { "id": "voice_0123456789abcdef0123456789abcdef" }
      }
    }
  }
}

See WebSocket connection for the complete connection flow.

ItemUsage notes
Voice selectionUse a voice ID your account can access. Select it when starting the session; changing voices requires a new session
Saving and reuseSave the complete ID and original voice description. Reuse them in later sessions without creating the voice again
CostVoice creation is currently free. Listening and conversation are billed as Live sessions; Responses delegation and tools may incur separate charges
Ending a sessionSend session.close, wait for session.closed, and save the final cumulative usage. Do not add intermediate usage snapshots together

Retries and troubleshooting

SymptomResolution
Creation times out or the response is lostSave X-Oneapi-Request-Id from the response headers, if available. Check the asset library first or contact support; resubmitting the same description can create another voice
Sample dialogue is rejectedscript_hint must not be empty or too short. Supply a complete, representative passage, or omit the field
The voice cannot be usedCheck model access, voice ownership, and the complete ID, and make sure you are calling the Live endpoint
Creation returns 503Save the request ID and asset_id, if present. This ID does not confirm successful creation. Check the asset record before deciding whether to create the voice again

This endpoint only creates voices from text descriptions. It does not provide recording-based cloning, voice listing, or voice deletion.