API reference

Audio

Speech synthesis and transcription.

On this page

POST/v1/audio/speech

Returns audio for the input text.

Auth: API key, or pay per request under https://api.usdf.fi/x402

NameTypeRequiredDescription
modelstringYesA speech model id.
inputstringYesThe text to speak.
response_formatstringNoThe audio format, for example mp3.

POST /v1/audio/speech

curl
curl -X POST https://api.usdf.fi/v1/audio/speech \
  -H "Authorization: Bearer $USDF_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "<speech model>",
    "input": "Hello from USDF.",
    "response_format": "mp3"
  }'

POST/v1/audio/transcriptions

Returns the text of an uploaded audio file. Sent as multipart form data.

Auth: API key, or pay per request under https://api.usdf.fi/x402

NameTypeRequiredDescription
modelstringYesA transcription model id.
filefileYesThe audio file.
response_formatstringNojson or text.

POST /v1/audio/transcriptions

curl
curl -X POST https://api.usdf.fi/v1/audio/transcriptions \
  -H "Authorization: Bearer $USDF_API_KEY" \
  -F model=<transcription model> \
  -F file=@meeting.mp3 \
  -F response_format=json