.mp3, and receive the transcript either pushed to a webhook you host or pulled via polling.
API access is exclusive to Business-plan customers. Don’t have access yet? Request it here and we’ll be in touch.
🌐 Base URL
All API endpoints are served from a single base URL:| Endpoint | Full URL |
|---|---|
POST /api/createTranscription | https://app.xosum.am/api/createTranscription |
GET /api/getTranscription | https://app.xosum.am/api/getTranscription?docId=... |
🔐 Authentication
To use the API you need:- A Business plan account at app.xosum.am. If you don’t have one yet, request access.
- A Bearer API key, generated from your account settings.
- Webhook (push) — set a
webhookURLandwebhookSecretin your account. Xosum will POST the transcript to your URL when it’s ready. Lower latency, but you must host a publicly reachable endpoint. - Polling (pull) — no webhook setup needed. Poll
GET /api/getTranscriptionuntil the job is done. Simpler when you can’t expose a public receiver (e.g. you’re behind Cloudflare with strict IP-whitelisting requirements).
🛠️ Create a Transcription Job
POST https://app.xosum.am/api/createTranscription
This endpoint generates a signed upload URL and a docId you’ll use to track the job.
Required Headers
Authorization: Bearer YOUR_API_KEY
Required JSON Body
type field is required and also controls how the resulting transcript is shaped:
single_voice→ plain transcript, no speaker labels. Use for monologues, dictations, single-speaker recordings.phone_call→ diarized transcript with inlineԽոսնակ 1:/Խոսնակ 2:speaker labels, pinned to exactly two speakers. Use for two-party conversations.
Example cURL Request
Sample Successful Response
uploadUrl is a pre-signed URL valid for 1 hour. Upload your file within that window.
🎧 Upload the Audio File
Use aPUT request to upload your MP3 file to the uploadUrl.
Upload must be an MP3 file. Other formats like WAV/M4A are not supported via the API.
📬 Option A — Receive the Transcript via Webhook
Once the audio is transcribed, Xosum sends aPOST to your webhook URL (the one you configured at app.xosum.am). The path /your-webhook-url referenced in the API reference is just a placeholder — Xosum does not host this endpoint, you do.
Sample Webhook Payload
- Validate the
secretmatches what you configured, and reject otherwise. - Return
200 OKquickly — process asynchronously if needed. - Be prepared for two possible content shapes in
transcription: plain text forsingle_voice, or diarized text withԽոսնակ N:labels forphone_call. The JSON envelope is identical; only the text content differs.
🔄 Option B — Poll for the Transcript
If you can’t host a public webhook receiver, pollGET /api/getTranscription?docId=... until status becomes transcribed or failed.
Polling rules to follow
- Cadence: every 5–10 seconds per in-flight job is the sweet spot. Most
single_voicejobs finish in seconds;phone_calljobs may take a few minutes. - Rate limit: 60 requests / minute / API key, fixed wall-clock-minute window (counter resets at the top of each minute, not as a rolling window).
- On
429: the response includes aRetry-Afterheader (seconds until the next window opens). Sleep at least that long before retrying. - Stop polling once
statusistranscribedorfailed— these are terminal. - Cross-tenant safety: if you ask about a
docIdthat doesn’t belong to your API key, you’ll get a404(not403) — the same response as a docId that doesn’t exist at all. This is intentional and you don’t need to handle it specially.
📚 Notes & Constraints
| Item | Value |
|---|---|
| File format | MP3 only (other formats are rejected) |
| Upload URL validity | 1 hour from job creation |
| Max duration | Limited by your account’s remaining seconds |
| Languages | Armenian (hy-AM) |
| Transcription latency | Seconds (single_voice) to a few minutes (phone_call) |
| Polling rate limit | 60 requests/minute per API key (fixed window) |
| Webhook retries | None — implement idempotent handling on your side; fall back to polling if your receiver was down |
💻 End-to-End Code Examples
Python (requests)
Node.js (axios)
🧪 Testing
- Use Postman or
curlto simulate requests. - For webhook testing, set a development URL like webhook.site so you can inspect inbound payloads without standing up infrastructure.
- For polling, the recommended approach is to use the example loops above against a small test recording — the round-trip on a short
single_voiceclip is typically just a few seconds.
📞 Need Help?
- Don’t have API access yet? Request it here.
- Already a customer with a question? Email support@xosum.am or visit the docs.
