API Docs

Error Codes

Table of Contents


Error Response Format

All API errors use a unified format:

{
  "type": "error",
  "data": {
    "error_code": "auth_invalid_api_key",
    "severity": "fatal",
    "message": "Invalid API key",
    "context": "auth",
    "request_id": "req_abc123xyz789",
    "timestamp": "2025-12-25T10:30:45.123Z",
    "details": null
  }
}
FieldTypeDescription
error_codestringError code (for programmatic handling)
severitystringSeverity level: fatal / error / warning
messagestringHuman-readable error message
contextstringError source category
sidintOptional. Sentence number for sentence-level errors (e.g., when a sentence fails to translate); not included for non-sentence-level errors
request_idstringRequest tracking ID
timestampstringTime the error occurred (ISO 8601)
detailsobjectAdditional debugging information; common keys in translation scenarios: provider, translation_language, source_lang

Severity Levels

severityDescriptionRecommended Handling
fatalFatal errorStop the service and require reconnection
errorOperation failedShow an error prompt and allow retry
warningWarningShow a warning without blocking the operation

Sentence-level error rule (important): When an error message includes the sid field, regardless of the severity, it should be treated as a sentence-level error (a single sentence failed). The client only needs to mark that sentence as failed and continue; it should not disconnect. A fatal + sid combination only means "this sentence failed severely"; the session as a whole can still continue operating.

In other words, the "stop the service / require reconnection" recommendation applies only to session-level fatal errors that do not include sid.


Authentication Errors

Error CodeHTTPseverityDescriptionRecommended Handling
auth_missing_api_key401fatalAPI Key is missingMake sure the request includes an API Key
auth_invalid_api_key401fatalInvalid API keyMake sure the API Key is correct
auth_invalid_key_format401fatalInvalid API key formatMake sure the API Key starts with vas_
auth_key_expired401fatalAPI Key has expiredRequest a new API Key
auth_key_disabled401fatalAPI Key is disabledContact technical support
auth_user_disabled403fatalAccount is disabledContact technical support
auth_budget_exceeded402fatalMonthly budget exceededWait for the next month's budget reset or adjust the budget
auth_account_expired401fatalAccount service has expiredContact technical support or renew
auth_service_error500fatalAuthentication service temporarily unavailableRetry later

Ticket Authentication Errors

Error CodeHTTPseverityDescriptionRecommended Handling
ticket_invalid401fatalTicket invalid or expiredObtain a new Ticket
ticket_expired401fatalTicket has expiredObtain a new Ticket
ticket_already_used401fatalTicket already usedEach Ticket can be used only once
ticket_validation_failed401fatalTicket validation failedMake sure the Ticket format is correct

Session Errors

Error CodeHTTPseverityDescriptionRecommended Handling
session_not_found404errorSession not foundMake sure the session ID is correct
session_expired400errorSession expiredCreate a new session
session_not_started400errorRecording not started yetCall start first
session_already_paused400warningAlready pausedYou can ignore this error
session_not_paused400warningNot pausedYou can ignore this error
service_shutdownwarningService shutting down, please reconnectBroadcast to all active WebSocket clients during a graceful server shutdown; clients should display a maintenance notice and reconnect after a brief backoff

Speech Recognition Errors

Error CodeHTTPseverityDescriptionRecommended Handling
stt_init_failed503fatalService initialization failedRetry later
stt_start_failed500fatalUnable to start speech recognitionRetry later
stt_auth_failed500fatalService authentication failedContact technical support
stt_quota_exceeded503fatalUsage limit reachedRetry later
stt_connection_lost500fatalConnection lostStop the service and reconnect

Audio Processing Errors

Error CodeHTTPseverityDescriptionRecommended Handling
audio_invalid_format400errorInvalid audio data formatMake sure the audio format is correct
audio_process_failed500errorAudio processing failedRetry later
audio_format_unsupported400errorUnsupported audio formatUse a supported format
audio_decode_failed500errorAudio decoding failedVerify the integrity of the audio file

Speaker Diarization Errors

Error CodeHTTPseverityDescriptionRecommended Handling
diarization_init_failed503fatalDiarization service initialization failedRetry later
diarization_start_failed500fatalDiarization session failed to startRetry later
diarization_failed500errorDiarization processing failedRetry later
diarization_unavailable503fatalDiarization service unavailableVerify the service status
diarization_multilang_conflict400errorSpeaker diarization does not support multiple languages (start rejected)Provide only one source language, or disable speaker diarization

