81trust / 100

Responses

by Responses base (OpenAI in AI models & inference

x402 APIPassing, checked 5 h ago

OpenAI Responses API over x402 - point the OpenAI SDK's responses.create() (or the OpenAI Agents SDK) at base_url https://agent402.tools/v1 and pay $0.02 per call in USDC, no API key, no signup. Same models, caps and price as this tier's /chat/completions route; any model here is served through the Responses wire.

POST https://agent402.tools/v1/responses

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
213 ms typical, 213 ms slowest 5%
Last check
5 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/responses" \
  -H "content-type: application/json" \
  -d '{"input":"Summarize x402 in one sentence.","max_output_tokens":128,"model":"openai/gpt-4o-mini"}'
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%2Fresponses
const res = await pay("https://agent402.tools/v1/responses", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"input":"Summarize x402 in one sentence.","max_output_tokens":128,"model":"openai/gpt-4o-mini"}),
});
console.log(await res.json());

Example input

{
  "input": "Summarize x402 in one sentence.",
  "max_output_tokens": 128,
  "model": "openai/gpt-4o-mini"
}

Example output

{
  "id": "resp_…",
  "model": "openai/gpt-4o-mini",
  "object": "response",
  "output": [
    {
      "content": [
        {
          "annotations": [],
          "text": "x402 is an HTTP-native way for agents to pay per request with USDC.",
          "type": "output_text"
        }
      ],
      "id": "msg_…",
      "role": "assistant",
      "status": "completed",
      "type": "message"
    }
  ],
  "status": "completed",
  "usage": {
    "input_tokens": 14,
    "output_tokens": 18,
    "total_tokens": 32
  }
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
5 h agoPassed402213 ms$0.02