Skip to content

API reference

Transcribe audio

POST /v1/listen: synchronous transcription.

POST /v1/listen

POSThttps://api.shihab.co.uk/v1/listen

Transcribes up to 30 minutes of audio and returns the result in the same request. Scope: listen. Guide: Pre-recorded audio.

Body

  • audio/*binaryOptional
    Raw audio bytes (or application/octet-stream).
  • filemultipartOptional
    multipart/form-data field with the audio file.
  • urlstring (JSON)Optional
    A public HTTPS URL to fetch, in an application/json body.
Parameter

Query parameters

  • 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

Example

# 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"}'

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

Errors

400 invalid_parameter, unsupported_language, unknown_model, invalid_url, url_fetch_failed, audio_too_short · 401 · 402 insufficient_credits · 413 file_too_large, audio_too_long · 415 unsupported_audio · 429 · 503 capacity_exceeded, engine_unavailable. All codes.

Need help? Email [email protected] or message us on WhatsApp.