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
| Parameter | Type | Required | Description |
|---|---|---|---|
audio | string | Required | Base64-encoded audio data (WAV, OGG, MP3, or FLAC). |
language | string | Optional | Language code (e.g. "ja", "en"). Omit for automatic language detection (LID). |
hotwords | string[] | Optional | Array of words/phrases to boost recognition accuracy for domain-specific terms. |
temperature | float | Optional | Sampling temperature. Lower values make output more deterministic. Default: 0.0. |
top_p | float | Optional | Nucleus sampling parameter. Controls diversity of output. Default: 0.85. |
frequency_penalty | float | Optional | Penalizes frequent tokens to reduce repetition. Default: 0.5. |
repetition_penalty | float | Optional | Penalizes token repetition; values above 1.0 discourage repetition. Default: 1.05. |
vad | integer | Optional | Voice activity detection mode. Default: 1. |
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
}
| Field | Description |
|---|---|
text | The transcribed text from the audio. |
language | The detected or specified language code. |
confidence | Transcription 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
| Code | Cause | Error message |
|---|---|---|
| 400 | Missing audio field or audio decodes to empty | No audio data provided |
| 400 | Not base64 encoded or base64 decode fails | Invalid base64 audio data |
| 400 | Unsupported audio format | Unsupported audio format |
| 500 | Transcription services not ready | Transcription service not available |
| 500 | Backend failure | Transcription failed: ... |
Next steps
- Make a working request in the Quickstart.
- Review supported formats and the 97 detectable languages in Audio & languages.
- See how usage is billed on Pricing.