API reference

Audio

Speech synthesis, transcription and music.

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 wav.

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": "kokoro-82m",
    "input": "Hello from USDF.",
    "response_format": "wav"
  }'

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; verbose_json and diarized_json on some models.

POST /v1/audio/transcriptions

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

POST/v1/audio/music

Returns one track as MP3, of the length the model makes. The receipt is in the x-receipt header, as base64url JSON.

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

NameTypeRequiredDescription
modelstringYesA music model id.
promptstringYesThe music to make: genre, mood, instruments and what the song is about.
lyricsstringNoThe words to sing. Left out, the model writes its own or none.
instrumentalbooleanNoTrue for a track with no vocals, and then no lyrics.
response_formatstringNomp3, the only format served.

POST /v1/audio/music

curl
curl -X POST https://api.usdf.fi/v1/audio/music \
  -H "Authorization: Bearer $USDF_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "acestep-v15-xl-sft",
    "prompt": "A calm solo piano piece, slow and warm",
    "instrumental": true,
    "response_format": "mp3"
  }'
Foundry documentation

Confirm it's you

Confirm to continue the action you started.

Checking confirmation options…