Skip to main content

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 an input, 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 includes request_id, model and usage, which are omitted here.
  • predicate: probability is the probability that the statement is true.
  • choice: choice is the most likely option. probabilities lists every option in the order you gave them.
  • score: score is the expected level index, weighted by probability, so it can fall between levels. For a single level, take the one with the highest probability in probabilities. Each entry’s value is the level’s index.

Fallbacks

Decisions supports fallbacks. A fallback can omit input and questions, which it inherits from the main request. Nested fallbacks aren’t supported, and fallback_config.depth can be at most 2.
A fallback to Jev requires the Jev opt-in. If the request uses image parts, the Jev fallback can’t run them.

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 in metadata.errors.
See Rate limits and Troubleshooting for other status codes.

API reference

See Create a decision for every request and response field.