Skip to main content
GET
/
v1
/
agent
/
answer
/
runs
/
{run_id}
Poll an answer agent run
curl --request GET \
  --url https://tako.com/api/v1/agent/answer/runs/{run_id} \
  --header 'X-API-Key: <api-key>'
import requests

url = "https://tako.com/api/v1/agent/answer/runs/{run_id}"

headers = {"X-API-Key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};

fetch('https://tako.com/api/v1/agent/answer/runs/{run_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://tako.com/api/v1/agent/answer/runs/{run_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://tako.com/api/v1/agent/answer/runs/{run_id}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("X-API-Key", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://tako.com/api/v1/agent/answer/runs/{run_id}")
.header("X-API-Key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://tako.com/api/v1/agent/answer/runs/{run_id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "run_id": "<string>",
  "created_at": "<string>",
  "object": "agent.run",
  "thread_id": "<string>",
  "completed_at": "<string>",
  "result": {
    "answer": "<string>",
    "cards": [
      {
        "card_id": "<string>",
        "title": "<string>",
        "description": "<string>",
        "semantic_description": "<string>",
        "webpage_url": "<string>",
        "image_url": "<string>",
        "embed_url": "<string>",
        "sources": [
          {
            "source_name": "S&P Global",
            "source_description": "<string>",
            "url": "https://xignite.com",
            "source_text": "<string>"
          }
        ],
        "methodologies": [
          {
            "methodology_name": "Where the Data Comes From - S&P Global",
            "methodology_description": "The financial metrics are collected from S&P Global, where information is sourced from original regulatory filings, press releases, and subsequent restatements. Data points, including over 5,000 financial, supplemental, segment, ratio, and industry-specific items, are standardized across over 180,000 companies to ensure consistency and comparability across different reporting formats. This comprehensive and methodical process enables robust historical analysis and back-testing by seamlessly integrating diverse financial datasets while preserving the granularity of the original reports."
          }
        ],
        "source_indexes": [],
        "card_type": "<string>",
        "content": {
          "cost": 0,
          "data": "<string>",
          "records": [
            {}
          ],
          "dataset": {
            "columns": [
              {
                "name": "<string>"
              }
            ],
            "rows": [
              [
                "<string>"
              ]
            ],
            "total_rows": 123,
            "truncated": true,
            "ref": "<string>",
            "sources": [
              {
                "name": "<string>",
                "index": "data"
              }
            ],
            "provenance": "query"
          },
          "url": "<string>",
          "expires_at": "<string>",
          "total_rows": 123,
          "truncated": false,
          "export_pricing": {
            "baseline_usd": 123,
            "row_cpm_usd": 123,
            "free_rows": 123,
            "max_rows_ceiling": 123
          }
        },
        "relevance_score": 123,
        "nodes": [
          {
            "id": "<string>",
            "name": "<string>",
            "description": "<string>"
          }
        ]
      }
    ],
    "citations": [
      {
        "index": 123,
        "title": "<string>",
        "url": "<string>",
        "source_name": "<string>",
        "excerpt": "<string>",
        "publish_date": "<string>",
        "content": {
          "cost": 0,
          "data": "<string>",
          "records": [
            {}
          ],
          "dataset": {
            "columns": [
              {
                "name": "<string>"
              }
            ],
            "rows": [
              [
                "<string>"
              ]
            ],
            "total_rows": 123,
            "truncated": true,
            "ref": "<string>",
            "sources": [
              {
                "name": "<string>",
                "index": "data"
              }
            ],
            "provenance": "query"
          },
          "url": "<string>",
          "expires_at": "<string>",
          "total_rows": 123,
          "truncated": false,
          "export_pricing": {
            "baseline_usd": 123,
            "row_cpm_usd": 123,
            "free_rows": 123,
            "max_rows_ceiling": 123
          }
        }
      }
    ],
    "metadata": {
      "definitions": [
        {
          "term": "<string>",
          "definition": "<string>",
          "source_ref": 123
        }
      ],
      "assumptions": [
        {
          "title": "<string>",
          "description": "<string>",
          "category": "<string>",
          "source_ref": 123
        }
      ],
      "methodology": [
        {
          "title": "<string>",
          "description": "<string>"
        }
      ]
    },
    "request_id": "<string>"
  },
  "error": {
    "code": "<string>",
    "message": "<string>"
  },
  "usage": {
    "total_cost_usd": 123,
    "compute": {
      "cost_usd": 123
    },
    "data": {
      "cost_usd": 123,
      "datasets": 123
    }
  },
  "request": {
    "query": "<string>",
    "thread_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "effort": "medium",
    "source_indexes": [],
    "locale": "en-US",
    "timezone": "<string>",
    "output_settings": {
      "image_dark_mode": true
    }
  }
}
{
"code": "<string>",
"message": "<string>"
}
{
"code": "<string>",
"message": "<string>"
}
{
"code": "<string>",
"message": "<string>"
}

Notes

  • Poll with the run_id returned by Dispatch an Answer Agent run. status progresses queuedrunningcompleted / failed; the result (an AnswerAgentResult) is populated once status is completed.
  • The result carries answer (markdown with [n] citation markers), citations (the registry those markers join), cards, and metadata. There is no structured_output and no web_results — a prose-only answer with no cards is legitimate.
  • To resume or tail the run as a live Server-Sent Events stream, send Accept: text/event-stream. Use starting_after (or the Last-Event-ID header) to replay only events whose seq is greater than a value you’ve already seen. See the Answer Agent guide.

Authorizations

X-API-Key
string
header
required

Path Parameters

run_id
string
required

Run ID returned by POST /v1/agent/answer/runs

Query Parameters

starting_after
integer

SSE resume cursor (Accept: text/event-stream only). Replay events with seq strictly greater than this value. Equivalent to the Last-Event-ID header.

Required range: x >= 0

Response

Current state of the agent run. With Accept: text/event-stream, resumes/tails the run as an SSE stream of AnswerAgentStreamEnvelope events (use starting_after or Last-Event-ID to resume); if the stream ends without an agent_result event, poll this endpoint with Accept: application/json for terminal status.

The answer-agent run resource returned by dispatch (202) and poll (GET).

run_id
string
required
status
enum<string>
required
Available options:
queued,
running,
completed,
failed
created_at
string
required
object
string
default:agent.run
Allowed value: "agent.run"
thread_id
string | null
completed_at
string | null
result
AnswerAgentResult · object | null

Final answer-agent output. answer is markdown prose with [n] citation markers; citations is the unified top-level registry the [n] markers join; cards reuse the sibling TakoCard; metadata carries definitions/assumptions/ methodology. NO inline data, NO structured output, NO web_results — ever. Prose-only (empty cards) is legitimate.

error
ErrorObject · object | null
usage
Usage · object | null

Cost-plus usage for one metered request. total_cost_usd is always present (the total quoted charge). compute / data are the additive breakdown and appear only where they apply. See module docstring for the quote-vs-drawdown caveat and the total == compute + data invariant.

request
AnswerAgentRunRequest · object | null

Request body for POST /v1/agent/answer/runs.

Frozen contract: NO output_schema / structured outputs, NO inline data — ever. Cards are the only data-export path (via /v1/contents).