Speaker Errors

Error CodeHTTPseverityDescriptionRecommended Handling
speaker_not_found404errorThe specified speaker was not foundMake sure the speaker ID is correct
speaker_sid_not_found404errorThe specified sentence was not foundMake sure the sentence ID is correct
speaker_name_empty400errorSpeaker name cannot be emptyProvide a speaker name
speaker_name_duplicate400errorSpeaker name already in useUse a different name
merge_speakers_same_id400errorSource and target speaker cannot be the sameProvide different speaker IDs

Configuration Errors

Error CodeHTTPseverityDescriptionRecommended Handling
config_empty400errorNo configuration providedProvide at least one configuration item
config_term_too_long400errorTerm exceeds 100 charactersShorten the term
config_too_many_entries400errorMore than 500 terminology entriesReduce the number of terms
config_too_many_dict_entries400errorMore than 50 translation dictionary entriesReduce the dictionary entries
config_terminology_locked400errorTerminology locked (recording in progress)Stop the recording before updating

Translation Service Errors

Error CodeHTTPseverityDescriptionRecommended Handling
llm_init_failed503fatalTranslation service initialization failedRetry later
llm_timeout504errorTranslation timeoutRetry later
llm_rate_limit429warningRequests too frequentReduce the request frequency
llm_request_failed500errorTranslation request failedRetry later
llm_provider_error503errorTranslation service temporarily unavailableRetry later
llm_content_filtered400warningContent cannot be translatedModify the input content
llm_auth_failed500fatalTranslation service authentication failedContact technical support
llm_deployment_not_found500fatalTranslation service configuration errorContact technical support
llm_quota_exceeded503fatalTranslation usage limit reachedRetry later
translation_service_unavailable-errorTranslation service has failed consecutively up to the threshold (session-level, no sid)Show a global notice that translation is temporarily unavailable; no need to disconnect; STT continues to run

translation_service_unavailable trigger rules (backend behavior):

  • Cumulative escalation: escalates after llm_timeout / llm_provider_error / llm_rate_limit / llm_request_failed fail 5 times consecutively
  • Immediate escalation: llm_auth_failed / llm_deployment_not_found / llm_quota_exceeded escalate on the first occurrence (configuration/billing issues)
  • Not counted: llm_content_filtered (a content issue, not a service issue)
  • Deduplication: each session is notified only once; any successful sentence translation resets the counter, and the event can be triggered again
  • payload: type: "error", without sid; details contains provider, last_error_code, fail_count
  • Viewer notification: in broadcast mode, all viewers (regardless of language) also receive this event (through the SSE/WS broadcast channel)

TTS Synthesis Errors

Error CodeHTTPseverityDescriptionRecommended Handling
tts_init_failed503fatalTTS service initialization failedRetry later
tts_not_enabled400warningTTS not enabledMake sure tts_enabled is set on start
tts_invalid_language400errorTTS language invalidMake sure the language is in translation_languages
tts_invalid_voice400errorInvalid voice nameQuery /api/v1/tts/voices
tts_segment_not_found400warningThe specified sentence was not foundMake sure the SID exists
tts_translation_not_found400warningNo translation found for that languageMake sure a translation exists for that language
tts_synthesis_failed500errorTTS synthesis failedRetry later
tts_voice_not_found404errorThe specified voice was not foundMake sure the voice name is correct
tts_sample_generation_failed500errorVoice sample generation failedRetry later
tts_quota_exceeded503fatalTTS usage limit reachedRetry later

Recording Errors

