Skip to main content

MAI Transcribe 2 speech to text API

Create an API key in your account, then POST audio to this site. The free plan cannot call the API. Successful jobs use the same credits as the website: 1 credit ≈ 1 minute, rounded, 1 credit minimum.

Call the API

Send a Bearer token and a multipart file. Include duration in seconds so we can check credits before the model runs. Optional mode is verbatim (default, spoken wording) or smart (readable). Optional phrases is a comma or newline list of up to 100 terms. Failed jobs are not charged.

POST https://maitranscribe2.com/api/v1/transcribe

Create an API key

Example request

curl -X POST https://maitranscribe2.com/api/v1/transcribe \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@interview.m4a" \
  -F "duration=182" \
  -F "mode=verbatim" \
  -F "phrases=Lisinopril,Pharmacy Support"

Successful response

HTTP 200 with JSON. text is the full transcript. segments are timed lines with optional speaker. mode echoes verbatim or smart. credits_used and credits_remaining are the wallet after this job.

{
  "ok": true,
  "text": "Let’s start with the Q3 budget review.",
  "segments": [
    { "start": 6.0, "end": 12.4, "text": "Let’s start with the Q3 budget review.", "speaker": "Daniel" }
  ],
  "mode": "verbatim",
  "credits_used": 3,
  "credits_remaining": 297
}

Error codes

401 auth

Missing or invalid API key. Create a new key in Settings → API keys.

403 plan

Free accounts cannot call the API. Buy Plus, Pro, or any credit pack.

402 credits

Not enough credits. The JSON includes credits_needed and credits_remaining.

400 validation

No file, duration missing, unsupported type, or over plan size/duration. Use MP3, WAV, M4A, FLAC, or MP4.

502 / 503 upstream

The model did not return text, or the provider is down. Credits were not used. Retry with backoff.

Limits, retries, and billing

File and credit limits

Same caps as the website: Plus 30 minutes / 50 MB, Pro 60 minutes / 50 MB. Throughput is gated by your remaining credits, not a separate published QPS. There is no sandbox URL; use a small file against production.

Retries

Retry 502/503 with exponential backoff (1s, 2s, 4s). Do not retry 401 or 403 until you fix the key or plan. 402 needs more credits. Idempotency is not offered; a second successful POST bills again.

Billing

Credits debit only after a transcript is returned. Website and API share the wallet. Plan credits reset each billing period; pack credits do not expire.

Key security

Treat the key like a password. Rotate it if it leaked. Do not commit it. Requests are authenticated only by the Bearer token; CORS allows any Origin because this is a server-to-server API.