Overview
The decisions endpoint answers a list of questions about one input. Instead of generated text, you get one typed answer per question, each with a probability. Use it for routing, classification, scoring and other decision points in your application, where you need a predictable answer rather than prose. Send the endpoint aninput, the fully qualified state you’d like to ask questions about, and a list of questions, each of which takes one of the following three forms:
Models
Use the exact model ID. Model aliases aren’t accepted on this endpoint.
Jev is an opt-in provider and is disabled by default. To use
jev-1.13.0, review and accept the Jev opt-in terms on the Data Controls page in your dashboard. Until you do, requests to Jev return 400 with a link to that page.Make a request
This example asks three questions about a support call transcript.input is the evidence every question is asked about. It can be a string, such as a transcript’s text, or an array of user messages made of input_text parts. instructions can be a string, or an array of input_text parts (and input_image parts on gpt-6-luna).
Read the response
Answers come back in the order the questions were asked. The response also includesrequest_id, model and usage, which are omitted here.
predicate:probabilityis the probability that the statement is true.choice:choiceis the most likely option.probabilitieslists every option in the order you gave them.score:scoreis the expected level index, weighted by probability, so it can fall between levels. For a single level, take the one with the highest probability inprobabilities. Each entry’svalueis the level’s index.
Fallbacks
Decisions supports fallbacks. A fallback can omitinput and questions, which it inherits from the main request. Nested fallbacks aren’t supported, and fallback_config.depth can be at most 2.
Regions and global routing
Decisions is available on the US endpoint (https://llm-gateway.assemblyai.com/v1). It isn’t available on the EU endpoint.
Set model_region to "global" to use global routing with gpt-6-luna. Jev doesn’t support global routing. A fallback uses the main request’s model_region unless it sets its own.
Prompt caching
gpt-6-luna caches the input automatically, so requests that reuse the same input with different questions read it from the cache. Set prompt_cache_key to keep requests that should share a cache together. Cached tokens are reported in usage.input_tokens_details.cached_tokens. See Prompt caching.
Limits and errors
- A request can have 1 to 400 questions. Question names must be unique.
- Unknown request fields are rejected.
- Invalid requests return
400, with every problem listed inmetadata.errors.