Error CodeHTTPseverityDescriptionRecommended Handling
recording_not_found404errorRecording not foundMake sure the taskId is correct
recording_unauthorized403errorNot authorized to operate on this recordingMake sure the task belongs to the user
recording_audio_not_ready422errorAudio file not ready yetRetry later
recording_transcript_not_ready422errorTranscript not yet generated or emptyMake sure processing_status = completed before exporting
recording_not_completed422errorRecording has not finished processing; retranslation/editing/summary regeneration is not allowed while in progressWait until processing_status = completed, then retry
entry_not_found404errorThe specified sentence was not found (sid does not exist in the transcript)Make sure the sid is correct
entry_text_empty422errorSentence source text is emptyProvide a non-empty original_text
entry_text_too_long422errorSentence source text exceeds the 2000-character limitShorten the content and retry
transcript_revision_conflict409errorTranscript was modified by another request (optimistic lock conflict)Re-read the transcript to get the latest revision, then retry
invalid_processing_status422errorProcessing status does not meet the operation requirementSee the "Processing Status Mismatch (invalid_processing_status)" section below

Processing Status Mismatch (invalid_processing_status)

This error code is used by POST /api/v1/tasks/{taskId}/force-fail and POST /api/v1/tasks/{taskId}/retry, returned when the recording status does not meet the operation's prerequisites. The details field helps further identify the trigger reason:

EndpointTrigger ConditionFields in detailsRecommended Handling
force-failRecording is already in a terminal state (completed / failed)current_status, messageFor completed tasks, use DELETE /api/v1/tasks/{taskId} instead; failed tasks do not need to be force-failed again
retryRecording is not in the failed statecurrent_status, messageOnly failed tasks can be retried
retryAudio file or transcript has not finished uploadingcurrent_status, audio_status, transcript_status, messageMake sure the source file is complete; if the recording source is corrupted, use force-fail to close it out instead

File Import Errors

Error CodeHTTPseverityDescriptionRecommended Handling
import_not_found404errorImport task not foundMake sure the import_id is correct
import_file_too_large413errorFile size exceeds the limitCompress or split the file
import_invalid_format415errorUnsupported audio formatUse mp3/wav/m4a format
import_download_failed500errorDownload failedRetry later
import_conversion_failed500errorConversion failedVerify the integrity of the audio file
import_stt_timeout504errorSpeech recognition timeoutRetry later
import_stt_failed500errorSpeech recognition failedRetry later
import_translation_failed500errorTranslation processing failedRetry later
import_summary_failed500warningSummary generation failedRetry later
import_upload_failed500errorResult upload failedRetry later
import_callback_failed500warningFailed to report progressDoes not affect processing; can be ignored
import_invalid_request500errorInvalid request formatMake sure the request format is correct

Note: If the monthly budget has been exceeded at upload time, the auth_budget_exceeded error (HTTP 402) is returned.


Storage Errors

Error CodeHTTPseverityDescriptionRecommended Handling
storage_connection_failed503errorStorage service connection failedRetry later
storage_upload_failed500errorUpload failedRetry later
storage_download_failed500errorDownload failedRetry later
storage_queue_full500warningUpload queue fullRetry later

SSE Errors

Error CodeHTTPseverityDescriptionRecommended Handling
sse_transcript_not_found404errorTranscript not foundThe recording may not have finished processing
sse_missing_target_lang400errorMissing target language parameterProvide targetLang
sse_unsupported_language400errorUnsupported target languageUse a valid language code
sse_translation_failed500errorTranslation failedRetry later
sse_summary_not_found404errorSummary not foundThis recording has no summary
sse_summary_translation_failed500errorSummary translation failedRetry later
sse_summary_regeneration_failed500errorSummary regeneration failedRetry later
sse_template_not_found404errorSummary template not foundMake sure the template slug is correct

Broadcast Errors

Error CodeHTTPseverityDescriptionRecommended Handling
broadcast_not_enabled500errorBroadcast not enabled for the sessionVerify the broadcast settings
broadcast_token_invalid401fatalInvalid share linkStop the service and verify the share link
broadcast_token_revoked401fatalShare link revokedStop the service and create a new broadcast
broadcast_token_already_used422errorToken already used by another SessionClose the other tabs and retry
broadcast_token_required400errorBroadcast mode requires broadcast_tokenProvide the broadcast_token parameter
broadcast_session_not_found404errorBroadcast session not foundMake sure the broadcast Token is correct
broadcast_session_not_started500errorBroadcast not started yetWait for the host to start the broadcast
broadcast_not_ready503warningLive translation service not started yetRetry later
broadcast_session_ended410errorBroadcast session endedWait for the host to start again
broadcast_capacity_exceeded503warningMaximum number of viewers exceededWait in the queue or retry later
broadcast_queue_timeout408errorQueue timeoutTry reconnecting
broadcast_viewer_kicked403errorRemoved by the hostContact the host
broadcast_unauthorized401errorUnauthorized access to the viewer management APIVerify your authentication information
broadcast_password_required422errorThis broadcast requires password verificationProvide the correct password
broadcast_password_incorrect422errorIncorrect passwordVerify the password and retry
broadcast_not_in_standby500warningNot currently in the standby phaseWait for the host to switch to the standby phase
broadcast_cannot_revoke422errorOnly broadcasts in the pending state can be revokedStop the broadcast before revoking
broadcast_cannot_start422errorCannot start the broadcastMake sure the broadcast status is pending
broadcast_already_live422errorA broadcast is already liveStop the current broadcast first
broadcast_not_live422errorNo broadcast currently liveStart a broadcast first
broadcast_max_viewers_exceeded422errorThe viewer limit exceeds the system maximumLower the viewer limit

