{"uid":"cap_dTeGgsIY3O5tQfBsBWQXi","slug":"decisions-api-openai-wire-compatible-d4ab94e7","name":"Decisions API (OpenAI Wire Compatible)","description":"OpenAI's Decisions API on its own wire: point an OpenAI SDK's base URL here and client.decisions.create works unchanged, paid per call. Send input (text, or user messages with input_text parts) and questions; get back answers your code can branch on. predicate returns the probability a condition holds; choice returns one of your values with probabilities and confidence; score returns a probability-weighted position on your ordered levels. Up to 8 questions per call.","url":"https://agent402.tools/v1/decisions?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"input":{"type":["string","array"],"description":"The content to evaluate: a string, or user messages with input_text parts. Up to 8000 characters."},"model":{"enum":["gpt-6-luna"],"type":"string","description":"Defaults to gpt-6-luna."},"questions":{"type":"array","description":"Each has type (predicate/choice/score), a unique name and instructions; choice adds choices [{value, description}], score adds levels [{label, description}] lowest first."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_pFKwwh4kWxpqs1q8FL_jd","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Evaluates text or messages against up to 8 typed questions (predicate, choice, or score) and returns probabilistic answers your code can branch on, compatible with the OpenAI SDK.","exampleAgentPrompt":"For this customer support message — 'My order arrived broken and I want a refund immediately' — ask three questions: (1) predicate: is this a refund request? (2) choice: route it to 'billing', 'shipping', or 'general support' with probabilities, and (3) score: rate the urgency on levels from 'low' to 'critical'.","exampleUseCases":[{"title":"Content moderation routing pipeline","prompt":"Look at this user-submitted post: 'I know where you live and you'll regret this.' Ask whether it contains a threat (predicate), classify it as 'safe', 'borderline', or 'harmful' (choice with probabilities), and score its severity from 'negligible' up to 'critical' so I can decide whether to auto-remove it."},{"title":"Lead qualification scoring","prompt":"Here's a sales inquiry email: 'We're a 500-person company looking to migrate our entire data warehouse to the cloud this quarter with a $200k budget.' Evaluate: is this from a decision-maker (predicate), classify the deal size as 'small', 'mid-market', or 'enterprise' (choice), and score urgency from 'exploratory' to 'ready to buy' (score) so our CRM can auto-prioritize it."},{"title":"Support ticket triage","prompt":"This support ticket says: 'The app keeps crashing every time I try to export a PDF on iOS 17.' Ask: is this a known bug report (predicate), categorize it as 'crash', 'feature request', 'billing', or 'account issue' (choice with confidence), and score priority from 'low' to 'critical' based on impact — I'll use the answers to auto-assign it to the right team."}],"resultDescription":"Returns structured answers for each named question: predicate questions return a probability (0–1) that the condition holds; choice questions return the selected value along with per-option probabilities and a confidence score; score questions return a probability-weighted position on your ordered levels. All answers are machine-readable and designed for programmatic branching.","failureModes":["More than 8 questions submitted — API rejects with validation error","Input text exceeds 8000 character limit — truncation or rejection","Invalid question type (not predicate/choice/score) — schema validation error","choice question missing choices array — malformed request error","score question missing levels array — malformed request error","Payment not attached or insufficient USDC balance — x402 payment required error","Model not found or unavailable — upstream LLM error"],"whenToPreferThis":"Choose this endpoint when you need structured, probabilistic decisions from natural language input that your code can branch on — especially when you want multiple typed questions answered in a single call (up to 8). It is ideal when you're already using the OpenAI SDK and want drop-in compatibility. Prefer this over raw chat completions when you need machine-readable classification outputs with confidence scores rather than free-form text, and when you want to avoid parsing LLM output yourself.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-12T18:48:34.661Z","isFirstParty":false,"canonicalSlug":"decisions-api-openai-wire-compatible-d4ab94e7"}