Request a decision
POST/v1/projects/:project_id/deciders/:decider_id/decisions
Evaluates the decider against input and records the decision. The questions come from the decider, never from the request, so a call site can only supply what is judged. To send the questions with the request, use POST /v1/projects/{project_id}/decisions.
Everything that can refuse the request is checked before the decision is written, so a refusal is a 4xx and never a polled failure: the agent's tool surface (400 DECIDER_AGENT_NOT_TOOL_LESS), a tool that cannot answer (400 DECIDER_TOOL_NOT_CALLABLE), a paused project (409 PROJECT_PAUSED) and, for an agent, quota admission (429 QUOTA_EXCEEDED).
A tool backend is called with { input, questions } and must answer { answers: [{ name, probability | choice | score, probabilities?, confidence? }] }, the request and response of OpenAI's Decisions API; an answer outside that contract fails the decision with DECISION_ANSWER_INVALID.
With wait: false, the default, the answer is 201 with the decision queued; poll GET /v1/projects/{project_id}/decisions/{decision_id} or subscribe to decisions.completed and decisions.failed. With wait: true it is 201 with the decision settled.
Request
Responses
- 201
- 400
- 401
- 403
- 404
- 409
- 413
- 429
- 500
- 502
- 4XX
The decision — queued, or settled when wait is true
Bad request — a missing or malformed input, a non-object metadata bag, or a tool-bearing agent
Unauthorized
Forbidden
Decider not found
The project is paused
REQUEST_REJECTED — the request body is over the size the body parser accepts
A generation quota is exhausted
Unexpected server error — INTERNAL_ERROR, with the raw message never forwarded
The deployment's admission service is asked about this write and did not answer — ADMISSION_UNAVAILABLE; the write did not happen
The deployment's admission service refused this write — answered under the service's own 4xx status, with its code (matching ^[A-Za-z_][A-Za-z0-9_]{0,63}$, not necessarily an ERROR_CODES key), message and meta; the write did not happen. A status this operation also declares on its own is documented there