POST/v1/turn
Scores one recorded turn on the most accurate tier and returns the end-of-turn
probability at each step of inference_interval. messages is the conversation so
far, used to judge whether the turn is complete.
Request body
| Field | Type | Description |
|---|---|---|
audio_pcm16_b64 required | string | PCM16LE mono 16 kHz, base64. |
messages | array of object | Default |
inference_interval | number | Step in seconds between scores. Default |
sample_rate | 16000 | Default |
language | string or null | Language of the turn. |
{
"audio_pcm16_b64": "AAABAAIAAwAEAAUABgAHAAgACQAKAAsADAANAA4ADwAQAA==",
"messages": [
{
"role": "assistant",
"content": "What city are you flying to?"
}
],
"inference_interval": 0.1,
"language": "en"
}
Responses
200Scores per step.
| Field | Type | Description |
|---|---|---|
events required | array of object | |
audio_sec required | number | |
compute_ms required | number | |
tier required | string | |
model required | string | |
language | string or null |
400The audio was not usable: bad base64, an odd number of bytes, a sample rate other
than 16 000 Hz (expected 16000 Hz, got N; resample client-side), or no audio.
401Missing or unknown X-API-Key.
{
"detail": "invalid or missing X-API-Key. Baton is in beta — request a key at hello@joinin.ai"
}
422The request body failed validation.
429Too many requests for this key; retry after Retry-After seconds.
{"detail": "rate limit exceeded (600/min for this key)"}