Skip to content
Dashboard

OpenAI Decisions API now available on AI Gateway

OpenAI's Decisions API is now available on AI Gateway through an OpenAI-compatible /v1/decisions endpoint. Use it with GPT-6 Luna Decisions or any other decision model on AI Gateway.

Decision models answer typed questions about a shared input and return probabilities, choices, and scores instead of generated text, which suits routing, triage, guardrails, and rubric scoring. You can ask predicate (yes/no), choice, and score questions against the same input in one request.

openai/gpt-6-luna-decisions is a separate model ID from openai/gpt-6-luna, which stays a language model for text generation. Requests to the decisions ID go to the Decisions API and are billed at its rates.

Call it with the OpenAI SDK, the AI SDK, the existing HTTP API at /v1/evaluate, or the AI CLI.

Copy link to headingUpgrading

decisions.create requires the OpenAI SDK 7.30.0 or later for JavaScript, or 3.26.0 or later for Python. In the AI SDK, experimental_decide requires ai 7.0.128 or later.

Copy link to headingOpenAI SDK and AI SDK

Point the OpenAI SDK at AI Gateway and call decisions.create as you would against OpenAI. In the AI SDK, questions are keyed by name and the yes/no type is called boolean. Each key in questions becomes a key in answers:

import OpenAI from 'openai';
const openai = new OpenAI({
apiKey: process.env.AI_GATEWAY_API_KEY,
baseURL: 'https://ai-gateway.vercel.sh/v1',
});
const decision = await openai.decisions.create({
model: 'openai/gpt-6-luna-decisions',
input: 'I was charged twice. Please refund me.',
questions: [
{
type: 'choice',
name: 'department',
instructions: 'Which team should handle this?',
choices: [
{ value: 'billing', description: 'Charges and refunds' },
{ value: 'technical', description: 'Bugs and outages' },
],
},
],
});
console.log(decision.answers);

Answers come back as an array in question order, each carrying the question's name. Set model to any decision model, including Jev, Liquid d1, and Laya.

See the OpenAI-compatible Decisions API reference for request limits and error formats, the decision documentation for the AI SDK, or browse all decision models on AI Gateway.