Conversation Errors

Error CodeHTTPseverityDescriptionRecommended Handling
conversation_requires_two_languages400errorConversation mode requires exactly two languagesProvide exactly 2 transcription_languages
conversation_languages_identical400errorThe two conversation languages cannot be the sameProvide two different languages
conversation_invalid_language400errorInvalid conversation languageMake sure the language is one of the transcription_languages
conversation_same_language400warningAlready the current languageYou can ignore this warning
conversation_speaking400errorCurrently speaking; cannot perform this actionCall stop_speaking to finish speaking first
conversation_not_speaking400warningNot currently speakingYou can ignore this warning
conversation_invalid_speaker400errorInvalid speaker numberUse 1 or 2
conversation_invalid_mode400errorInvalid conversation modeUse auto or manual
conversation_not_manual_mode400errorThis action requires manual modeSwitch to manual mode first
conversation_missing_speakers400errorConversation mode requires speakers configurationProvide the speakers parameter on start
conversation_invalid_speakers400errorInvalid speakers formatMake sure exactly 2 speaker configurations are provided
conversation_language_change_failed500errorLanguage change failed (STT rebuild failed)Retry later
conversation_language_same_as_peer400errorNew language is the same as the other user'sThe two users cannot use the same language

Handling strategy:

Error CodeRetry?Handling
conversation_requires_two_languagesShow "Please provide exactly 2 languages"
conversation_languages_identicalShow "The two languages cannot be the same"
conversation_invalid_languageShow "Invalid language" and use the language from start
conversation_same_languageCan be ignored; already the current language
conversation_speakingShow "Please finish speaking first"
conversation_not_speakingCan be ignored; not currently speaking
conversation_invalid_speakerShow "Invalid speaker number"
conversation_invalid_modeShow "Invalid mode"
conversation_not_manual_modeShow "Please switch to manual mode first"
conversation_missing_speakersShow "Please provide speakers configuration"
conversation_invalid_speakersShow "Invalid speakers format"
conversation_language_change_failedRetry later; if it keeps failing, reconnect
conversation_language_same_as_peerShow "Cannot use the same language as the other user"

conversation_requires_two_languages error details:

This error occurs in the start action of type: "conversation" when the number of transcription_languages is not 2.

{
  "type": "error",
  "data": {
    "error_code": "conversation_requires_two_languages",
    "severity": "error",
    "message": "Conversation mode requires exactly 2 languages",
    "context": "session",
    "request_id": "req_abc123xyz",
    "timestamp": "2026-03-04T10:30:45.123Z",
    "details": {
      "received_count": 1,
      "expected_count": 2
    }
  }
}

conversation_languages_identical error details:

This error occurs in the start action of type: "conversation" when the two provided transcription_languages are the same.

{
  "type": "error",
  "data": {
    "error_code": "conversation_languages_identical",
    "severity": "error",
    "message": "Conversation languages must be different",
    "context": "session",
    "request_id": "req_abc123xyz",
    "timestamp": "2026-03-04T10:30:45.123Z",
    "details": {
      "languages": ["zh-TW", "zh-TW"]
    }
  }
}

conversation_invalid_language error details:

This error occurs during switch_language when the specified language is not in the conversation language pair.

