Google AI Mode
Query Google's AI Mode — conversational AI answers with citations
https://api.anakin.io/v1/wire/taskGoogle AI Mode is the dedicated conversational AI answer surface. Send a prompt and get the answer with its citations, plus any shopping/local modules Google attaches. Run it with the ai_mode action on POST /v1/wire/task.
Catalog: google_ai_mode · action_id: ai_mode · Credits: 2 / call · Auth: none
Request Body
{
"action_id": "ai_mode",
"params": { "prompt": "best CRM for small teams", "country": "us" }
}| Parameter | Type | Description |
|---|---|---|
action_id required | string | Set to ai_mode |
params.prompt required | string | The prompt to send to Google AI Mode (max 4096 chars) |
params.additional_prompt | string | Optional follow-up in the same conversation |
params.country | string | 2-letter country code to run the request from |
params.include_html | boolean | Also capture the rendered AI Mode page, as a downloadable file linked under data.html_link (answer_html itself stays empty). Default false |
params.device | string | User-agent profile (desktop, desktop_chrome, mobile, …). Default desktop |
Code Examples
curl -X POST http://staging-alb-1217701800.ap-south-1.elb.amazonaws.com/v1/wire/task \
-H "X-API-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"action_id": "ai_mode",
"params": { "prompt": "best CRM for small teams", "country": "us" }
}'import requests
res = requests.post(
'https://api.anakin.io/v1/wire/task',
headers={'X-API-Key': 'your_api_key'},
json={'action_id': 'ai_mode', 'params': {'prompt': 'best CRM for small teams', 'country': 'us'}},
)
job_id = res.json()['job_id']const res = await fetch('http://staging-alb-1217701800.ap-south-1.elb.amazonaws.com/v1/wire/task', {
method: 'POST',
headers: { 'X-API-Key': 'your_api_key', 'Content-Type': 'application/json' },
body: JSON.stringify({
action_id: 'ai_mode',
params: { prompt: 'best CRM for small teams', country: 'us' },
}),
});
const { job_id } = await res.json();Response
202 Accepted{ "status": "processing", "job_id": "…", "poll_url": "/v1/wire/jobs/…" }Poll GET /v1/wire/jobs/{id} until status: "completed":
{
"status": "completed",
"credits_used": 2,
"execution_ms": 21652,
"data": {
"status": "ok",
"data": {
"answer_text": "…", "answer_text_markdown": "…", "answer_text_markdown_cited": "…",
"answer_html": "", "answer_section_html": "",
"citations": [], "references": [], "search_sources": [], "source_count": 6,
"claim_references": [
{ "text": "HubSpot is the easiest platform for beginners…", "start": 0, "end": 46,
"references": [{ "source": "Zapier", "url": "https://zapier.com/…", "more": 2, "source_index": 1 }] }
],
"products": [], "businesses": [], "ads": null, "engine": "ai_mode"
},
"meta": { "action_id": "ai_mode", "catalog_slug": "google_ai_mode", "envelope_version": "v1" }
}
}| Field | Type | Description |
|---|---|---|
data.data.answer_text | string | The answer, also as answer_text_markdown. answer_text_markdown_cited is the same markdown with a [n] marker after each cited sentence (n = source_index + 1) |
data.data.additional_answer_text | string | The answer to additional_prompt, when you send one (also additional_answer_html with include_html) |
data.data.answer_text_raw | string | The raw, unprocessed answer — keeps AI Mode's inline citation-chip labels and placeholder tokens that answer_text strips out |
data.data.follow_up_text | string | null | The reader-addressed closing/follow-up questions, split out of answer_text |
data.data.citations | array | Sources cited in the answer |
data.data.ads | object or null | Text ads on the page: { top: [...], bottom: [...], count }; null when none were shown |
data.data.references | array | The cited sources in { url, title, attribution, domain } shape |
data.data.links_attached | array | The cited sources as a flat list in reading order: { url, text, position } |
data.data.inline_links | array | Links woven into the answer prose, in reading order: { url, text, domain, position } |
data.data.claim_references | array | Where each source is cited in the answer body. One entry per cited sentence: text, its character offsets in answer_text (start/end), and references: [{ source, url, more, source_index }] — the chip's lead source, more = the "+N" grouped-source count, and source_index into citations[] |
data.data.source_count | number | Number of cited sources |
data.data.search_sources | array | Sources considered during search |
data.data.search_sources_detailed | array | The same sources as objects with rank and cited |
data.data.web_search_triggered | boolean | Whether AI Mode actually ran a web search for this answer |
data.data.products | array | Shopping modules for commercial-intent queries |
data.data.businesses | array | Local results for local-intent queries |
claim_referencespopulates on every answer that cites (no parameter needed). A chip surfaces its lead source and the "+N" count; the extra grouped URLs load on click and aren't in the response. Withinclude_html,answer_htmlis empty on the browser path — the rendered page ships as a downloadable file viadata.html_link(durable). AI Mode is geo-sensitive — availability and phrasing vary bycountry. Billed only on success.