Soniox
Docs
API reference/Transcriptions

Create transcription

Create a new transcription.

POST
/v1/transcriptions

Authorization

AuthorizationRequiredBearer <token>

In: header

Request body

application/jsonRequired
modelRequiredstring

The model to use for the transcription.

Maximum length: 50
audio_urlstring

The URL of the audio file to transcribe (cannot be specified if file_id is specified).

file_idstring

The ID of the uploaded file to transcribe (cannot be specified if audio_url is specified).

language_hintsarray<string>

Hints for the expected languages in the audio. If language_hints is not specified, the languages will be detected automatically.

enable_speaker_tagsboolean

Identifies different speakers in the audio and automatically adds speaker tags whenever the speaker changes.

contextstring

An extra context for the transcription. With the context you can hint how words are spelled and formatted.

webhook_urlstring

The URL to which we send webhook requests. The request will be send a transcript is completed or failed.

webhook_auth_header_namestring

The header name to be sent with the transcript completed or failed webhook requests.

webhook_auth_header_valuestring

The header value to send back with the transcript completed or failed webhook requests for added security.

client_reference_idstring

A string provided by the client to track the uploaded file. It can be an ID, a JSON string, or any other text. This value can be used for reference in future API requests or for internal mapping within the client’s systems. The value does not have to be unique. If not provided, it will remain unspecified.

Response body

201

Created transcription.

idRequiredstring

The unique identifier of the transcription.

Format: "uuid"
statusRequiredstring

The status of your transcript. Possible values are queued, processing, completed or error.

created_atRequiredstring

When the transcription was created.

Format: "date-time"
modelRequiredstring

The model to use for the transcription.

Maximum length: 50
audio_urlstring

The URL of the audio file to transcribe.

file_idstring

The ID of the uploaded file to transcribe.

filenameRequiredstring

Name of the file.

language_hintsarray<string>

Hints for the expected languages in the audio. If language_hints is not specified, the languages will be detected automatically.

enable_speaker_tagsRequiredboolean

Identifies different speakers in the audio and automatically adds speaker tags whenever the speaker changes.

contextstring

An extra context for the transcription. With the context you can hint how words are spelled and formatted.

audio_duration_msinteger

The duration of the audio in milliseconds. The duration will only be available when the file is processed.

error_messagestring

The error message (e.g. audio download failed, invalid audio file).

webhook_urlstring

The URL to which we send webhook requests. The request will be send a transcript is completed or failed.

webhook_auth_header_namestring

The header name to be sent with the transcript completed or failed webhook requests.

webhook_auth_header_valuestring

The header value to send back with the transcript completed or failed webhook requests for added security. This value will never be returned in its original form. Instead, a masked value will be shown, such as: "webhook_auth_header_value": "******************"

webhook_status_codeinteger

The status code we received from your server when delivering the transcript completed or failed webhook request, if a webhook URL was provided.

client_reference_idstring

A string provided by the client to track the uploaded file. It can be an ID, a JSON string, or any other text. This value can be used for reference in future API requests or for internal mapping within the client’s systems. The value does not have to be unique. If not provided, it will remain unspecified.

Errors

Created transcription.

{
  "id": "73d4357d-cad2-4338-a60d-ec6f2044f721",
  "status": "queued",
  "created_at": "2024-11-26T00:00:00Z",
  "model": "stt-async-preview",
  "audio_url": "https://soniox.com/media/examples/coffee_shop.mp3",
  "file_id": null,
  "filename": "coffee_shop.mp3",
  "language_hints": [
    "en",
    "fr"
  ],
  "context": "extra context for the transcription",
  "audio_duration_ms": 0,
  "error_message": null,
  "webhook_url": "https://example.com/webhook",
  "webhook_auth_header_name": "Authorization",
  "webhook_auth_header_value": "******************",
  "webhook_status_code": null,
  "client_reference_id": "some_internal_id"
}