Decisions
Evaluates shared evidence (input) against a list of typed questions and returns structured answers instead of generated text. Served by OpenAI's Decisions API (gpt-6-luna, currently in public beta). FastRouter adds id, model and usage (with cost, chat_id and provider) to the response.
Question types
predicate: the probability (0 to 1) that a yes/no condition is true.choice: one option from an unordered set, with a probability per option and aconfidence.score: a rating against orderedlevels(lowest first), returned as the probability-weighted average of the 0-based level indices, with a probability per level and aconfidence.Give every question a unique
name; it is echoed on its answer. A duplicate name is rejected with400.
Behavior
One answer per question, in request order. A question the model declines comes back as
{"type": "refusal", "name": "..."}; checktypebefore readingprobability,choiceorscore.Images must be inline base64 data URLs in
input_imageparts. Hosted image URLs andfile_idinputs are not supported.Billed on input tokens only, so
usage.output_tokensis always0;usage.costreports the charge in USD.BYOK OpenAI keys, including custom hosts, are honoured. The upstream call is capped at about 15 seconds; a slower request fails with
502.
Response format
The response follows the shape of the request. A Decisions-shaped body (
inputplus aquestionsarray) is answered with ananswersarray; a TypeSafe systemone-shaped body (stateplus aquestionsobject) is answered withanswerskeyed by question id.Set
response_formatto"decisions"or"systemone"to override. This changes only the response; the request keeps its own schema.Alias path:
/api/v1/systemone(same behavior).
FastRouter API Key. Get yours at https://fastrouter.ai
Format: Authorization: Bearer YOUR_API_KEY
Decision model. gpt-6-luna is currently the only model served on this endpoint.
gpt-6-lunaShared evidence for all questions: a text string, or an array of user messages containing input_text and input_image parts. Forwarded to the provider byte-for-byte.
Overrides the response shape. By default the response follows the shape of the request, so a Decisions-shaped body is answered in the Decisions shape (an ordered answers array). systemone returns answers as a map keyed by question name in the TypeSafe systemone shape, with a legend on score answers. Accepted as a plain string or as an object {"type": "..."}. Aliases: decision/openai = decisions, system_one/typesafe = systemone. Any other value (e.g. json_object) is ignored. It changes only the response; the request keeps its own schema.
Decisions evaluated. The body shape depends on response_format.
Invalid request. Raised by FastRouter for a malformed questions value, a duplicate question name, or a model/provider combination that cannot be routed; otherwise relayed from the provider (unknown model, empty questions, missing input, unsupported image URL, unknown question type, and so on).
Invalid Credentials - Your API key is invalid, missing, or disabled. Check your credentials.
Note: the 401 error body uses code, message, param, and type (there is no status field), and type is invalid_request_error.
Insufficient Credits - Your account or API key has run out of credits. Add more credits and retry the request.
The API key or project is not allowed to use the requested model.
Rate Limited - You have exceeded your request limits (TPM/RPM). Slow down or increase your limits.
Internal error, for example a failure resolving BYOK credentials.
The upstream provider could not be reached, or returned a response FastRouter could not decode. Provider HTTP errors are relayed with their original status instead.
POST /api/v1/decisions HTTP/1.1
Host: api.fastrouter.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 458
{
"model": "gpt-6-luna",
"input": "I was charged twice for my order.",
"questions": [
{
"type": "choice",
"name": "department",
"instructions": "Which department should handle this complaint?",
"choices": [
{
"value": "billing",
"description": "Payments, invoices, and refunds."
},
{
"value": "technical",
"description": "Problems using the product."
},
{
"value": "shipping",
"description": "Delivery and tracking."
},
{
"value": "other",
"description": "Requests outside these categories."
}
]
}
]
}{
"answers": [
{
"type": "choice",
"name": "department",
"choice": "billing",
"probabilities": [
{
"value": "billing",
"probability": 1
},
{
"value": "technical",
"probability": 0
},
{
"value": "shipping",
"probability": 0
},
{
"value": "other",
"probability": 0
}
],
"confidence": 1
}
],
"id": "fr_64320228-976f-40d3-91b6-1f81b3c5c10f",
"model": "gpt-6-luna",
"usage": {
"input_tokens": 145,
"output_tokens": 0,
"total_tokens": 145,
"cost": 0.0000145,
"chat_id": "fr_64320228-976f-40d3-91b6-1f81b3c5c10f",
"provider": "openai"
}
}Last updated