{
  "type": "error",
  "data": {
    "error_code": "conversation_invalid_language",
    "severity": "error",
    "message": "Language not in conversation languages",
    "context": "session",
    "request_id": "req_abc123xyz",
    "timestamp": "2026-03-04T10:30:45.123Z",
    "details": {
      "language": "ja-JP",
      "conversation_languages": ["zh-TW", "en-US"]
    }
  }
}

Summary Errors

Error CodeHTTPseverityDescriptionRecommended Handling
summary_text_empty400errorText content cannot be emptyProvide text content
summary_text_too_long400errorText content exceeds the limit (100,000 characters)Shorten the text content
summary_failed500errorSummary generation failedRetry later
summary_timeout504errorSummary generation timeoutRetry later
custom_prompt_too_long400errorcustom_prompt exceeds the 2000-character limitShorten the custom_prompt length
custom_prompt_slug_too_long400errorcustom_prompt_slug exceeds the 64-character limitShorten the custom_prompt_slug length
custom_prompt_slug_invalid400errorcustom_prompt_slug contains control charactersRemove control characters such as line breaks / Tab / NULL
template_not_found404errorThe summary template with the specified slug does not exist or is disabledUse GET /api/v1/summary-templates to list available templates

Retranslation Errors

Error CodeHTTPseverityDescriptionRecommended Handling
retranslate_sid_not_found404errorThe specified sentence number was not foundMake sure the SID exists
retranslate_session_not_active400errorSession not startedVerify the session status
retranslate_no_target_lang400errorNo target language providedProvide the target_lang parameter
retranslate_no_text400errorNo text to translate providedProvide text content
retranslate_llm_not_ready503errorTranslation service not readyRetry later
retranslate_llm_failed500errorTranslation failedRetry later
retranslate_failed500errorRetranslation failedRetry later

Language Switch Errors

Error CodeHTTPseverityDescriptionRecommended Handling
switch_language_no_target400errorNo target language providedProvide the target language parameter
switch_language_in_progress400warningLanguage switch in progressWait for the switch to complete
switch_language_same_target400warningTarget language unchangedYou can ignore this warning
batch_retranslate_partial_failed500warningSome sentences failed to retranslateCan be ignored; does not affect the main flow
batch_retranslate_failed500warningA single sentence failed during batch retranslation (persisted in transcript.translation_errors)Failed sids are reported in the failed_sids summary; individual sentences can be retried later

Recording Name Errors

Error CodeHTTPseverityDescriptionRecommended Handling
set_name_empty400errorRecording name cannot be emptyProvide a name
set_name_too_long400errorName exceeds the length limitShorten the name
set_name_not_ready400errorSession not startedStart speech recognition first

General Errors

Error CodeHTTPseverityDescriptionRecommended Handling
invalid_json422errorInvalid JSON formatMake sure the JSON format is correct
invalid_data422errorInvalid data formatMake sure the data conforms to the API specification
validation_failed422errorRequest validation failedMake sure required parameters are provided
internal_error-errorThe server panicked while processing a single WebSocket message (recovered)The connection is kept; it should not disconnect; treat it as a failure of that message and optionally retry the operation. details.message_type and details.action indicate the specific failed operation (see WebSocket API: Per-Message Errors)
missing_transcription_languages400errorNo speech recognition language providedProvide transcription_languages
invalid_transcription_language400errorInvalid language codeUse a valid BCP 47 language code
invalid_translation_language400errorInvalid translation language codetranslation_languages must use supported BCP 47 codes (see languages.md)
too_many_languages400errorToo many languagesUp to 2 languages
invalid_recording_type400errorInvalid recording typeUse a valid type
invalid_summary_template400errorInvalid summary templateVerify the template identifier
name_too_long400errorName too longShorten the name length

Frontend Error Handling Example

function handleError(error) {
  const { error_code, severity, message } = error.data;

  switch (severity) {
    case 'fatal':
      // Fatal error: stop the service and show an error page
      showErrorPage(message);
      disconnectWebSocket();
      break;

    case 'error':
      // Operation failed: show an error prompt and allow retry
      showErrorToast(message);
      break;

    case 'warning':
      // Warning: show a warning without blocking the operation
      showWarningToast(message);
      break;
  }

  // Log the error for debugging
  console.error(`[${error_code}] ${message}`);
}

Version: V1.5.7 Last Updated: 2026-05-20

Copyright © 2026