POST
/
audio
/
speech
curl --request POST \
  --url https://geekai.dev/api/v1/audio/speech \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "tts-1",
  "input": "Hi, nice to meet you!",
  "voice": "alloy",
  "response_format": "mp3",
  "speed": 1,
  "retries": 0
}'
This response does not have an example.

Note: For speech model name settings, refer to the System Supported Speech Model List. The request/response parameter structure is fully compatible with OpenAI. When switching models, you only need to modify the corresponding model name. If the model request/response parameters are inconsistent with OpenAI, GeekAI will automatically convert and align them at the backend.

The response data format is fully compatible with OpenAI, returning the binary data of the audio file.

cURL Request Example

curl --location 'https://geekai.dev/api/v1/audio/speech' \
    --header 'Content-Type: application/json' \
    --header 'Authorization: {YOUR_GEEKAI_API_KEY}' \
    --data '{
        "input":"Hello! Nice to meet you!",
        "model":"tts-1",
        "voice":"ash",
        "speed":"1.0"
    }'

Authorizations

Authorization
string
header
required

token

Body

application/json

Response

200
audio/mpeg

successful response

mp3 format audio