Scribe API
Submit audio recordings for AI transcription and clinical note generation. Scribe converts consultation audio into structured SOAP notes ready for review and approval.
POST
/v1/scribe/transcribeSubmit an audio file for transcription and clinical note generation. Accepts MP3, WAV, M4A, and WebM formats up to 100MB. Processing is asynchronous.
Request Body (multipart/form-data)
| Parameter | Type | Required | Description |
|---|---|---|---|
| audio | file | Required | Audio file (MP3, WAV, M4A, WebM; max 100MB) |
| patient_id | string | Required | Patient UUID for note association |
| doctor_id | string | Required | Attending doctor UUID |
| appointment_id | string | Optional | Associated appointment UUID |
| language | string | Optional | Audio language (default: en-IN). Supports: en, hi, ta, te, kn |
| note_type | string | Optional | Note format: soap, brief, detailed (default: soap) |
Example Request
curl -X POST "https://api.relaya.one/v1/scribe/transcribe" \
-H "Authorization: Bearer rlya_live_abc123" \
-F "audio=@consultation.mp3" \
-F "patient_id=pat_4jn7h2" \
-F "doctor_id=doc_9km3p1" \
-F "note_type=soap"Example Response
{
"data": {
"id": "note_3kv8m2",
"status": "processing",
"patient_id": "pat_4jn7h2",
"doctor_id": "doc_9km3p1",
"note_type": "soap",
"estimated_completion": "2026-07-25T10:02:00Z",
"created_at": "2026-07-25T10:00:00Z"
}
}Poll the note endpoint or configure a webhook for the scribe.note.ready event to be notified when processing is complete.
GET
/v1/scribe/notes/:idRetrieve a generated clinical note with full transcript and structured content.
Example Response
{
"data": {
"id": "note_3kv8m2",
"status": "ready",
"patient_id": "pat_4jn7h2",
"doctor_id": "doc_9km3p1",
"appointment_id": "apt_8xk2m9v3",
"note_type": "soap",
"content": {
"subjective": "Patient reports persistent lower back pain for 2 weeks...",
"objective": "BP 120/80, Temperature 98.6F, Tenderness in lumbar region...",
"assessment": "Mechanical lower back pain, likely muscular strain...",
"plan": "1. Prescribed Ibuprofen 400mg TID x 5 days\n2. Physiotherapy referral..."
},
"transcript": "Doctor: Good morning, how are you feeling today?\nPatient: ...",
"duration_seconds": 480,
"language": "en-IN",
"approved": false,
"created_at": "2026-07-25T10:00:00Z",
"completed_at": "2026-07-25T10:01:45Z"
}
}POST
/v1/scribe/notes/:id/approveApprove a clinical note for inclusion in the patient record. Once approved, the note is immutable and becomes part of the official medical record.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| edits | object | Optional | Optional edits to note content before approval |
| approved_by | string | Required | Doctor or staff UUID who reviewed |
Example Request
curl -X POST "https://api.relaya.one/v1/scribe/notes/note_3kv8m2/approve" \
-H "Authorization: Bearer rlya_live_abc123" \
-H "Content-Type: application/json" \
-d '{
"approved_by": "doc_9km3p1"
}'Error Codes
| Code | Status | Description |
|---|---|---|
| 400 | bad_request | Invalid audio format or missing required fields |
| 401 | unauthorized | Invalid or missing API key |
| 404 | not_found | Note not found |
| 409 | conflict | Note already approved (immutable) |
| 413 | payload_too_large | Audio file exceeds 100MB limit |
| 422 | processing_failed | Audio could not be processed |
| 429 | rate_limited | Too many requests |