A voice can shape how people experience an AI assistant as strongly as its wording does. A customer-support assistant may need a calm, reassuring delivery; a learning companion may benefit from a clear, patient narrator; and a hands-free productivity tool may need a concise, natural conversational style. OpenAI’s Prompt-to-Voice feature gives developers a way to create a voice from a written description rather than supplying a reference recording.
This guide explains how to create a custom AI voice with OpenAI’s Prompt-to-Voice API, save the returned voice identifier, use the voice in a GPT-Live session, and test the result responsibly. It also explains the feature’s important boundaries: prompt-generated voices are supported in Live, not every OpenAI audio endpoint, and creating a voice is free while generating speech is billed under the usual Live session rates.
What Is OpenAI Prompt-to-Voice?
Prompt-to-Voice creates and saves a synthetic voice based on a text description. Instead of recording a speaker and uploading a sample, you describe the qualities you want: for example, an adult voice with a warm tone, a medium pitch, measured pacing, and a particular language accent. The API returns a saved voice object with an identifier that your application can reference later.
The feature is useful when a product needs a consistent voice identity without arranging a recording session. It can help teams prototype different voice directions, localize an assistant’s personality, or build a more coherent spoken experience across sessions. It does not guarantee that a generated voice is unique, and the text prompt is guidance rather than a set of precise audio-engineering controls.
OpenAI documents Prompt-to-Voice as generally available to API customers. You can create a voice through the API or the voice Playground. Prompt-generated voices are currently intended for GPT-Live sessions; they are not interchangeable with voices created from consented audio samples, which have different eligibility and endpoint support.
Before You Start
Prepare these items before integrating the feature:
- An OpenAI API project and API key. Keep the key on a trusted server or in a secure environment variable. Never embed a production secret in browser JavaScript, a public repository, or a mobile app bundle.
- Access to the voice-creation endpoint. Confirm that your project can use the custom voice feature and that your account’s permissions and usage terms allow your intended workflow.
- A clear voice brief. Decide the audience, language, accent, tone, pitch range, pace, and speaking style before creating the voice.
- A Live integration. Prompt-generated voices are supported in GPT-Live. Do not assume the same voice identifier will work with the standard Text-to-Speech, Realtime, or Chat Completions audio-output endpoints.
- A test plan. Prepare representative phrases, including questions, numbers, product names, abbreviations, and longer sentences. A voice that sounds good in one short sample may be less effective in real conversations.
If you are new to OpenAI’s developer platform, first review the official custom voices guide and the Create voice API reference. Those primary sources should take precedence over examples copied from older tutorials.
Step 1: Design a Useful Voice Prompt
A good prompt describes the sound you want in plain language. It should be specific enough to guide the output, but not so overloaded with contradictory adjectives that the intended style becomes unclear.
For example:
A calm, reassuring adult voice for a customer-support assistant. Use a clear American English accent, a medium pitch, a warm and smooth tone, and a steady conversational pace. Pronounce technical terms clearly and avoid exaggerated emotion.
This brief identifies the intended use, adult voice, accent, pitch, tone, and pace. It also gives the voice a practical delivery goal: clear pronunciation without exaggerated emotion.
You can adapt the same structure for different products:
- Learning assistant: “A patient adult narrator with a clear British English accent, a measured pace, and distinct pronunciation of technical vocabulary.”
- Travel assistant: “A friendly adult voice with a light Mexican Spanish accent, natural conversational rhythm, and concise, upbeat delivery.”
- Business productivity assistant: “A composed adult voice with a neutral English accent, medium-low pitch, crisp articulation, and efficient pacing.”
- Accessibility-oriented reader: “A clear adult narrator who speaks evenly, pauses naturally between clauses, and articulates names and numbers carefully.”
Treat these as starting points, not guaranteed recipes. The result is generated, and the same wording may not produce identical results across every iteration or model revision.
Describe qualities, not imaginary settings
Use natural language such as “slightly slower pace,” “clear articulation,” “warm but professional tone,” or “strong regional accent.” These are descriptive instructions inside the prompt; they are not necessarily separate API parameters. Avoid relying on unsupported controls such as an exact frequency, a guaranteed emotion score, or a specific waveform shape unless the relevant endpoint explicitly documents that control.
Avoid conflicting directions
“Speak very quickly” and “pause frequently so beginners can follow” may pull the output in different directions. Choose the primary requirement and make secondary preferences compatible. For a support assistant, clarity and trustworthiness are usually more useful than a long list of personality adjectives.
Step 2: Create the Voice Through the API
OpenAI’s voice-creation endpoint is POST /v1/audio/voices. For prompt-based creation, specify type: "prompt", a name for the voice, and the text description. The API reference documents a prompt length of up to 2,000 characters.
The following cURL example illustrates the request. Store your API key in an environment variable rather than typing a real secret directly into the command or source file.
curl https://api.openai.com/v1/audio/voices \
-X POST \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "prompt",
"name": "Warm Support Voice",
"prompt": "A calm, reassuring adult voice for a customer-support assistant. Use a clear American English accent, a medium pitch, a warm tone, and a steady conversational pace.",
"model": "auto"
}'
The model field can be set to auto or a supported model value documented by OpenAI. If you do not need to pin a specific supported model version, auto lets the service select the default. Check the current API reference before hard-coding a version into production.
A successful response contains metadata for the saved voice, including an identifier. The exact response should be read from the API rather than assumed from a tutorial. Capture the returned id; that identifier is what your Live session configuration will use to select the voice.
Handle errors deliberately
If the request fails, check the HTTP status and error body. Common areas to investigate include an invalid or missing API key, insufficient project access, malformed JSON, a missing name or prompt, and a prompt that exceeds the documented limit. Do not repeatedly retry every error as if it were temporary. Authentication and validation errors require a correction, not a retry loop.
For production services, log a request identifier and a sanitized error summary. Do not log API keys, sensitive user content, or any secret that could later be used to access your project.
Step 3: Save the Voice ID and Its Original Prompt
A custom voice is a reusable resource, so store its identifier in the configuration or database associated with your application. Keep the original prompt alongside it. That makes it easier to understand why the voice was created and to recreate a similar direction if you need to change the experience later.
A simple internal record might include:
- A human-readable name such as “Warm Support Voice.”
- The API-returned voice ID.
- The approved prompt used to create it.
- The date it was created and the project that owns it.
- The intended product, locale, and review status.
- A note explaining the voice’s disclosure and accessibility requirements.
Do not treat a voice ID as a substitute for access control. Apply your normal secrets-management, project-permission, and environment-separation practices. Use separate development and production configurations where appropriate, and avoid accidentally deploying a test voice to a customer-facing application.
OpenAI documents a limit of up to 100 prompt-generated voices per organization. That limit also applies when an application creates voices on behalf of its customers, so a product that generates a new voice for every end user should design a lifecycle and reuse strategy rather than assuming unlimited creation.
Step 4: Use the Saved Voice in a GPT-Live Session
After creating the voice, configure your GPT-Live session to use the returned voice identifier. The relevant Live session configuration supports a voice reference, allowing the application to reuse the saved voice instead of creating a new one for every conversation.
The conceptual configuration looks like this:
{
"session": {
"type": "live",
"audio": {
"output": {
"voice": {
"id": "YOUR_SAVED_VOICE_ID"
}
}
}
}
}
This is an illustrative structure, not a complete connection flow. Replace the placeholder with the actual ID returned by your voice-creation request and follow the current GPT-Live session documentation for the exact transport, authentication, and session setup required by your integration. Do not copy this fragment into production without validating it against the API version you use.
A common mistake is to create a prompt-generated voice successfully and then attempt to use it with an unrelated endpoint. OpenAI’s current documentation states that voices created from text prompts are supported only in Live. They are not supported by the Text-to-Speech API, the Realtime API, or Chat Completions audio output. If your architecture depends on one of those endpoints, verify the supported voice-creation method before building around Prompt-to-Voice.
Step 5: Test the Voice Before Release
A successful API response only proves that a voice resource was created. It does not prove that the voice is suitable for your users, that it pronounces your terminology well, or that it remains clear during a long conversation. Test it with a repeatable evaluation set.
Build a representative script
Include several types of content:
- A short greeting and a simple question.
- Long sentences with commas, parentheses, and natural pauses.
- Numbers, dates, prices, email addresses, and product names.
- Acronyms, uncommon words, and technical vocabulary.
- A clarification or correction, to see whether the delivery remains understandable.
- Longer responses that may expose fatigue, excessive emphasis, or awkward rhythm.
Have reviewers rate intelligibility, naturalness, pace, accent fit, consistency, and suitability for the intended audience. If the product serves users with different language backgrounds or accessibility needs, include those users in testing where feasible.
Keep an evaluation record
Compare voice candidates against the same test phrases. Record the prompt, voice ID, test date, and reviewer observations. This reduces the temptation to choose a voice based on one memorable sample. It also gives the team a way to spot regressions after a prompt change or product update.
Do not assume that adjectives such as “professional,” “friendly,” or “natural” mean the same thing to every listener. Use task-specific criteria. For a customer-support agent, clarity and a calm pace may matter more than theatrical expressiveness. For a language-learning tool, pronunciation and consistent pacing may be more important than personality.
Step 6: Estimate Costs and Plan for Scale
Creating a prompt-generated voice is free according to OpenAI’s current documentation. Generating speech with that voice in GPT-Live is billed at the regular GPT-Live session rates. Free voice creation therefore does not mean that a spoken AI application has no operating cost.
Before launch, estimate usage using realistic conversation lengths and expected traffic. Review the current pricing page and measure actual usage in a test environment. Include the cost of model input and output, session duration, infrastructure, monitoring, and any supporting services in your budget.
Reuse a saved voice when the same product experience needs a consistent sound. Avoid generating duplicate voices unnecessarily. If your product allows users to select a voice, define a reasonable number of approved options and explain how those options affect the experience. Establish usage limits and monitoring alerts so an unexpected traffic spike does not turn into an unplanned bill.
Pricing and product capabilities can change. Recheck official pricing and API documentation before publishing a price estimate or making a long-term cost commitment.
Step 7: Use Custom Voices Responsibly
Voice generation introduces trust and impersonation risks. A voice can suggest identity, authority, emotion, or familiarity even when the underlying content is generated. Build safeguards into the product rather than treating them as a final checklist item.
- Do not impersonate a real person. OpenAI instructs users not to impersonate others or violate its usage policies.
- Use adult voices only. The current Prompt-to-Voice guidance does not allow children’s voices.
- Disclose synthetic speech. Tell listeners when they are hearing AI-generated speech. Do not present generated audio as a genuine recording of a human speaker.
- Preserve provenance indicators. Keep any applicable metadata, watermarks, or other indicators of synthetic origin rather than stripping them out.
- Review the use case. A harmless narration feature and a voice system used for authentication, financial instructions, or sensitive decisions require different safeguards.
- Protect prompts and logs. A voice prompt may contain product details or internal design notes. Keep it in appropriate access-controlled systems.
OpenAI also notes that generated voices are not guaranteed to be unique. Another user may create a similar-sounding voice. Do not rely on a prompt-generated voice as proof of identity, authorization, or secure authentication.
Common Problems and How to Fix Them
The voice-creation request returns an error
Validate the endpoint, authentication header, JSON syntax, required fields, and prompt length. Confirm that the project has the required access. Read the returned error message and correct the underlying issue before retrying.
The voice was created, but Live does not use it
Confirm that you saved the actual voice ID returned by the API and that your session configuration references that exact ID. Check that the session is using a supported Live configuration and that the voice belongs to the expected project. Verify the current session schema rather than relying on an outdated snippet.
The voice sounds different from what the prompt suggests
Refine the prompt one variable at a time. Replace vague language with observable qualities, such as “measured pace,” “clear articulation,” or “medium pitch.” Remove conflicting instructions and compare the result using the same test script. Prompt wording guides generation but does not guarantee an exact performance.
The same voice is needed across multiple sessions
Save the returned identifier and reuse it. Do not create a new voice for every session unless there is a clear reason. Keep the original prompt and an internal description so the team can manage the voice over time.
The integration expects Text-to-Speech or Realtime support
Prompt-generated voices are currently supported only in Live. If your application must use a different endpoint, review OpenAI’s custom voice documentation for the audio-sample workflow and its consent requirements, eligibility, and supported endpoints. Do not assume that all custom voice types have identical capabilities.
Prompt-to-Voice vs. Recording-Based Custom Voices
OpenAI documents more than one way to create a custom voice, and the difference matters when choosing an architecture.
Prompt-to-Voice uses a written description and does not require a reference recording or consent recording for that workflow. Its generated voices are supported in Live.
Recording-based custom voices use an audio sample and a consent recording. They have different requirements and may be supported across Live, Text-to-Speech, Realtime, and Chat Completions audio output, subject to the applicable access and endpoint rules.
Choose based on your product needs, not on the assumption that one approach is universally better. If a text-described voice is sufficient and your application uses Live, Prompt-to-Voice may be a convenient route. If the product requires a particular permitted speaker’s recorded voice or another endpoint, investigate the recording-based workflow and its consent requirements. Confirm current eligibility before committing to either design.
A Practical Launch Checklist
Before releasing a custom AI voice, confirm that:
- The prompt describes an adult voice and avoids impersonating a specific person.
- The voice has been created successfully and the returned ID is stored securely.
- The application uses a supported GPT-Live integration.
- The team has tested pronunciation, pacing, clarity, and representative user tasks.
- Costs have been estimated using current Live pricing and realistic usage assumptions.
- Error handling covers authentication, validation, and session configuration.
- The product clearly discloses that the speech is AI-generated.
- Applicable provenance indicators are preserved.
- The team has a process for reviewing prompt changes and monitoring quality after launch.
Final Thoughts
OpenAI Prompt-to-Voice makes it possible to create a reusable synthetic voice from a text description without recording a reference sample. For developers building spoken assistants, that can shorten prototyping and make it easier to explore a consistent voice direction. The practical workflow is straightforward: write a clear brief, create the voice through the API or Playground, save the returned identifier, configure a supported Live session, and evaluate the voice with realistic test content.
The important boundaries are just as significant as the creative possibilities. Prompt-generated voices are supported in Live rather than every audio endpoint; speech generation still incurs normal session charges; voice creation has an organizational limit; and responsible use requires disclosure and safeguards against impersonation. Check the official documentation before implementation, and treat voice quality as something to test—not something a successful API call guarantees.
Official Resources
- OpenAI Custom Voices Guide
- OpenAI Create Voice API Reference
- OpenAI API Changelog
- OpenAI Release Notes
For related reading, see our practical guide to AI challenges and risk reduction and How to Use ChatGPT Effectively.