REST API
If you’re not on JavaScript/TypeScript, drive Tanzanite over plain HTTP. The SDK is a thin wrapper over this surface.
Base URL and auth
Section titled “Base URL and auth”https://api.tanzanite.devThe public /v1 surface is authenticated with your Tanzanite API key, sent
as either header:
Authorization: Bearer tanzanite_your_key_hereX-Tanzanite-Key: tanzanite_your_key_here/api/auth/signup is the one unauthenticated endpoint.
Machine-readable spec
Section titled “Machine-readable spec”The full contract is published as OpenAPI at
/openapi.json. Point your codegen, client, or agent at it
rather than hand-copying endpoints — it is the source of truth.
Core endpoints
Section titled “Core endpoints”| Method | Path | Purpose |
|---|---|---|
POST | /api/auth/signup | Create an account (no API key needed) |
POST | /v1/sessions | Create a session — body { goal, context?, guardrails? } |
GET | /v1/sessions/{id} | Get session status, cost, and rounds |
POST | /v1/sessions/{id}/signal | Control a session — { type: pause | resume | cancel | redirect, ... } |
POST | /v1/sessions/{id}/human-input/{inputId} | Respond to a human-input request |
GET | /v1/sessions/{id}/messages | List messages (limit, after cursor) |
Control signals
Section titled “Control signals”There is one control endpoint, POST /v1/sessions/{id}/signal, with a type:
pause— optionalreason.resume— optionalnewBudget; resuming a cost-limited session requires anewBudgetgreater than the current spend.redirect— requiresmessage(the new direction).cancel— optionalreason; also cancels active rounds and subagents.
Following a session
Section titled “Following a session”Real-time WebSocket streaming on the public /v1 surface is planned but not
yet available. Today, follow a running session by polling:
GET /v1/sessions/{id}— status, cost, and completion report.GET /v1/sessions/{id}/messages?after={lastRoundId}&limit=50— new messages; advance theaftercursor (the lastroundIdyou saw) on each poll.
A status of complete, failed, or cancelled is terminal. waiting_human
means the agent is blocked on a human-input request — respond via
POST /v1/sessions/{id}/human-input/{inputId}, then keep polling.
Low-level client (SDK)
Section titled “Low-level client (SDK)”If you use the SDK but want raw requests, the RestClient is exported:
import { RestClient } from "@tanzanite/sdk";
const client = new RestClient({ baseUrl: "https://api.tanzanite.dev", apiKey: "tanzanite_your_key_here",});
const data = await client.get("/v1/sessions/sess_123");Next steps
Section titled “Next steps”- MCP & Agent Discovery — let agents find you.