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.
| Method | Path | Cost | Scope |
|---|---|---|---|
| POST | /ask | 50 | ai:read |
| POST | /threats/{identifier}/ask | 25 | ai: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
| Field | Type | Required | Meaning |
|---|---|---|---|
| query | string | yes | The question, 2 to 500 characters. |
| history | array or null | no | Prior 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
| Field | Type | Meaning |
|---|---|---|
| answer | string | Markdown, with inline citation tags like [A1] that map to sources |
| sources | array | Citation tags → article/cluster they point at |
| references | any | Clusters and articles the answer drew on: {clusters: [...], articles: [...]} |
| context_used | object | What the answer was built from, such as the cluster id and title, or the corpus search and tool calls behind it. |
| cost | integer | Credits charged for this call |
| cached | boolean | True 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
| Name | In | Type | Required | Default | Meaning |
|---|---|---|---|---|---|
| identifier | path | string | yes | Cluster id: the full UUID or the 8-character short id. |
Request body · AskThreatRequest
| Field | Type | Required | Meaning |
|---|---|---|---|
| action | string | no | executive_summary · extract_iocs · threat_actor · related_campaigns · vulnerability · recommended_actions · custom |
| question | string or null | no | Required 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.
| Status | When |
|---|---|
| 400 | A parameter has the wrong form, for example invalid_since for a timestamp that is not ISO-8601. |
| 401 | The key is missing, wrong or revoked. |
| 403 insufficient_scope | The key lacks the scope this endpoint needs. The body names required_scope and the scopes the key has. |
| 403 lookback_exceeded | A free key asked for a record older than its 7-day window. |
| 404 | Nothing with that id. The credits are refunded and X-Request-Cost is 0. |
| 422 | The request body or a typed parameter failed validation; the body lists each field. |
| 429 | Too 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
| Plan | Credits a day | Calls a minute | History | Rows a list |
|---|---|---|---|---|
| Free | 100 | 30 | Last 7 days | 10 |
| Starter | 1,000 | 120 | 90 days | 50 |
| Growth | 5,000 | 240 | Full archive | 100 |
| Business | 10,000, plus 10,000 per managed customer, pooled | 600 | Full archive | No 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.