Concepts
Base URL and format
Every endpoint is under https://platform.teroatlas.ai/v1. Requests and responses are JSON,
except map images and streamed answers. IDs are strings, and times are ISO 8601 in UTC. Every
response carries an X-Request-Id header; quote it when you contact support.
Datasets
TeroAI answers from its US geospatial and census-style datasets, such as congressional
districts and ZIP codes. Each dataset belongs to a TeroAI product, and GET /v1/schemas lists
the datasets of the products your organization has. A new conversation runs on one dataset:
the one you pass as schema, or your organization’s default. Follow-ups stay on the
conversation’s dataset. A dataset of a product your organization doesn’t have fails with
product_not_entitled, and naming another dataset in a follow-up fails with schema_mismatch.
Conversations
A question starts a conversation unless you pass a conversation_id. Follow-ups in the same
conversation build on the earlier answers, so “And which have the lowest?” works. A
conversation holds up to 10 questions; branch it to keep going.
Conversations belong to the person whose key asked them, in that organization. The list at
GET /v1/conversations shows those started through the API or an MCP client; pass
source=app for the ones started in the TeroAI app, or source=all for both. Each
conversation says its source.
A new conversation joins the list once its first answer is saved. If that first question fails
or is cancelled, no conversation is left behind; ask again without conversation_id.
Answers
An answer is a message with:
answer: the plain-language answer,sql: the query that produced it, so you can check it,rows: up to 1000 result rows, withrow_countandrows_truncatedwhen there are more,message_id: the ID to page through its rows (GET /v1/messages/{id}/rows) or to build on it.
mode: "analysis" reasons over the answers already in a conversation instead of running a new
query, and needs a conversation_id.
Derived outputs
From an answer’s message_id you can make:
| Output | Endpoint | Result |
|---|---|---|
| Chart | POST /v1/messages/{id}/chart | A chart specification: type, categories and series |
| Map | POST /v1/messages/{id}/map | A PNG 1200 pixels wide, or SVG. Maps draw congressional districts |
| Report | POST /v1/messages/{id}/report | A written report with sections, 1 to 10 pages |
| SQL explanation | POST /v1/messages/{id}/sql_explanation | The SQL explained in plain language |
See Charts and maps.
What spends quota
Questions and derived outputs use the analysis service and count toward the organization’s
monthly token quota, shared with the app. Reading conversations, answers, rows and usage is
free. Every answer includes usage, and GET /v1/usage returns it on its own. See
Rate limits and quotas.
Answers are AI-generated
Answers can be wrong or incomplete. The SQL is returned so important figures can be checked. Read the data disclaimer.