# Decisions API (OpenAI Wire Compatible)

> Decisions API (OpenAI Wire Compatible) is a paid API for AI agents from agent402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-12).

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.

## Facts

- Endpoint: POST https://agent402.tools/v1/decisions?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/decisions-api-openai-wire-compatible-d4ab94e7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_dTeGgsIY3O5tQfBsBWQXi

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability decisions-api-openai-wire-compatible-d4ab94e7 -d '<json body>'
```

Example prompt: 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'.

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

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.

## Output

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.

## Request schema (JSON Schema)

```json
{
 "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."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/decisions-api-openai-wire-compatible-d4ab94e7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
