202 Accepted
with the job at once, then read it with
GET /v2/transcriptions/{id} until its status is
completed or failed. For an introduction, see
Transcribe recorded calls.
Base URL https://sandbox.voice.miraiminds.co. Every request carries
Authorization: Bearer sk_live_…, your workspace API key. A job belongs to the
workspace whose key created it.
The transcription object
A finished job, asGET /v2/transcriptions/{id} returns it:
text, segments, draft and diarization appear only on
GET /v2/transcriptions/{id}. The create response and
the list carry every other field.
Segments
With
words: true, each segment also carries its words:
Diarization
Statuses
Statuses only move forward. There is no progress percentage. A job usually
completes in about 10 seconds plus 15% of the recording’s length, and speaker
separation adds about a second. A draft is readable a few seconds after
decoding ends. A job that has not finished 24 hours after it was accepted fails
with
timed_out.
Why a job failed
A failed job is never charged. Branch on
error.code, allow for codes not
listed here, and show error.message if you need a sentence for a person.
A failed job
Create a transcription
- As
multipart/form-datawith the file infile. Up to 45 MB. - As
application/jsonwith anhttpsurlthat we fetch. Up to 200 MB.
Upload a file
Any other form field is refused with
400 invalid_request.
- cURL
- Python
- Node.js
Send a link
The same options as JSON, withurl in place of the file. diarize and
words are JSON booleans, and vocabulary can also be an array of strings.
We fetch the link once, before we answer, and do not store it. It must point
to a public address on the default
https port, with no user name or password
in it, and answer 200. Redirects are followed only to https addresses, and
only a few of them. The download has to finish within 5 minutes, so give a
pre-signed link at least that long to live.
- cURL
- Python
- Node.js
Response
202 Accepted, with a Location header and the job:
202 Accepted
Idempotency
Send anIdempotency-Key header (up to 255 characters) with a value from your
own records, such as your call ID. A request with a key your workspace has
already used returns the job that key created, with 202 and the job’s current
status, and makes no second job and no second charge. That makes a request that
timed out safe to retry.
Keys don’t expire, and a reused key returns the original job even if you send
a different file. If the transcription service refused the recording, the job
is not created and the key can be used again.
Errors
Capacity and the wallet are checked before the recording is read.
No refusal is charged, and a refused request does not count towards the
hourly limit.
Get a transcription
status is completed or failed. Start quickly, since
short recordings often finish in seconds, then slow down to every few seconds.
- cURL
- Python
- Node.js
200 OK: the transcription object. While the
job is merging, it carries draft:
200 OK (merging)
segments when the job completes.
A completed job is charged whether or not anyone reads it, so you can stop
polling at any time. If a finished transcript is no longer kept, the job still
answers completed with its cost, but without text, segments and
diarization. Copy transcripts into your own storage when they complete.
List transcriptions
text, segments, draft and diarization; read a
job by its ID for those.
- cURL
- Python
- Node.js
200 OK
next_cursor is null on the last page. A limit out of range, a cursor
that is not a transcription ID, or an unknown status returns
400 invalid_request. See pagination.
Billing
Transcription costs ₹18 per hour of audio, charged once when a job completes. A degraded or failed job is free. The charge is the length of the recording in milliseconds times the rate, rounded up to the paisa:cost.amount_inr on the job and the wallet
transaction are what was charged:
GET /v2/wallet/transactions
Starting a job needs a wallet balance above zero. Nothing is held while it
runs. See pricing for the rest of the
rules.