Transcribe audio
Pre-recorded audio
Transcribe a file or URL synchronously with POST /v1/listen.
POSThttps://api.shihab.co.uk/v1/listen
Send audio
Send audio in one of three ways. The response comes back when the transcript is ready, in the same HTTP request.
| Body | Content-Type | Use when |
|---|---|---|
| Raw audio bytes | audio/* or application/octet-stream | You have the file in memory or on disk. |
| Multipart form, field file | multipart/form-data | You upload from a form or a tool that prefers multipart. |
JSON {"url": "https://..."} | application/json | The audio is already online; we download it. |
# Raw audio bytes in the body
curl "https://api.shihab.co.uk/v1/listen?numerals=true&tag=support" \
-H "Authorization: Bearer $SHIHAB_API_KEY" \
-H "Content-Type: audio/wav" \
--data-binary @call.wav
# Multipart upload (field "file")
curl https://api.shihab.co.uk/v1/listen \
-H "Authorization: Bearer $SHIHAB_API_KEY" \
-F [email protected]
# Audio at a public URL
curl https://api.shihab.co.uk/v1/listen \
-H "Authorization: Bearer $SHIHAB_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/recordings/call-1029.mp3"}'Parameters
All parameters go in the query string.
modelstringOptionalDefault:shihab-asr-v1The model: shihab-asr-v1 (Shihab Voice), the only one (you can leave it out).languagestringOptionalDefault:arar, orar-XXfor any Arab country:ar-PS,ar-JO,ar-LB,ar-SY,ar-EG,ar-SA,ar-AE,ar-KW,ar-QA,ar-BH,ar-OM,ar-YE,ar-IQ,ar-SD,ar-LY,ar-TN,ar-DZ,ar-MA,ar-MR(any case). Anything else returns400 unsupported_language.numeralsbooleanOptionalDefault:falsefalse: numbers as Arabic words, the way they were spoken.true: digits («خمسة وعشرين شيكل» becomes «25 شيكل»). See numerals.timestamps"segment" | "none"OptionalDefault:segmentsegmentreturns timed segments cut at natural pauses: a recording of up to 30 s comes back as one segment, longer audio in pieces of up to 20 s.nonereturns an emptysegmentsarray.tagstring (repeatable)OptionalUp to 5 tags of up to 64 characters, e.g.?tag=support&tag=branch-7. Echoed back intagsand shown in your request logs.
Response
200 OK
{
"request_id": "req_01JA8Z6Q3K7M2V9X4T5R8N1B6C",
"object": "transcription",
"created": "2026-10-12T12:00:00Z",
"model": "shihab-asr-v1",
"model_version": "1.1.0",
"language": "ar",
"duration": 12.48,
"transcript": "مرحبا، بدي أطلب بيتزا كبيرة مع زيتون و فطر. قديش سعر التوصيل لنابلس؟",
"segments": [
{ "id": 0, "start": 0.0, "end": 7.92, "text": "مرحبا، بدي أطلب بيتزا كبيرة مع زيتون و فطر." },
{ "id": 1, "start": 7.92, "end": 12.48, "text": "قديش سعر التوصيل لنابلس؟" }
],
"tags": [],
"usage": { "audio_seconds": 12.48, "billed_seconds": 13, "cost_usd": "0.0026" },
"processing_ms": 812
}request_idstringRequiredUnique ID of the request (req_...). Same as theX-Request-Idheader.object"transcription"RequiredObject type.createdstringRequiredISO 8601 time the request was received (UTC).modelstringRequiredThe model that ran: shihab-asr-v1.model_versionstringRequiredExact model version, e.g. 1.1.0.languagestringRequiredThe language you sent, e.g. ar or ar-EG.durationnumberRequiredAudio duration in seconds.transcriptstringRequiredThe full transcript.segments[]{ id, start, end, text }RequiredTimed segments in seconds from the start of the audio. Empty when timestamps=none.tagsstring[]RequiredThe tags you sent.usage{ audio_seconds, billed_seconds, cost_usd }RequiredWhat you were charged.billed_secondsis the audio rounded up to the next second (minimum 1);cost_usdis a decimal string.processing_msintegerRequiredTime we spent transcribing, in milliseconds.
Limits
- Upload size: up to 100 MB per request. Larger files: pass a URL.
- Audio length: up to 30 minutes. Longer audio returns
413 audio_too_long; use async transcriptions (up to 4 hours). - Shortest audio: 0.2 seconds (
audio_too_short). - URLs must be public HTTPS addresses we can download (
invalid_url,url_fetch_failed). - Concurrency and rate limits: see rate limits.
Tips for best accuracy
- Send the original recording. Re-encoding to a low bitrate loses detail the model uses.
- Phone audio at 8 kHz is fine: the model was specialised on real calls.
- For two-sided calls recorded in stereo, send each side as its own request when you need to know who said what.
Need help? Email [email protected] or message us on WhatsApp.