{"uid":"cap_FBiqqiM26E0cIbxh7PsIR","slug":"agent402-grounded-chat-completions-31913801","name":"Agent402 Grounded Chat Completions","description":"OpenAI-compatible chat completions GROUNDED in a live web search on every call: the gateway runs an Exa search (up to 5 results) for the prompt, hands the results to the model, and returns the answer with url_citation annotations - $0.03 per call in USDC, no API key, no signup. Model is chosen server-side like the auto tier (omit \"model\" or send \"auto\"; explicit ranked models accepted); the response adds agent402_router {category, quality, served}.","url":"https://agent402.tools/v1/grounded/chat/completions","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"model":{"type":"string","description":"Optional - omit (or send \"auto\") for eval-ranked server-side routing. An explicit model from the auto ranking is honored at the auto caps."},"quality":{"type":"string","description":"Optional routing band when the gateway picks the model: \"fast\" (cheapest/snappiest), \"balanced\" (default), \"best\" (strongest under the flat price). Never changes the price."},"messages":{"type":"array","description":"OpenAI chat messages: [{role, content}] - text and image_url content blocks supported"},"max_tokens":{"type":"number","description":"Output token cap (clamped to the tier maximum)"}}},"responseSchema":{"type":"json","example":{"id":"gen-…","model":"openai/gpt-4o-mini","usage":{"total_tokens":13,"prompt_tokens":12,"completion_tokens":1},"object":"chat.completion","choices":[{"index":0,"message":{"role":"assistant","content":"OK"},"finish_reason":"stop"}],"created":1750000000,"agent402_router":{"served":"openai/gpt-4o-mini","quality":"balanced","category":"general"}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.03","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.03/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.03","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.03","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_tWSIlVOXwqK_wflG0ImOI","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.03","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Answers chat prompts using an LLM grounded in live Exa web search results, returning cited responses with url_citation annotations for $0.03 USDC per call","exampleAgentPrompt":"Search the web and give me a grounded, cited answer: what are the latest developments in fusion energy research as of this week? Use the balanced quality tier.","exampleUseCases":[{"title":"Real-time news summarization with citations","prompt":"What's happening right now with the US-China trade negotiations? Search the web and give me a summary with sources I can check."},{"title":"Current product or pricing research","prompt":"What are the current prices and specs for the top 3 consumer GPU cards available right now? I need cited sources, not old training data."},{"title":"Fact-checking a recent claim","prompt":"Someone told me that a major earthquake hit Japan last week — can you search the web and tell me if that's true, with links to news sources?"}],"resultDescription":"An OpenAI-compatible chat completion response where the assistant's message is grounded in up to 5 live Exa web search results. The response includes url_citation annotations linking claims to source URLs, and an agent402_router metadata block containing the routing category, quality band used, and the model that served the request.","failureModes":["Payment not received or insufficient USDC balance — request rejected with 402 status","Exa search returns no relevant results — model answers from parametric knowledge without web grounding","max_tokens clamped to tier maximum if exceeded — response may be truncated","Invalid messages format (non-array or missing role/content) — 400 error","Explicit model requested that is unavailable or outside auto tier caps — may fall back to auto routing or error"],"whenToPreferThis":"Choose this endpoint when you need an LLM answer that reflects current, real-world information not in the model's training data — particularly for recent events, live pricing, breaking news, or factual claims requiring citations. It is preferable over a bare chat completion when freshness and source attribution matter, and over a raw search API when you want a synthesized, readable answer rather than raw results. The flat $0.03 USDC pay-per-call model with no signup makes it ideal for agents that need occasional grounded queries without committing to a subscription.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T13:09:30.931Z","isFirstParty":false}