4 4
5**post** `/audio/voices`5**post** `/audio/voices`
6 6
7Creates a voice from a text prompt or from a consent recording and an audio sample.7Create a custom voice you can use for audio output (for example, in Text-to-Speech and the Realtime API). This requires an audio sample and a previously uploaded consent recording.
8 8
9For prompt-based creation, send `type: "prompt"` with a `name` and `prompt` as JSON or multipart form data. For creation from an audio sample, send `type: "audio_sample"` with a `name`, `audio_sample`, and `consent` recording ID as multipart form data. The type defaults to `audio_sample` when omitted.9Send `name`, `audio_sample`, and the `consent` recording ID as multipart form data. The optional `type` defaults to `audio_sample`.
10 10
11Returns the saved voice's metadata. Voices created from text prompts are supported only in Live, not in Realtime or the speech endpoint. The response does not include preview audio.11Returns the saved voice's metadata. See the [custom voices guide](/api/docs/guides/text-to-speech#custom-voices) for requirements and best practices. Custom voices are limited to eligible customers.
12
13### Body Parameters
14
15- `name: string`
16
17 The name of the new voice.
18
19- `prompt: string`
20
21 A description of the desired voice. Must not contain only whitespace.
22
23- `type: "prompt"`
24
25 Set to `prompt` to create a voice from a text description.
26
27 - `"prompt"`
28
29- `model: optional string or "auto" or "2026-10-01"`
30
31 The voice creation model to use. Defaults to `auto`.
32
33 - `string`
34
35 - `"auto" or "2026-10-01"`
36
37 The voice creation model to use. Defaults to `auto`.
38
39 - `"auto"`
40
41 - `"2026-10-01"`
42
43- `script_hint: optional string`
44
45 Optional text for the voice to speak during creation. If omitted, a script is generated from the prompt. Must not be blank after trimming whitespace; scripts that are too short are rejected.
46 12
47### Returns13### Returns
48 14
49- `Voice object { id, created_at, name, 2 more }`15- `Voice object { id, created_at, name, 2 more }`
50 16
51 A custom voice that can be used for audio output. Voices created from text prompts are supported only in Live.17 A custom voice that can be used for audio output.
52 18
53 - `id: string`19 - `id: string`
54 20
68 34
69 - `"audio.voice"`35 - `"audio.voice"`
70 36
71 - `type: "audio_sample" or "prompt"`37 - `type: "audio_sample"`
72 38
73 How the voice was created. Voices created from text prompts are supported only in Live.39 How the voice was created.
74 40
75 - `"audio_sample"`41 - `"audio_sample"`
76 42
77 - `"prompt"`
78
79### Example43### Example
80 44
81```http45```http
82curl https://api.openai.com/v1/audio/voices \46curl https://api.openai.com/v1/audio/voices \
83 -H 'Content-Type: application/json' \47 -H 'Content-Type: multipart/form-data' \
84 -H "Authorization: Bearer $OPENAI_API_KEY" \48 -H "Authorization: Bearer $OPENAI_API_KEY" \
85 -d '{49 -F 'audio_sample=@/path/to/audio_sample' \
86 "name": "x",50 -F consent=consent \
87 "prompt": "x",51 -F name=x
88 "type": "prompt"
89 }'
90```52```
91 53
92#### Response54#### Response
107curl https://api.openai.com/v1/audio/voices \69curl https://api.openai.com/v1/audio/voices \
108 -X POST \70 -X POST \
109 -H "Authorization: Bearer $OPENAI_API_KEY" \71 -H "Authorization: Bearer $OPENAI_API_KEY" \
110 -H "Content-Type: application/json" \72 -F "name=My new voice" \
111 -d '{73 -F "consent=cons_1234" \
112 "type": "prompt",74 -F "audio_sample=@audio_sample.wav;type=audio/x-wav"
113 "name": "Warm narrator",
114 "prompt": "A warm, calm narrator with a clear, measured delivery.",
115 "model": "auto"
116 }'
117```75```