77trust / 100
Decisions
by Decisions (OpenAI wire) in Email & messaging
x402 APIPassing, checked 3 h ago
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.
POST https://agent402.tools/v1/decisions
Last 30 days
All checks passedSome failedAll failedNot checked
- Uptime
- 100%
- Response time
- 331 ms typical, 400 ms slowest 5%
- Last check
- 3 h ago
- Next check
- any minute now
How to call it
# See the payment challenge (nothing is charged)
curl -i -X POST "https://agent402.tools/v1/decisions" \
-H "content-type: application/json" \
-d '{"input":"I was charged twice for my order.","questions":[{"choices":[{"description":"Payments, invoices, and refunds.","value":"billing"},{"description":"Problems using the product.","value":"technical"},{"description":"Delivery and tracking.","value":"shipping"},{"description":"Requests outside these categories.","value":"other"}],"instructions":"Which department should handle this complaint?","name":"department","type":"choice"}]}'import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client().register(
"eip155:8453",
new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fagent402.tools%2Fv1%2Fdecisions
const res = await pay("https://agent402.tools/v1/decisions", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"input":"I was charged twice for my order.","questions":[{"choices":[{"description":"Payments, invoices, and refunds.","value":"billing"},{"description":"Problems using the product.","value":"technical"},{"description":"Delivery and tracking.","value":"shipping"},{"description":"Requests outside these categories.","value":"other"}],"instructions":"Which department should handle this complaint?","name":"department","type":"choice"}]}),
});
console.log(await res.json());Example input
{
"input": "I was charged twice for my order.",
"questions": [
{
"choices": [
{
"description": "Payments, invoices, and refunds.",
"value": "billing"
},
{
"description": "Problems using the product.",
"value": "technical"
},
{
"description": "Delivery and tracking.",
"value": "shipping"
},
{
"description": "Requests outside these categories.",
"value": "other"
}
],
"instructions": "Which department should handle this complaint?",
"name": "department",
"type": "choice"
}
]
}Security scan
- No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 3 h ago | Passed | 402 | 357 ms | $0.001 |
| 7 h ago | Passed | 402 | 331 ms | $0.001 |
| 11 h ago | Passed | 402 | 311 ms | $0.001 |
| 14 h ago | Passed | 402 | 323 ms | $0.001 |
| 18 h ago | Passed | 402 | 374 ms | $0.001 |
| 21 h ago | Passed | 402 | 316 ms | $0.001 |
| 25 h ago | Passed | 402 | 400 ms | $0.001 |
| 28 h ago | Passed | 402 | 316 ms | $0.001 |
| 32 h ago | Passed | 402 | 342 ms | $0.001 |
| 35 h ago | Passed | 402 | 328 ms | $0.001 |
| 39 h ago | Passed | 402 | 336 ms | $0.001 |
| 42 h ago | Passed | 402 | 363 ms | $0.001 |
| 46 h ago | Passed | 402 | 359 ms | $0.001 |
| 2 days ago | Passed | 402 | 299 ms | $0.001 |
| 2 days ago | Passed | 402 | 324 ms | $0.001 |