Skip to main content

ASR API Reference

The Shisa ASR API transcribes base64-encoded audio into text with a single JSON request. This page documents the endpoint, its request parameters, the success response, and error handling.

Endpoint

POST https://api.shisa.ai/asr/srt/audio_llm

Authenticate with a bearer token carrying the ASR-specific shsk: prefix:

Authorization: Bearer YOUR_API_KEY

The request body is JSON and the server auto-detects the audio format from its binary header.

Request parameters

ParameterTypeRequiredDescription
audiostringRequiredBase64-encoded audio data (WAV, OGG, MP3, or FLAC).
languagestringOptionalLanguage code (e.g. "ja", "en"). Omit for automatic language detection (LID).
hotwordsstring[]OptionalArray of words/phrases to boost recognition accuracy for domain-specific terms.
temperaturefloatOptionalSampling temperature. Lower values make output more deterministic. Default: 0.0.
top_pfloatOptionalNucleus sampling parameter. Controls diversity of output. Default: 0.85.
frequency_penaltyfloatOptionalPenalizes frequent tokens to reduce repetition. Default: 0.5.
repetition_penaltyfloatOptionalPenalizes token repetition; values above 1.0 discourage repetition. Default: 1.05.
vadintegerOptionalVoice activity detection mode. Default: 1.
note

Only audio is required. Language is auto-detected, and the tuning parameters use sensible defaults — you can send the minimal request shown in the Quickstart and add parameters only as needed.

Success response

A successful request returns a JSON object with the transcription, the detected or specified language, and a confidence score:

{
"text": "こんにちは、シサAIです。",
"language": "ja",
"confidence": 0.98
}
FieldDescription
textThe transcribed text from the audio.
languageThe detected or specified language code.
confidenceTranscription confidence score, from 0 to 1.

Error handling

Errors return a JSON object with an HTTP-style code and a human-readable error message:

{
"code": 400,
"error": "No audio data provided"
}

401 authentication error

Returned when the API key is missing, invalid, or expired. Check that your Authorization header includes a valid token with the shsk: prefix.

{
"context": ["authMiddleware"],
"code": 104,
"name": "ErrAuthenticationFailed",
"error": "Authentication error: Invalid token"
}

Error codes

CodeCauseError message
400Missing audio field or audio decodes to emptyNo audio data provided
400Not base64 encoded or base64 decode failsInvalid base64 audio data
400Unsupported audio formatUnsupported audio format
500Transcription services not readyTranscription service not available
500Backend failureTranscription failed: ...

Next steps