{"uid":"cap_UyFQAszVAMUnh9sImtIcu","slug":"api-direct-ai-mode-web-search-post-style-json-body-68ff9826","name":"API Direct – AI Mode Web Search (POST-style JSON body)","description":"Same behaviour as GET /v1/web/ai-mode, with the parameters sent as a JSON body instead of query string parameters.","url":"https://x402.apidirect.io/v1/web/ai-mode?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","required":["prompt"],"properties":{"prompt":{"type":"string","maxLength":12000,"description":"The AI Mode prompt (max 12000 characters)"},"country":{"type":"string","default":"us","maxLength":2,"minLength":2,"description":"2-letter ISO 3166-1 alpha-2 country code. A value that is not exactly 2 letters is rejected with 400."},"language":{"type":"string","default":"en","maxLength":2,"minLength":2,"description":"2-letter ISO 639-1 language code. A value that is not exactly 2 letters is rejected with 400."},"session_token":{"type":"string","description":"Token from a previous AI Mode response. Pass it to continue the conversation with prior context. Treat as an opaque string."}}}},"additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.006","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.006/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.006","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.006","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_O-XrpS2qBLA4qvpilSsg4","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.006","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Submits a conversational AI Mode prompt to a Google-powered AI search and returns an AI-generated answer with supporting sources, using a JSON body instead of query string parameters.","exampleAgentPrompt":"Search Google AI Mode for 'What are the main differences between supervised and unsupervised machine learning?' in English for the US, and give me a full AI-generated answer with sources.","exampleUseCases":[{"title":"Research question with AI synthesis","prompt":"Use AI Mode search to answer 'What caused the 2008 financial crisis and what reforms followed?' — I want an AI-synthesized summary with sources, in English for the US."},{"title":"Multi-turn follow-up in AI conversation","prompt":"Continue my AI Mode search session using this token and ask as a follow-up: 'How does that compare to the Great Depression?'"},{"title":"Country-specific localized search","prompt":"Search AI Mode with the prompt 'What are the current tax brackets for individuals?' targeting France (country code fr) and return results in French (fr)."}],"resultDescription":"Returns an AI-generated natural language answer synthesizing information from across the web, along with cited sources, rankings, and optionally a new session_token for continuing the conversation in subsequent calls.","failureModes":["400 Bad Request if country or language code is not exactly 2 characters","400 Bad Request if prompt exceeds 12,000 characters","402 Payment Required if the x402 payment header is missing or invalid","Invalid session_token causes context loss or session reset","Prompt that violates content policy may return empty or filtered result","Rate limiting or upstream Google AI Mode unavailability returns 5xx"],"whenToPreferThis":"Choose this endpoint when you need an AI-synthesized, conversational answer from Google's AI Mode search rather than a raw list of links — especially for complex or multi-part questions where a summarized response with cited sources is more useful than organic search results. Prefer the JSON body variant (this endpoint) when constructing requests programmatically and a structured body is more convenient than URL-encoded query parameters. Use the sibling GET endpoint instead if you prefer query string parameters.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-28T11:04:53.235Z","isFirstParty":false,"canonicalSlug":"api-direct-ai-mode-web-search-post-style-json-body-68ff9826"}