ChatGPT

Query ChatGPT via Wire — the answer, citations, and web sources it used

POSThttps://api.anakin.io/v1/wire/task

Run 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"
  }
}
ParameterTypeDescription
action_id requiredstringSet to chatgpt
params.prompt requiredstringThe prompt to send to ChatGPT (max 4096 chars)
params.web_searchbooleanRequest live web search. The response reports whether search actually ran. Default false
params.additional_promptstringOptional follow-up sent in the same conversation
params.include_htmlbooleanAlso include answer_html (rendered DOM, ~0.5 MB). Default false
params.countrystring2-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" }
  }'

Response

202 Accepted
{ "status": "processing", "job_id": "…", "poll_url": "/v1/wire/jobs/…" }

Poll GET /v1/wire/jobs/{id} until status: "completed":

200 OK
{
  "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" }
  }
}
FieldTypeDescription
data.data.answer_textstringThe plain-text answer (also answer_text_markdown, and answer_html when include_html)
data.data.citationsarray{ ref, url, title, domain, position, ref_type, description, result_source, date_published, cited }
data.data.search_sourcesarraySources ChatGPT pulled during web search
data.data.web_search_queriesstring[]The queries ChatGPT actually searched
data.data.web_search_triggeredbooleanWhether live search ran
data.data.adsarrayAd slots when served (see note)

Set web_search: true to force live sources — without it ChatGPT may answer from model knowledge with no citations. Since OpenAI stopped serving ads to non-logged-in sessions, ads is usually empty. Billed only on success.