Create transcription
Creates a new transcription.
Headers
Authorization
RequiredBearer <SONIOX_API_KEY>Request
application/json
Requiredmodel
RequiredstringSpeech-to-text model to use for the transcription.
32
audio_url
stringURL of the audio file to transcribe. Cannot be specified if file_id
is specified.
4096
Pattern: "^https?://[^\\s]+$"
file_id
stringID of the uploaded file to transcribe. Cannot be specified if audio_url
is specified.
"uuid"
language_hints
array<string>Expected languages in the audio. If not specified, languages are automatically detected.
enable_speaker_diarization
booleanWhen true
, speakers are identified and separated in the transcription output.
enable_language_identification
booleanWhen true
, language is detected for each part of the transcription.
context
stringAdditional context to improve transcription accuracy and formatting of specialized terms.
20000
webhook_url
stringURL to receive webhook notifications when transcription is completed or fails.
256
Pattern: "^https?://[^\\s]+$"
webhook_auth_header_name
stringName of the authentication header sent with webhook notifications.
256
webhook_auth_header_value
stringAuthentication header value sent with webhook notifications.
256
client_reference_id
stringOptional tracking identifier string. Does not need to be unique.
256
Response
201
Created transcription.
id
RequiredstringUnique identifier for the transcription request.
"uuid"
status
RequiredstringTranscription status.
"queued" | "processing" | "completed" | "error"
created_at
RequiredstringUTC timestamp indicating when the transcription was created.
"date-time"
model
RequiredstringSpeech-to-text model used for the transcription.
audio_url
stringURL of the file being transcribed.
file_id
stringID of the file being transcribed.
"uuid"
filename
RequiredstringName of the file being transcribed.
language_hints
array<string>Expected languages in the audio. If not specified, languages are automatically detected.
enable_speaker_diarization
RequiredbooleanWhen true
, speakers are identified and separated in the transcription output.
enable_language_identification
RequiredbooleanWhen true
, language is detected for each part of the transcription.
context
stringAdditional context to improve transcription accuracy and formatting of specialized terms.
audio_duration_ms
integerDuration of the audio in milliseconds. Only available after processing begins.
error_type
stringError type if transcription failed. null
for successful or in-progress transcriptions.
error_message
stringError message if transcription failed. null
for successful or in-progress transcriptions.
webhook_url
stringURL to receive webhook notifications when transcription is completed or fails.
webhook_auth_header_name
stringName of the authentication header sent with webhook notifications.
webhook_auth_header_value
stringAuthentication header value. Always returned masked as ******************
.
webhook_status_code
integerHTTP status code received from your server when webhook was delivered. null
if not yet sent.
client_reference_id
stringTracking identifier string.
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"
}
Invalid request.
Error types:
invalid_request
: Invalid request.
{
"status_code": 400,
"error_type": "invalid_request",
"message": "Invalid request.",
"validation_errors": [
{
"error_type": "value_error",
"location": "body.payload.model",
"message": "Invalid model"
}
],
"request_id": "3d37a3bd-5078-47ee-a369-b204e3bbedda"
}
Authentication error.
{
"status_code": 401,
"error_type": "unauthenticated",
"message": "Incorrect API key provided. You can get an API key at https://console.soniox.com",
"validation_errors": [],
"request_id": "3d37a3bd-5078-47ee-a369-b204e3bbedda"
}
Internal server error.
{
"status_code": 500,
"error_type": "internal_error",
"message": "The server encountered an error. Please try again. If the issue persists contact support@soniox.com.",
"validation_errors": [],
"request_id": "3d37a3bd-5078-47ee-a369-b204e3bbedda"
}