Responses premium (OpenAI Responses API)

$0.50 per call · USDC via x402 · POST /v1/premium/responses

OpenAI Responses API over x402 - point the OpenAI SDK's responses.create() (or the OpenAI Agents SDK) at base_url https://agent402.tools/v1/premium and pay $0.50 per call in USDC, no API key, no signup. Send POST /v1/premium/responses with the required field input and pay $0.50 per call over x402 or MPP (there is no free tier). It returns a JSON object with id, object, status, model, output and 1 more.

Same models, caps and price as this tier's /chat/completions route; any model here is served through the Responses wire. Up to 200,000 input chars and 8192 output tokens; streaming supported; function tools and tool namespaces yes (a namespace is flattened into its functions; function_call items carry a namespace field on non-streamed output), server-side tools (web_search, file_search, computer, mcp) no; no stored conversation state (send the full input each call). Omit "model" and the tier serves anthropic/claude-opus-5 (named back in agent402_default_model); the price does not change.

Category: LLM gateway · Tags: llm ai inference openai-compatible responses-api agents-sdk gateway openrouter

TRY IN PLAYGROUND →

Parameters

NameTypeRequiredDescription
modelstringnoModel id (OpenRouter naming) - allowlisted per tier; omit (or "auto") on the auto tier
inputanyyesA string, or an array of input items ({role, content} messages with input_text / input_image parts, function_call, function_call_output) Also accepted as data, str, string, body, content.
instructionsstringnoOptional system/developer instructions
max_output_tokensintegernoOptional output cap (clamped to the tier cap)
toolsarraynoOptional function tools ({type:"function", name, parameters}); server-side tools are not served
textobjectnoOptional {format: {type: "text"|"json_schema"|"json_object", ...}}
reasoningobjectnoOptional {effort: "none"|"minimal"|"low"|"medium"|"high"|"xhigh"|"max"} - reasoning tokens count against max_output_tokens
streambooleannoResponses SSE events (response.created … response.completed)
zdrbooleannoOptional - zero-data-retention providers only

Example request

curl -i -X POST https://agent402.tools/v1/premium/responses \
  -H "Content-Type: application/json" \
  -d '{"model":"anthropic/claude-opus-5","input":"Summarize x402 in one sentence."}'

Without payment this returns HTTP 402 Payment Required with the exact price for v1-chat-premium-responses; any x402 v2 or MPP client pays it and retries.

Example response

{
  "id": "resp_…",
  "object": "response",
  "status": "completed",
  "model": "openai/gpt-4o-mini",
  "output": [
    {
      "id": "msg_…",
      "type": "message",
      "role": "assistant",
      "status": "completed",
      "content": [
        {
          "type": "output_text",
          "text": "x402 is an HTTP-native way for agents to pay per request with USDC.",
          "annotations": []
        }
      ]
    }
  ],
  "usage": {
    "input_tokens": 14,
    "output_tokens": 18,
    "total_tokens": 32
  }
}
FieldTypeAlways presentIn the example
idstringyesresp_…
objectstringyesresponse
statusstringyescompleted
modelstringyesopenai/gpt-4o-mini
outputarray of objectsyes1 item in the example
usageobjectyes3 fields: input_tokens, output_tokens, total_tokens

From an MCP client

catalog.call {
  "slug": "v1-chat-premium-responses",
  "params": {
    "model": "anthropic/claude-opus-5",
    "input": "Summarize x402 in one sentence."
  }
}

The hosted connector at https://agent402.tools/mcp needs a payment for v1-chat-premium-responses; the stdio package pays it from a wallet or from AGENT402_CREDITS_KEY. Local install: npx -y agent402-mcp.

Errors and behavior

Paid call (JavaScript agent)

import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client();
client.setSpendControls?.(false); // keep your own spending ceiling in code
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);

const res = await payFetch("https://agent402.tools/v1/premium/responses", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "model": "anthropic/claude-opus-5",
    "input": "Summarize x402 in one sentence."
  }),
});

Related tools

Responses auto (OpenAI Responses API)

$0.01 · POST /v1/auto/responses

OpenAI Responses API over x402 - point the OpenAI SDK's responses.create() (or the OpenAI Agents SDK) at base_url https:…

Responses metered (OpenAI Responses API)

$0.001 · POST /v1/metered/responses

OpenAI Responses API billed per request from what the call costs: the 402 quotes exact-BPE input (instructions + input i…

Responses nano (OpenAI Responses API)

$0.003 · POST /v1/nano/responses

OpenAI Responses API over x402 - point the OpenAI SDK's responses.create() (or the OpenAI Agents SDK) at base_url https:…

Responses pro (OpenAI Responses API)

$0.10 · POST /v1/pro/responses

OpenAI Responses API over x402 - point the OpenAI SDK's responses.create() (or the OpenAI Agents SDK) at base_url https:…

Responses base (OpenAI Responses API)

$0.02 · POST /v1/responses

OpenAI Responses API over x402 - point the OpenAI SDK's responses.create() (or the OpenAI Agents SDK) at base_url https:…

Text-to-speech (OpenAI-compatible)

$0.060 · POST /v1/audio/speech

OpenAI-compatible text-to-speech over x402 - point any OpenAI SDK's audio.speech.create() at base_url https://agent402.t…