Skip to content

API reference

Transcription jobs

Create, get, list and delete async transcription jobs.

POST /v1/transcriptions

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

Creates an async job for up to 4 hours of audio and returns 202. Same body options and query parameters as /v1/listen, plus the fields below. Scope: transcriptions.

  • webhook_urlstringOptional
    HTTPS URL we POST the result to.
  • metadataobjectOptional
    Up to 2 KB, echoed back on the job and webhook. In multipart, a JSON string.
  • Idempotency-KeyheaderOptional
    Repeating a create with the same key within 24 hours returns the original job.
Parameter
# From a URL, with a webhook and your own metadata
curl https://api.shihab.co.uk/v1/transcriptions \
  -H "Authorization: Bearer $SHIHAB_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: call-1029" \
  -d '{
    "url": "https://example.com/recordings/call-1029.mp3",
    "webhook_url": "https://example.com/hooks/shihab",
    "metadata": {"call_id": "1029"}
  }'

# Or upload the file (metadata is a JSON string in multipart)
curl "https://api.shihab.co.uk/v1/transcriptions?numerals=true" \
  -H "Authorization: Bearer $SHIHAB_API_KEY" \
  -F [email protected] \
  -F webhook_url=https://example.com/hooks/shihab \
  -F 'metadata={"course": "arabic-101"}'
202 Accepted
{
  "id": "tr_01JAB3C4D5E6F7G8H9J0K1M2N3",
  "object": "transcription_job",
  "status": "queued",
  "created": "2026-10-12T12:00:00Z",
  "completed_at": null,
  "request_id": "req_01JAB3C4D5E6F7G8H9J0K1M2N4",
  "model": "shihab-asr-v1",
  "language": "ar",
  "tags": [],
  "metadata": { "call_id": "1029" },
  "webhook_url": "https://example.com/hooks/shihab"
}

GET /v1/transcriptions/{id}

GEThttps://api.shihab.co.uk/v1/transcriptions/{id}

Returns the job. status is queued, processing, completed or failed. Completed jobs add model_version, duration, transcript, segments, usage and processing_ms; failed jobs add error (code, message).

Terminal
curl https://api.shihab.co.uk/v1/transcriptions/tr_01JAB3C4D5E6F7G8H9J0K1M2N3 \
  -H "Authorization: Bearer $SHIHAB_API_KEY"
200 OK
{
  "id": "tr_01JAB3C4D5E6F7G8H9J0K1M2N3",
  "object": "transcription_job",
  "status": "completed",
  "created": "2026-10-12T12:00:00Z",
  "completed_at": "2026-10-12T12:00:41Z",
  "request_id": "req_01JAB3C4D5E6F7G8H9J0K1M2N4",
  "model": "shihab-asr-v1",
  "model_version": "1.1.0",
  "language": "ar",
  "tags": [],
  "metadata": { "call_id": "1029" },
  "webhook_url": "https://example.com/hooks/shihab",
  "duration": 412.6,
  "transcript": "السلام عليكم، معك خدمة الزبائن...",
  "segments": [{ "id": 0, "start": 0.0, "end": 6.1, "text": "السلام عليكم، معك خدمة الزبائن." }],
  "usage": { "audio_seconds": 412.6, "billed_seconds": 413, "cost_usd": "0.0826" },
  "processing_ms": 9120
}

GET /v1/transcriptions

GEThttps://api.shihab.co.uk/v1/transcriptions
  • limitintegerOptionalDefault: 20
    1 to 100 jobs per page.
  • starting_afterstringOptional
    A job id: lists jobs created before it (pass next_cursor from the previous page).
  • statusstringOptional
    queued | processing | completed | failed
Parameter
Terminal
curl "https://api.shihab.co.uk/v1/transcriptions?limit=20&status=completed" \
  -H "Authorization: Bearer $SHIHAB_API_KEY"
200 OK
{
  "object": "list",
  "data": [
    { "id": "tr_01JAB3C4D5E6F7G8H9J0K1M2N3", "object": "transcription_job", "status": "completed", "created": "2026-10-12T12:00:00Z" }
  ],
  "has_more": true,
  "next_cursor": "tr_01JAB3C4D5E6F7G8H9J0K1M2N3"
}

DELETE /v1/transcriptions/{id}

DELETEhttps://api.shihab.co.uk/v1/transcriptions/{id}

Deletes the stored transcript text. The billing record stays.

Terminal
curl -X DELETE https://api.shihab.co.uk/v1/transcriptions/tr_01JAB3C4D5E6F7G8H9J0K1M2N3 \
  -H "Authorization: Bearer $SHIHAB_API_KEY"
200 OK
{
  "id": "tr_01JAB3C4D5E6F7G8H9J0K1M2N3",
  "object": "transcription_job",
  "deleted": true
}

Webhook event

Sent to webhook_url when a job completes or fails, signed with Shihab-Signature. See verifying signatures.

HTTP
POST /hooks/shihab HTTP/1.1
Content-Type: application/json
Shihab-Signature: t=1760270441,v1=6a3f0c...e91b

{
  "type": "transcription.completed",
  "data": {
    "id": "tr_01JAB3C4D5E6F7G8H9J0K1M2N3",
    "object": "transcription_job",
    "status": "completed",
    "transcript": "السلام عليكم، معك خدمة الزبائن...",
    "metadata": { "call_id": "1029" }
  }
}

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