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
| Name | Type | Required | Description |
|---|---|---|---|
model | string | Yes | A speech model id. |
input | string | Yes | The text to speak. |
response_format | string | No | The 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
| Name | Type | Required | Description |
|---|---|---|---|
model | string | Yes | A transcription model id. |
file | file | Yes | The audio file. |
response_format | string | No | json 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
Foundry documentation