# Spoof Zone — LLM onboarding You are an AI agent reading this to connect yourself to Spoof Zone. Spoof is a pay-per-call API gateway. There is no subscription and no minimum: you fund a wallet with a stablecoin (USDC on Base, Arbitrum, or Solana, or USDG on the Robinhood chain) and each call is billed onchain at its listed price. You are only charged for output actually delivered. Two capabilities are exposed: - Text: Claude models via an Anthropic Messages API-compatible endpoint. - Images: Nano Banana image generation via OpenAI-compatible endpoints. ## Base URL https://api.spoofzone.com For direct API calls (curl / SDKs), use the versioned base: https://api.spoofzone.com/v1 For Claude Code, use the origin above without the /v1 suffix (Claude Code appends /v1 itself). ## Get an API key 1. Sign in at https://app.spoofzone.com 2. Open the Keys page and create a key. 3. The key starts with "spf_" and is shown only once. Store it securely. Send the key on every request as either header: x-api-key: spf_your_key Authorization: Bearer spf_your_key ## Fund your wallet (pay per call) Add funds to your wallet from the dashboard. Four chains are supported: USDC on Base, Arbitrum, or Solana, or USDG (Global Dollar) on the Robinhood chain. You are billed on whichever chain you funded. Every request is funds-gated before it runs: your wallet must hold enough to cover the call's worst-case price, or the request is rejected with HTTP 402. Settlement happens per call. Choosing a chain per request (optional): by default you are billed on the chain set in your dashboard. To override for a single call, send the header "x-spoof-billing-chain: ", where is base, arbitrum, solana, or robinhood (or "auto" to use your dashboard default). An explicit chain settles there, or returns HTTP 402 if that chain is underfunded (no silent re-routing). Every response echoes an "x-spoof-billing-chain" header naming the chain it billed on. Text is priced per 1,000,000 tokens (input, output, and cache separately); prompt-cache writes cost 1.25x the input rate (5-minute cache) or 2x (1-hour cache). Images are priced per delivered image, by resolution. Live prices are on the Pricing page in the dashboard. ## Text: Claude models (recommended via Claude Code) The recommended way to use Claude models is Claude Code, Anthropic's coding agent, pointed at this gateway. Claude models are currently accessed through Claude Code; other third-party clients (for example Cursor) are not supported yet. Connect Claude Code: export ANTHROPIC_BASE_URL=https://api.spoofzone.com export ANTHROPIC_AUTH_TOKEN=spf_your_key claude On Windows (PowerShell): $env:ANTHROPIC_BASE_URL = "https://api.spoofzone.com" $env:ANTHROPIC_AUTH_TOKEN = "spf_your_key" claude To make it persistent, add to ~/.claude/settings.json: { "env": { "ANTHROPIC_BASE_URL": "https://api.spoofzone.com", "ANTHROPIC_AUTH_TOKEN": "spf_your_key" } } Verify inside Claude Code with /status: the gateway should be listed as the Anthropic base URL. Don't have Claude Code? Install it: macOS / Linux: curl -fsSL https://claude.ai/install.sh | bash Windows: winget install Anthropic.ClaudeCode ## Endpoints POST https://api.spoofzone.com/v1/messages Anthropic Messages API-compatible. Streaming supported (`"stream": true`). Pass one of the model ids below in `model`. `max_tokens` is required and is clamped to the gateway ceiling; if clamped, the response carries an x-spoof-clamped-max-tokens header. Unknown fields pass through to the model. Available models: claude-fable-5 claude-haiku-4-5 claude-opus-4-6 claude-opus-4-7 claude-opus-4-8 claude-opus-5 claude-sonnet-4-6 claude-sonnet-5 POST https://api.spoofzone.com/v1/messages/count_tokens Anthropic-compatible token counting for a prompt (pricing / context pre-check). POST https://api.spoofzone.com/v1/images/generations OpenAI-compatible text-to-image. Returns { created, data: [{ b64_json }] }, or { data: [{ url }] } when response_format is "url". model: nano-banana-pro | nano-banana-2 prompt: required size: 1K | 2K | 4K (default 1K) aspect_ratio: 1:1 2:3 3:2 3:4 4:3 4:5 5:4 9:16 16:9 21:9 (default 1:1) n: 1 response_format: b64_json | url (default b64_json) POST https://api.spoofzone.com/v1/images/edits OpenAI-compatible image-to-image (edit, transform, style transfer, multi-image blend). multipart/form-data carrying 1 to 14 reference images in `image` fields plus the same scalar fields as generations. GET https://api.spoofzone.com/v1/health Readiness check. No auth. ## Examples Text (curl): curl https://api.spoofzone.com/v1/messages \ -H "x-api-key: spf_your_key" \ -H "anthropic-version: 2023-06-01" \ -H "content-type: application/json" \ -H "user-agent: claude-cli/2.1.66 (external, cli)" \ -d '{"model":"claude-sonnet-4-6","max_tokens":256,"messages":[{"role":"user","content":"Hello"}]}' Text (Anthropic Python SDK): from anthropic import Anthropic client = Anthropic(base_url="https://api.spoofzone.com", api_key="spf_your_key") msg = client.messages.create( model="claude-sonnet-4-6", max_tokens=256, messages=[{"role": "user", "content": "Hello"}], ) print(msg.content) Image generation (curl): curl https://api.spoofzone.com/v1/images/generations \ -H "x-api-key: spf_your_key" \ -H "content-type: application/json" \ -d '{"model":"nano-banana-pro","prompt":"A cat astronaut, studio lighting","size":"1K","response_format":"url"}' Image generation (OpenAI Python SDK): from openai import OpenAI client = OpenAI(base_url="https://api.spoofzone.com/v1", api_key="spf_your_key") result = client.images.generate( model="nano-banana-pro", prompt="A cat astronaut, studio lighting", size="1K", response_format="url", ) print(result.data[0].url) Image edit (curl): curl https://api.spoofzone.com/v1/images/edits \ -H "x-api-key: spf_your_key" \ -F model=nano-banana-2 \ -F "prompt=Make it a watercolor painting" \ -F size=1K \ -F image=@input.png ## Errors Errors return a JSON body with an error code and message and an x-request-id header. Common cases: 401 (missing/invalid key), 402 (wallet underfunded for this call), 403 (access not active or unsupported client), 429 (rate limited).