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

WhenResultHTTPTimePrice
3 h agoPassed402357 ms$0.001
7 h agoPassed402331 ms$0.001
11 h agoPassed402311 ms$0.001
14 h agoPassed402323 ms$0.001
18 h agoPassed402374 ms$0.001
21 h agoPassed402316 ms$0.001
25 h agoPassed402400 ms$0.001
28 h agoPassed402316 ms$0.001
32 h agoPassed402342 ms$0.001
35 h agoPassed402328 ms$0.001
39 h agoPassed402336 ms$0.001
42 h agoPassed402363 ms$0.001
46 h agoPassed402359 ms$0.001
2 days agoPassed402299 ms$0.001
2 days agoPassed402324 ms$0.001