POST /api/llm-premiumLLM inference proxy (Premium tier) — o3-mini reasoning model via the same OpenAI-format interface. No API key needed; pay per call via x402. Input capped at 32k chars, output at 2048 tokens.
| Field | Type | Description |
|---|---|---|
model * | string | Model ID — o3-mini |
messages * | array | Array of {role, content} message objects |
max_tokens | number | Max output tokens (default 1024, cap 2048) |
temperature | number | Sampling temperature (0-2) |
top_p | number | Nucleus sampling (0-1) |
stop | string | Stop sequence(s) |
{
"model": "o3-mini",
"provider": "openai",
"usage": {
"prompt_tokens": 12,
"completion_tokens": 8,
"total_tokens": 20
},
"choices": [
{
"message": {
"role": "assistant",
"content": "Hello! How can I help you today?"
},
"finish_reason": "stop"
}
]
}
curl -i -X POST https://agent402.tools/api/llm-premium \
-H "Content-Type: application/json" \
-d '{"model":"o3-mini","messages":[{"role":"user","content":"Say hello in one sentence."}],"max_tokens":64}'
The response is HTTP 402 Payment Required with exact payment requirements. Any x402 v2 client pays automatically and retries:
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();
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);
const res = await payFetch("https://agent402.tools/api/llm-premium", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"model": "o3-mini",
"messages": [
{
"role": "user",
"content": "Say hello in one sentence."
}
],
"max_tokens": 64
}),
});
Wallet-only. This tool reaches the network/browser/storage, so it is paid in USDC via x402 (no proof-of-work tier).
POST /api/llmLLM inference proxy — send an OpenAI-format chat/completions request and get a response from GPT-4o-mini. No API key nee…
POST /api/llm-proLLM inference proxy (Pro tier) — GPT-4o or GPT-4.1. Same OpenAI-format interface as /api/llm but with more capable model…
POST /api/image-genGenerate an image from a text prompt using GPT Image (mini, low quality, 1024x1024). No API key needed; pay per call via…