Audio

Create Transcription

Turn speech into text: voice notes, clips and call recordings, with the spoken language detected.

Synchronous. Send the audio as a multipart file (OpenAI SDK compatible) or as JSON with a public https url. Formats: wav, mp3, m4a and mp4, ogg and opus, flac, webm and more; up to 10 MB and 5 minutes per request. The audio is sent for recognition inline and never stored.

Billed by the second of audio at $0.0042 per minute on spicy-transcribe-1 (minimum $0.0001 per request), settled to the length the recognizer measured. Nothing is generated, so there is no content block; a file that cannot be decoded is a 400 and nothing is charged. When recognition is unavailable the call returns 503, nothing charged: retry in a few seconds. Sandbox keys get a fixture transcript and pay nothing.

POST/v1/audio/transcriptionsTry it
Create Transcription
cURL
curl --request POST \
  --url https://api.spicyapi.com/v1/audio/transcriptions \
  --header 'Authorization: Bearer $SPICYAPI_KEY' \
  --form 'file=@voice-note.m4a' \
  --form 'model=spicy-transcribe-1'

# or from a public URL
curl --request POST \
  --url https://api.spicyapi.com/v1/audio/transcriptions \
  --header 'Authorization: Bearer $SPICYAPI_KEY' \
  --header 'Content-Type: application/json' \
  --data '{ "url": "https://example.com/voice-note.mp3", "language": "English" }'
200
JSON
{
  "id": "sj_4b8e21d7c3a9f0e1b2d4c6a8",
  "object": "audio.transcription",
  "model": "spicy-transcribe-1",
  "text": "Hey, it's me. I just got home, call me when you're free tonight.",
  "language": "en",
  "duration_s": 6,
  "cost_usd": 0.00042
}

Authorizations

Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>, where <token> is your SpicyAPI key (sk-spicy-…). Create one in the dashboard under API Keys.

Body

multipart/form-data

Send exactly one of file (multipart/form-data) or url (an application/json body).

filebinarymultipart

The audio file, at most 10 MB and 5 minutes.

urlstringjson

Public https URL of the audio, fetched on your behalf (same limits; private, loopback and plain-IP hosts are refused).

modelstring

spicy-transcribe-1, the default.

languagestring

Optional hint when you know the language: English, Chinese, German, Italian, Portuguese, Spanish, Japanese, Korean, French or Russian. Omit to detect it.

Response

200 · application/json

Transcription

idstringrequired

Request id.

objectstringrequired

Always audio.transcription.

modelstringrequired

The model that transcribed.

textstringrequired

The transcript.

languagestring | nullrequired

The language detected (or the hint you sent), as a short code such as en.

duration_snumberrequired

Seconds of audio billed.

cost_usdnumberrequired

What this request cost, in US dollars, already debited from your balance.

Was this page helpful?