{"uid":"cap_L8oQvE5AN1S5ss7OCOpus","slug":"gedx402-chat-completions-x402-9ba73ea7","name":"GEDX402 Chat Completions (x402)","description":"x402 metrics and paid tools","url":"https://gateway.gedx402.com/v1/chat/completions","method":"GET","headers":{},"bodySchema":{"type":"object","properties":{"model":{"type":"string"},"messages":{"type":"array","items":{"type":"object"}},"max_tokens":{"type":"integer"}}},"responseSchema":{"type":"json","example":{"id":"chatcmpl-example","object":"chat.completion","choices":[{"index":0,"message":{"role":"assistant","content":"Hello!"},"finish_reason":"stop"}]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"1.852","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$1.852/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"1.852","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"1.852","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_IADmTmC8lBrQyKt2aV_Tu","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"1.852","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Sends a chat completion request to Cloudflare Workers AI, billed per-call via USDC micropayment on supported blockchains — no API key required.","exampleAgentPrompt":"Using the GEDX402 gateway — which accepts USDC payment instead of API keys — send this conversation to the @cf/meta/llama-3-8b-instruct model and get a reply: system says 'You are a helpful assistant', user asks 'What are the main advantages of Cloudflare Workers?', with a max of 512 tokens.","exampleUseCases":null,"resultDescription":"Returns an OpenAI-compatible chat completion JSON object with a unique completion ID, the assistant's reply message, finish reason, and usage metadata — structured identically to the OpenAI chat/completions response format.","failureModes":["Payment not received or insufficient USDC — 402 Payment Required","Unsupported blockchain network specified — payment rejected","Invalid model identifier — model not available on Cloudflare Workers AI","Malformed messages array — 400 Bad Request","max_tokens exceeds model context limit — truncation or error","Network timeout on Cloudflare Workers edge — 503 or timeout error"],"whenToPreferThis":"Choose this endpoint when you need LLM chat completions without registering for an API key, want to pay per-call in USDC on chains like Base, Polygon, Arbitrum, World, or Solana, or are building an agent workflow that uses the x402 micropayment protocol for permissionless AI access.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:37:55.615Z","isFirstParty":false}