ChatGPT
Query ChatGPT via Wire — the answer, citations, and web sources it used
POST
https://api.anakin.io/v1/wire/taskRun a prompt against ChatGPT and get the full answer with the web sources it cited when search is on — 1:1 with the real logged-in experience. Run it with the chatgpt action on POST /v1/wire/task.
Catalog: ai-assistants · action_id: chatgpt · Credits: 2 / call · Auth: none
Request Body
{
"action_id": "chatgpt",
"params": {
"prompt": "best CRM for small teams",
"web_search": true,
"country": "us"
}
}| Parameter | Type | Description |
|---|---|---|
action_id required | string | Set to chatgpt |
params.prompt required | string | The prompt to send to ChatGPT (max 4096 chars) |
params.web_search | boolean | Request live web search. The response reports whether search actually ran. Default false |
params.additional_prompt | string | Optional follow-up sent in the same conversation |
params.include_html | boolean | Also include answer_html (rendered DOM, ~0.5 MB). Default false |
params.country | string | 2-letter proxy country for the session. Default us |
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": "chatgpt",
"params": { "prompt": "best CRM for small teams", "web_search": true, "country": "us" }
}'import requests
res = requests.post(
'https://api.anakin.io/v1/wire/task',
headers={'X-API-Key': 'your_api_key'},
json={
'action_id': 'chatgpt',
'params': {'prompt': 'best CRM for small teams', 'web_search': True, '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: 'chatgpt',
params: { prompt: 'best CRM for small teams', web_search: true, 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": 17889,
"data": {
"status": "ok",
"data": {
"prompt": "best CRM for small teams",
"title": "Best CRMs for small teams",
"answer_text": "For small teams, the strongest options are …",
"answer_text_markdown": "…",
"citations": [
{ "ref": 1, "url": "https://…", "title": "…", "domain": "…", "position": 1,
"ref_type": "web", "description": "…", "result_source": "search", "date_published": "…", "cited": true }
],
"search_sources": [], "web_search_queries": ["best CRM small teams 2026"], "web_search_triggered": true,
"ads": [], "shopping": [], "entities": [], "recommendations": [], "business_locations": [],
"model": "gpt-…", "country": "us", "timestamp": "…"
},
"meta": { "action_id": "chatgpt", "catalog_slug": "ai-assistants", "envelope_version": "v1" }
}
}| Field | Type | Description |
|---|---|---|
data.data.answer_text | string | The plain-text answer (also answer_text_markdown, and answer_html when include_html) |
data.data.citations | array | { ref, url, title, domain, position, ref_type, description, result_source, date_published, cited } |
data.data.search_sources | array | Sources ChatGPT pulled during web search |
data.data.web_search_queries | string[] | The queries ChatGPT actually searched |
data.data.web_search_triggered | boolean | Whether live search ran |
data.data.ads | array | Ad slots when served (see note) |
Set
web_search: trueto force live sources — without it ChatGPT may answer from model knowledge with no citations. Since OpenAI stopped serving ads to non-logged-in sessions,adsis usually empty. Billed only on success.