API reference
Audio
Speech synthesis, transcription and music.
POST/
Returns audio for the input text.
Auth: API key, or pay per request under https:/
| Name | Type | Required | Description |
|---|---|---|---|
model | string | Yes | A speech model id. |
input | string | Yes | The text to speak. |
response_ | string | No | The 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/
Returns the text of an uploaded audio file. Sent as multipart form data.
Auth: API key, or pay per request under https:/
| Name | Type | Required | Description |
|---|---|---|---|
model | string | Yes | A transcription model id. |
file | file | Yes | The audio file. |
response_ | string | No | json 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=jsonPOST/
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:/
| Name | Type | Required | Description |
|---|---|---|---|
model | string | Yes | A music model id. |
prompt | string | Yes | The music to make: genre, mood, instruments and what the song is about. |
lyrics | string | No | The words to sing. Left out, the model writes its own or none. |
instrumental | boolean | No | True for a track with no vocals, and then no lyrics. |
response_ | string | No | mp3, 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