curl --request POST \
--url https://api.openai.com/v1/audio/speech \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "<string>",
"input": "<string>",
"instructions": "<string>",
"voice": "ash",
"response_format": "mp3",
"speed": 1
}'
This response does not have an example.
Generates audio from the input text.
curl --request POST \
--url https://api.openai.com/v1/audio/speech \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "<string>",
"input": "<string>",
"instructions": "<string>",
"voice": "ash",
"response_format": "mp3",
"speed": 1
}'
This response does not have an example.
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
OK
The response is of type file
.
Was this page helpful?