
🇺🇸 English

🇺🇸 English
- Chat Models
- Chat
- OpenAI-Realtime
- Completions
- Audio
- Image generation
- Embeddings
- Models
- Help
- Anthropic
- Suno
- Udio
- Midjourney API
- Flux
- Recraft
- Ideogram
- Luma
- Runway
- Kling-API
- Replicate
- MiniMax
Speech
POST
/v1/audio/speech
Last modified:2025-02-05 11:13:45
Request
Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.Example:
Authorization: Bearer ********************
Header Params
Content-Type
string
required
Example:
application/json
Authorization
string
required
Example:
Bearer {{YOUR_API_KEY}}
Body Params application/json
model
string
required
input
string
required
voice
string
required
response_format
string
optional
speed
number
optional
Example
{
"model": "tts-1",
"input": "The quick brown fox jumped over the lazy dog.",
"voice": "alloy"
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request POST '/v1/audio/speech' \
--header 'Authorization: Bearer ' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "tts-1",
"input": "The quick brown fox jumped over the lazy dog.",
"voice": "alloy"
}'
Responses
🟢200成功
application/json
Body
object {0}
Example
{
"model": "tts-1",
"input": "The quick brown fox jumped over the lazy dog.",
"voice": "alloy"
}