Estimate input tokens
Estimates the input tokens of a decisions request from its questions and the duration of its audio. The body takes the same context and questions as the request part of a POST /v0/decisions/file request, plus audio_duration_ms, the duration of the audio file in milliseconds.
Authentication
Request
The duration of the audio file the decisions request would send, in milliseconds. A duration under 5 seconds is rejected with audio_too_short, and one over 5 minutes with audio_too_long.
The questions to answer: at most 20 noul, choice and score questions together, and at most 5 span questions. Each key is a question ID you choose, such as agent_tone, and can be any non-empty string of up to 256 characters. The response returns each answer under the same ID.
Asks a yes or no question. Optionally, say what counts as yes or no in criteria.
Response
The estimated number of input tokens for the request: what POST /v0/decisions/file would bill it, as its response’s received.input_tokens. The estimate counts the audio from its duration rather than the file, so it can differ slightly.