Quickstart
From an API key to a first answer in a few minutes. Your organization needs API access first; see Getting access.
Create an API key
In the TeroAI app , open Dashboard → API Keys and create a key. Keep every permission selected for now. The key is shown once, so copy it, then keep it in an environment variable:
export TERO_API_KEY="tero_YOUR_API_KEY"Check the key
curl https://platform.teroatlas.ai/v1/me \
-H "Authorization: Bearer $TERO_API_KEY"The response names you, your organization and the key’s scopes. A 401 means the key was
mistyped, revoked or has expired.
Ask a question
curl https://platform.teroatlas.ai/v1/questions \
-H "Authorization: Bearer $TERO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"question": "Which 5 congressional districts in Texas have the highest median household income?"}'The answer comes back with the SQL that produced it and the rows:
{
"message_id": "m7b2c4d6-1a3e-4f5a-8b9c-0d1e2f3a4b5c",
"conversation_id": "c3a1f0d2-6c55-4b8e-9d0a-1f2e3d4c5b6a",
"answer": "The five Texas districts with the highest median household income are …",
"sql": "SELECT district, median_household_income FROM … ORDER BY 2 DESC LIMIT 5",
"rows": [{ "district": "TX-3", "median_household_income": 121000 }],
"row_count": 5,
"rows_truncated": false,
"geography_ids": [],
"execution_time_ms": 1830,
"tokens": { "input": 1200, "output": 300, "total": 1500 },
"usage": {
"tokens_used": 121500,
"token_limit": 2500000,
"percent_used": 4.9,
"resets_at": "2026-11-01T00:00:00.000Z"
}
}Follow up, and make a map
Pass the conversation_id to ask a follow-up that builds on the first answer, and the
message_id to work with an answer:
curl https://platform.teroatlas.ai/v1/questions \
-H "Authorization: Bearer $TERO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"question": "And which have the lowest?", "conversation_id": "c3a1f0d2-6c55-4b8e-9d0a-1f2e3d4c5b6a"}'
curl -X POST https://platform.teroatlas.ai/v1/messages/m7b2c4d6-1a3e-4f5a-8b9c-0d1e2f3a4b5c/map \
-H "Authorization: Bearer $TERO_API_KEY" \
-H "Content-Type: application/json" \
-d '{}' \
-o map.pngConnect an AI assistant
The MCP server gives assistants the same abilities. In Claude Code:
claude mcp add --transport http teroai https://mcp.teroatlas.ai/mcpThen run /mcp, choose teroai and sign in. A TeroAI page asks which organization and
permissions to grant. Other assistants: Connecting a client.
Answers usually take 10 to 30 seconds and can take over a minute. For long questions, ask for a stream: see Long-running requests.
Next
- Concepts: conversations, answers and what costs quota.
- API reference: every endpoint.
- TypeScript SDK: the same calls, typed.