Skip to content
Docs

External API

Transcribe audio in the background

Transcribe a long recording in the background, then get the text from a webhook or by checking the job.

Transcribes a recording in the background and gets you the text later – for example, a recorded call that takes too long to transcribe while you wait. Proto tells your webhook when it’s done, or you can check the job yourself. Each recording uses 1 voice credit, and if the job fails, the credit is given back. Not sure how to send a request? See Make your first request.

Send the recording

Send a POST request to:

https://v3-api.proto.cx/api/platform/v1/voice/YOUR_TEAMSPACE_ID/asr-async

Send the recording as a form, with these fields. In the address, replace anything starting with YOUR_ with your own:

FieldRequiredWhat it is
fileYesThe recording – MP3 or WAV, up to 15 MB. Give the file’s type: audio/mpeg for MP3, or audio/wav for WAV.
langYesThe language spoken, such as en. See the languages Proto understands.
callback_urlNoA public https:// address for Proto to send the result to, up to 2048 characters, such as https://example.com/hooks/proto-asr

Proto replies 202 Accepted with the job:

{
  "job_id": "01J0JOBABCDEF1234567890ABC",
  "status": "pending",
  "lang": "en",
  "callback_url": "https://example.com/hooks/proto-asr"
}

Keep job_id – you need it to get the result. status is always pending at this point, and callback_url is the address you sent, or null.

Get the result

How do you want to get the result?

When the job finishes or fails, Proto sends a POST request to your callback_url, with the job as JSON:

{
  "audio_length": 4.82,
  "error": null,
  "job_id": "01J0JOBABCDEF1234567890ABC",
  "lang": "en",
  "status": "completed",
  "transcription": "Hello, I'd like to check the status of my order."
}
FieldWhat it is
statuscompleted or failed
transcriptionThe text, once the job is completed. Otherwise null.
audio_lengthHow long the recording is, in seconds
errorWhy the job failed, such as ASR service returned an empty result for a silent recording. Otherwise null.

When it arrives:

  • Check it came from Proto. Work out the HMAC-SHA256 of the raw request body, using your takeover secret as the key. It must match the hex value after sha256= in the X-Proto-Signature header. The body arrives on one line, so check the raw body, not a reformatted copy like the one above.
  • Reply with any 2xx status. Proto doesn’t read your reply’s body. If you don’t reply with 2xx, Proto tries again up to 5 times, 10 seconds apart.
  • Ignore repeats. The same result can arrive more than once – use job_id to ignore one you’ve already had.

Send a GET request to:

https://v3-api.proto.cx/api/platform/v1/voice/YOUR_TEAMSPACE_ID/asr-async/YOUR_JOB_ID

In the address, replace anything starting with YOUR_ with your own – YOUR_JOB_ID is the job_id Proto gave you when you sent the recording. While status is pending, wait a few seconds and ask again. Each check counts towards your request limit, but doesn’t use a credit.

{
  "job_id": "01J0JOBABCDEF1234567890ABC",
  "status": "completed",
  "lang": "en",
  "transcription": "Hello, I'd like to check the status of my order.",
  "audio_length": 4.82,
  "error": null,
  "created_at": "2026-11-18T09:00:00.123456+00:00",
  "updated_at": "2026-11-18T09:00:07.654321+00:00"
}
FieldWhat it is
statuspending, completed or failed. A job that hasn’t finished after 30 minutes fails.
transcriptionThe text, once the job is completed. Otherwise null.
audio_lengthHow long the recording is, in seconds. null until the job is completed.
errorWhy the job failed, such as ASR service returned an empty result for a silent recording. Otherwise null.
created_at, updated_atWhen you sent the recording and when the job last changed, in UTC

Errors

You getWhat it means
400The callback_url isn’t a public https:// address, the language isn’t supported or the file is over 15 MB or the wrong type. The message says which.
403Your workspace has no voice credits left.
404When checking a job – no job with this ID is in your teamspace.

For errors any request can return, see If something goes wrong.

Stuck? Ask Advisor in the Proto dashboard, or contact us.

© Proto