Gemini
Query Google Gemini via Wire — structured answers with grounding sources
POST
https://api.anakin.io/v1/wire/taskRun a prompt against Gemini and get its answer with grounding sources and citations, plus multi-turn support via conversation_id. Run it with the gemini_prompt action on POST /v1/wire/task.
Catalog: gemini · action_id: gemini_prompt · Credits: 2 / call · Auth: none
Request Body
{
"action_id": "gemini_prompt",
"params": { "prompt": "best CRM for small teams", "country": "us" }
}| Parameter | Type | Description |
|---|---|---|
action_id required | string | Set to gemini_prompt |
params.prompt required | string | Your question or instruction for Gemini (up to 8192 chars) |
params.country | string | Region to send the request from (2-letter code). Default us |
params.additional_prompt | string | Optional follow-up, asked in the same conversation |
params.include_html | boolean | Also return the answer as HTML under answer_html. Default false |
Code Examples
curl -X POST https://api.anakin.io/v1/wire/task \
-H "X-API-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"action_id": "gemini_prompt",
"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': 'gemini_prompt', 'params': {'prompt': 'best CRM for small teams', 'country': 'us'}},
)
job_id = res.json()['job_id']const res = await fetch('https://api.anakin.io/v1/wire/task', {
method: 'POST',
headers: { 'X-API-Key': 'your_api_key', 'Content-Type': 'application/json' },
body: JSON.stringify({
action_id: 'gemini_prompt',
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": 19948,
"data": {
"status": "ok",
"data": {
"answer_text": "…", "answer_text_markdown": "…",
"citations": [
{ "url": "https://…", "title": "…", "domain": "…", "position": 1,
"ref_type": "web", "description": "…", "result_source": "search", "cited": true }
],
"sources": [], "search_sources": [],
"conversation_id": "…", "response_id": "…",
"related_media": [], "detected_location": "…", "language": "en",
"tools_used": ["search"], "model": "gemini-…"
},
"meta": { "action_id": "gemini_prompt", "catalog_slug": "gemini", "envelope_version": "v1" }
}
}| Field | Type | Description |
|---|---|---|
data.data.answer_text | string | The answer (also answer_text_markdown, and answer_html when include_html) |
data.data.citations | array | Grounding sources — { url, title, domain, position, ref_type, description, result_source, cited } |
data.data.conversation_id | string | Reuse to continue the thread (multi-turn) |
data.data.detected_location | string | How Gemini localized the answer for country |
data.data.tools_used | string[] | Tools Gemini invoked (e.g. search) |
Multi-turn: reuse the returned
conversation_idon the next call to continue the same thread. Billed only on success.