Skip to content

Get the transcription result

GEThttps://gptunnel.ru/v1/audio/transcriptions

Returns the current transcription status and result. For automatic delivery, set callback_url when you create the task.

Request headers

ParameterTypeRequired?Description
AuthorizationstringRequiredAPI key

Request parameters

ParameterTypeRequired?Description
task_idstringRequiredThe id field from the task creation response

Set GPTUNNEL_API_KEY to your API key and TASK_ID to the id field from the task creation response. The Python example requires requests, and the cURL example requires jq.

import os
import requests
response = requests.get(
'https://gptunnel.ru/v1/audio/transcriptions',
headers={'Authorization': os.environ['GPTUNNEL_API_KEY']},
params={'task_id': os.environ['TASK_ID']},
timeout=30,
)
response.raise_for_status()
task = response.json()
print(task['status'])
if task['status'] == 'done':
for channel in task['result']['results']['channels']:
alternatives = channel.get('alternatives') or []
if alternatives:
print(alternatives[0].get('transcript', ''))
elif task['status'] == 'failed':
print(task.get('error_title'), task.get('error_description'))

The example shows the result of transcribing the sample recording with deepgram-whisper-tiny. The response reports whisper-tiny in provider.

{
"code": 0,
"id": "6a47bb78fb3f0d852e64c8e3",
"status": "done",
"result": {
"provider": "whisper-tiny",
"metadata": {
"duration": 1.8840625,
"channels": 1
},
"results": {
"channels": [
{
"alternatives": [
{
"transcript": "The sky is blue today.",
"confidence": 0.9200794
}
]
}
]
}
},
"error_title": null,
"error_description": null
}
Status What to Do
processing The result is not ready (result: null). Continue polling or wait for the webhook.
done Read the result and stop polling.
failed Read error_title and error_description and stop polling.

The statuses done and failed are final.

If you supplied callback_url when you created the task, the API sends the result to that URL in a POST request when the task reaches done or failed. Both the polling response and the webhook body include the task status, result, and the same error_title and error_description fields. You can use those fields to handle errors in either case. Only the polling response includes code.

{
"id": "6a47bb78fb3f0d852e64c8e3",
"status": "done",
"url": null,
"result": {
"provider": "whisper-tiny",
"metadata": { "duration": 1.8840625, "channels": 1 },
"results": {
"channels": [
{ "alternatives": [{ "transcript": "The sky is blue today.", "confidence": 0.9200794 }] }
]
}
},
"error_title": null,
"error_description": null
}

When status is failed, error_title contains a machine-readable reason code and error_description explains the failure.

error_title Cause Should I repeat the request?
SOURCE_UNREACHABLE The transcription provider could not download the file from audio_url. The host may block external servers, require cookies, or filter requests by User-Agent. No. First move the file to a host that the provider can reach without signing in.
UNSUPPORTED_MEDIA The provider does not support the file codec or container. No. Convert the file to a supported format (e.g. mp3 or wav).
TIMEOUT_TRY_AGAIN_LATER Temporary service malfunction or overload. Yes - repeat the request later.
EXCEPTION Other processing error. You can retry. If the error persists, contact support.