curl https://api.iodine.dev/v1/stt \
-H "Authorization: Bearer $IODINE_API_KEY" \
-F file=@call.mp3 \
-F language=en{
"text": "Hi, I'm calling about my order from last week.",
"language": "en",
"duration": 4.2
}Request
Multipart form fields:
| Field | ||
|---|---|---|
file | required | The recording: WAV, MP3, FLAC or OGG, up to 25 MB and 10 minutes. Split longer recordings. |
language | optional | The language spoken, as a code like en, es, ja or pt. Default en. Set it for anything that isn't English: the audio is transcribed in this language. |
response_format | optional | json (default) or text for the transcript alone, as plain text. |
The response has an X-Request-Id header, like every request.
With OpenAI's SDK
/v1/audio/transcriptions is the same endpoint at OpenAI's path, and fields we don't use (model, prompt) are ignored, so existing code needs only a new base URL and key:
import os
from openai import OpenAI
client = OpenAI(base_url="https://api.iodine.dev/v1", api_key=os.environ["IODINE_API_KEY"])
with open("call.mp3", "rb") as f:
result = client.audio.transcriptions.create(model="whisper-1", file=f, language="en")
print(result.text)Pricing
$0.00015 per minute of audio ($0.009 an hour), measured from the recording you send, to the millionth of a dollar. Requests that fail on our side cost nothing. It draws on the same credit balance as text to speech, and shows in the console's usage as stt.
Your audio
Recordings are transcribed in memory and never stored, whatever your Zero Data Retention setting; we keep only the request's metadata (length, language, cost). See Billing and data.