Create Voice
Create Voice
POST /v1/audio/voices
Creates a custom voice for text-to-speech. Requires a voice consent recording first.
Request
Content-Type: application/json
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Name for the custom voice |
description | string | No | Description of the custom voice |
consent_id | string | Yes | ID of the voice consent recording uploaded via /v1/audio/voice_consents |
curl -X POST "https://api.osmapi.com/v1/audio/voices" \
-H "Authorization: Bearer $OSM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "my-custom-voice",
"description": "A custom voice for my app",
"consent_id": "consent_abc123"
}'Notes
- Request body is passed through to OpenAI's Voices API. See OpenAI documentation for the full parameter schema.
- Requires an OpenAI provider key with custom voice permissions
- Voice consent must be uploaded first via
/v1/audio/voice_consents - See OpenAI Custom Voices documentation for details
How is this guide?