{"uid":"cap__-ZOheRGCH8yb0q-2YRTr","slug":"agent-exchange-chat-completions-llm-inference-3e1279ca","name":"Agent Exchange Chat Completions (LLM Inference)","description":"Machine-payable data APIs for AI agents across web search, on-chain reads, trading data, market judgment, and AI visibility. The canonical x402 catalog currently exposes 85 paid routes. Pay per call in USDC via x402 on Base. No API keys, no signup.","url":"https://store.agentexchange.work/v1/chat/completions","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"messages":{"type":"string"}}},"responseSchema":{"type":"json","example":{"id":"chatcmpl-123","object":"chat.completion","choices":[{"message":{"role":"assistant","content":"Hello."}}]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Vp8_cNJ2LvYZCYJsLNJjK","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Runs chat completions via a hosted LLM (Llama 3.1 8B) with pay-per-call USDC or monthly card billing","exampleAgentPrompt":"Send this conversation thread to a Llama 3.1 model and give me its reply — I want to pay per call without setting up a subscription: 'You are a helpful assistant. User: summarize the key risks of staking ETH.'","exampleUseCases":[{"title":"Pay-per-call AI for agent pipelines","prompt":"I'm building an agent that calls an LLM occasionally — I don't want a monthly OpenAI subscription. Use the Agent Exchange chat completions endpoint to send this message and pay per call in USDC: 'You are a financial analyst. Summarize the top three risks of investing in small-cap crypto tokens.'"},{"title":"One-off LLM query for analyst","prompt":"I need a quick AI-generated summary without signing up for anything. Call a hosted Llama model with this prompt: 'Explain the difference between proof-of-work and proof-of-stake in two paragraphs,' and just charge the $0.002 per-call fee."},{"title":"Prototype chatbot without subscription","prompt":"I'm prototyping a customer support bot and want to test Llama 3.1 responses right now. Send the message 'You are a polite support agent. User: How do I reset my password?' to the Agent Exchange chat endpoint and show me what it returns."}],"resultDescription":"Returns an OpenAI-compatible JSON object containing: a unique completion ID, the model name used (@cf/meta/llama-3.1-8b-instruct-fp8), a choices array with the assistant's reply message, and a usage object with prompt_tokens, completion_tokens, and total_tokens counts.","failureModes":["Payment not included or insufficient USDC — 402 Payment Required response","Malformed messages field (not a valid conversation structure) — 400 Bad Request","Model overloaded or Cloudflare Workers AI backend unavailable — 503 or timeout","Missing or invalid API key for monthly-subscription callers — 401 Unauthorized","Empty or null messages input — likely returns an error or empty completion"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, OpenAI-compatible chat completions API with no signup friction, especially for agent workflows that benefit from x402 micropayment billing (pay $0.002 USDC per call) or a flat $29/month card option. It is ideal for prototyping, low-volume agent pipelines, or scenarios where avoiding a long-term LLM vendor contract matters. Prefer alternatives (OpenAI, Anthropic direct APIs) if you need GPT-4-class capability, function calling, vision, or higher-quality instruction following than Llama 3.1 8B provides.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T18:34:23.056Z","isFirstParty":false}