Skip to content

Ask AI endpoints

Cited answers about one incident or across the corpus. Starter and up.

Endpoints

Paths are under https://threatcluster.io/api/public/v1. Cost is credits per call.

MethodPathCostScope
POST/ask50ai:read
POST/threats/{identifier}/ask25ai:read

POST /ask

Ask AI across the whole corpus

50 credits per call · scope ai:read

One question across every incident, indicator, entity and leak-site record, answered with citations. 50 credits.

The context is assembled by searching the corpus for the question, inlining the matching clusters' reporting and enriching the CVEs and actors it finds. Pass history for a follow-up turn. Model failures refund the credits.

Request body · AskCorpusRequest

FieldTypeRequiredMeaning
querystringyesThe question, 2 to 500 characters.
historyarray or nullnoPrior turns as [{role: user|assistant, content}], up to 20

Request

curl -H "X-API-Key: $TC_KEY" -X POST \
  -H "Content-Type: application/json" -d '{"query":"value"}' \
  "https://threatcluster.io/api/public/v1/ask"

Response fields

FieldTypeMeaning
answerstringMarkdown, with inline citation tags like [A1] that map to sources
sourcesarrayCitation tags → article/cluster they point at
referencesanyClusters and articles the answer drew on: {clusters: [...], articles: [...]}
context_usedobjectWhat the answer was built from, such as the cluster id and title, or the corpus search and tool calls behind it.
costintegerCredits charged for this call
cachedbooleanTrue when the answer came from the one-hour cache of an identical threat ask; always false for /ask.

POST /threats/{identifier}/ask

Ask AI about one incident

25 credits per call · scope ai:read

A grounded, cited answer about one cluster. 25 credits.

action picks a canned analysis (executive_summary, extract_iocs, threat_actor, related_campaigns, vulnerability, recommended_actions) or custom with your own question. The context is the cluster's own reporting: article bodies, sub-articles, IOCs, enriched CVEs and actors, related clusters. Answers cite sources with inline tags that map to sources. Identical canned asks are cached for an hour and cost the same either way; model failures refund the credits.

Parameters

NameInTypeRequiredDefaultMeaning
identifierpathstringyesCluster id: the full UUID or the 8-character short id.

Request body · AskThreatRequest

FieldTypeRequiredMeaning
actionstringnoexecutive_summary · extract_iocs · threat_actor · related_campaigns · vulnerability · recommended_actions · custom
questionstring or nullnoRequired when action is custom

Request

curl -H "X-API-Key: $TC_KEY" -X POST \
  -H "Content-Type: application/json" -d '{}' \
  "https://threatcluster.io/api/public/v1/threats/{identifier}/ask"

Response fields

Same fields as POST /ask.

Errors

Errors are JSON with an error code and a message. A call refused for its key, scope or rate is not charged.

StatusWhen
400A parameter has the wrong form, for example invalid_since for a timestamp that is not ISO-8601.
401The key is missing, wrong or revoked.
403 insufficient_scopeThe key lacks the scope this endpoint needs. The body names required_scope and the scopes the key has.
403 lookback_exceededA free key asked for a record older than its 7-day window.
404Nothing with that id. The credits are refunded and X-Request-Cost is 0.
422The request body or a typed parameter failed validation; the body lists each field.
429Too many calls a minute, or daily_budget_exceeded. Wait for the Retry-After seconds; the daily allowance refills at 00:00 UTC.

Limits by plan

PlanCredits a dayCalls a minuteHistoryRows a list
Free10030Last 7 days10
Starter1,00012090 days50
Growth5,000240Full archive100
Business10,000, plus 10,000 per managed customer, pooled600Full archiveNo cap

Headers and credits are covered in conventions.

Things to know

What the data can miss

Answers come only from ThreatCluster records, so they miss anything not yet clustered.

Standards and sources

FAQ

What are answers based on?

Only on ThreatCluster's own records: for one cluster, its articles, IOCs, CVEs and related clusters; across the corpus, the clusters and articles retrieved for the question. Answers cite their sources with tags that map to the sources list.

Can an answer be wrong?

Yes. Answers are written by a language model from the cited records and can miss or misread something. Check the cited sources before acting on a claim.

What does it cost?

POST /threats/{identifier}/ask costs 25 credits and POST /ask 50, refunded if the model fails. Ask AI needs the ai:read scope, on Starter and up.