Endpoints
Translation
Translates audio content to a specified language.
Endpoint
POST
https://api.sambanova.ai/v1/audio/translations
Request body
Reference
Parameter | Type | Description | Default |
---|---|---|---|
model | string | The ID of the model to use. Only Qwen2-Audio-7B-Instruct is currently available. | Required |
messages | Message | A list of messages containing role (user/system/assistant), type (text/audio_content), and audio_content (base64 audio content). | Required |
response_format | string | The output format, either “json” or “text”. | “json” |
temperature | number | Sampling temperature between 0 and 1. Higher values (e.g., 0.8) increase randomness, while lower values (e.g., 0.2) make output more focused. | 0 |
max_tokens | number | The maximum number of tokens to generate. | 1000 |
file | file | Audio file in flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm format. Each single file must not exceed 30 seconds in duration. | Required |
language | string | The target language for transcription or translation. | Optional |
stream | boolean | Enables streaming responses. | false |
stream_options | object | Additional streaming configuration (e.g., {“include_usage”: true}). | Optional |