Google AI Mode (JSON Body)
Same behaviour as GET /v1/web/ai-mode, with the parameters sent as a JSON body instead of query string parameters. Use POST for long prompts that do not fit comfortably in a URL. If a parameter is sent in both places, a non-empty query string value takes precedence over the body. In the rare case where Google returns no answer, the response is still 200 with an empty reply_parts array. Every field may be sent either in the JSON body or as a query parameter; when both are present the query parameter wins. A request that supplies prompt as a query parameter therefore needs no body at all.
Price: $0.005 per request. Free tier: 50 requests/month.
Request
- Base URL: https://apidirect.io
- URL: https://apidirect.io/v1/web/ai-mode
- Auth: API key in header X-API-Key
Query parameters
The AI Mode prompt (max 12000 characters). Optional on POST: overrides the same field in the JSON body when both are sent
2-letter ISO 3166-1 alpha-2 country code. A value that is not exactly 2 letters is rejected with 400. Optional on POST: overrides the same field in the JSON body when both are sent
2-letter ISO 639-1 language code. A value that is not exactly 2 letters is rejected with 400. Optional on POST: overrides the same field in the JSON body when both are sent
Token from a previous AI Mode response. Pass it to continue the conversation with prior context. Treat as an opaque string. Optional on POST: overrides the same field in the JSON body when both are sent
Request body
Response
Successful response
Changes
No recorded changes to this operation across all 1 revision of this API.