Skip to content

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.

BodyContent-TypeUse when
Raw audio bytesaudio/* or application/octet-streamYou have the file in memory or on disk.
Multipart form, field filemultipart/form-dataYou upload from a form or a tool that prefers multipart.
JSON {"url": "https://..."}application/jsonThe 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-v1
    The model: shihab-asr-v1 (Shihab Voice), the only one (you can leave it out).
  • languagestringOptionalDefault: ar
    ar, or ar-XX for 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 returns 400 unsupported_language.
  • numeralsbooleanOptionalDefault: false
    false: numbers as Arabic words, the way they were spoken. true: digits («خمسة وعشرين شيكل» becomes «25 شيكل»). See numerals.
  • timestamps"segment" | "none"OptionalDefault: segment
    segment returns 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. none returns an empty segments array.
  • tagstring (repeatable)Optional
    Up to 5 tags of up to 64 characters, e.g. ?tag=support&tag=branch-7. Echoed back in tags and shown in your request logs.
Parameter

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_idstringRequired
    Unique ID of the request (req_...). Same as the X-Request-Id header.
  • object"transcription"Required
    Object type.
  • createdstringRequired
    ISO 8601 time the request was received (UTC).
  • modelstringRequired
    The model that ran: shihab-asr-v1.
  • model_versionstringRequired
    Exact model version, e.g. 1.1.0.
  • languagestringRequired
    The language you sent, e.g. ar or ar-EG.
  • durationnumberRequired
    Audio duration in seconds.
  • transcriptstringRequired
    The full transcript.
  • segments[]{ id, start, end, text }Required
    Timed segments in seconds from the start of the audio. Empty when timestamps=none.
  • tagsstring[]Required
    The tags you sent.
  • usage{ audio_seconds, billed_seconds, cost_usd }Required
    What you were charged. billed_seconds is the audio rounded up to the next second (minimum 1); cost_usd is a decimal string.
  • processing_msintegerRequired
    Time we spent transcribing, in milliseconds.
Field

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.