OpenAI-Compatible Chat API (PRO)
POST /v1/pro/chat/completions $0.05 per call
USDC on Base · x402
OPENAI-COMPATIBLE chat completions, PRO tier — frontier models at one flat price, no API key, no account: gpt-5.2 (default), gpt-5.5, claude-sonnet-5, gemini-3.1-pro, gemini-3.5-flash. Same dialect as OpenAI — base_url https://api.webbersites.com/v1/pro works with any OpenAI SDK. Caps: 24,000 input chars, 1,024 output tokens, text-only, no streaming. The x402 payment IS the auth.
Parameters
| Name | In | Description | |
|---|---|---|---|
model | body | gpt-5.2 (default), gpt-5.5, claude-sonnet-5, gemini-3.1-pro, gemini-3.5-flash | |
messages | body | required | OpenAI-style messages: [{role, content}], text content only, 24,000 chars total |
max_tokens | body | output cap, clamped to 1,024 |
Example request
curl -X POST "https://api.webbersites.com/v1/pro/chat/completions" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-5.2","messages":[{"role":"user","content":"Design a caching strategy for a read-heavy API with 1M daily calls."}]}'
# first call returns 402 + payment requirements; an x402 client pays and retries automaticallyExample response
{
"id": "chatcmpl-...",
"object": "chat.completion",
"model": "gpt-5.2",
"choices": [
{
"message": {
"role": "assistant",
"content": "For a read-heavy API..."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 22,
"completion_tokens": 512
}
}MCP tool: post_v1_pro_chat_completions — via npx -y webbersites-x402-mcp (local, key stays on your machine) or the remote endpoint https://api.webbersites.com/mcp.
How payment works
There is no signup and no API key. Call the endpoint; it replies 402 Payment Required with machine-readable payment requirements. Your client signs a USDC transfer authorization (EIP-3009, gasless) and retries with the X-PAYMENT header — @x402/fetch does this automatically. See the overview for a working snippet.