Developer API Reference

Complete documentation for the TokenStrata Token Intelligence Platform API — inference, billing, agents, AMM, and more.

183
Endpoints
9
API Groups
OA 3.0
OpenAPI
JWT + ts_
Auth Methods
🔐

Authentication

All API requests require a bearer token. Use your ts_ API key or JWT token:
Authorization: Bearer ts_your_api_key_here
Click the Authorize button below to authenticate in the interactive explorer.

Quick Start Examples

⚡ Chat Completion

OpenAI-compatible inference — drop-in replacement for existing integrations.

curl -X POST https://tokenstrata.com/api/v1/chat/completions \
  -H "Authorization: Bearer ts_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "tokenstrata-prime",
    "messages": [
      {"role": "user", "content": "Hello!"}
    ]
  }'

🧠 InfiniteContext™

Persistent cross-call context. Pass session_id to maintain conversation history.

curl -X POST https://tokenstrata.com/api/v1/chat/completions \
  -H "Authorization: Bearer ts_xxx" \
  -d '{
    "model": "tokenstrata-prime",
    "session_id": "my-session-001",
    "messages": [
      {"role": "user", "content": "Continue..."}
    ]
  }'

🔗 ModelFusion™

Chain multiple models in a single API call. Each hop billed separately + 5% fusion fee.

curl -X POST https://tokenstrata.com/api/fusion/pipelines/my-pipe/run \
  -H "Authorization: Bearer ts_xxx" \
  -d '{
    "messages": [
      {"role": "user", "content": "Analyse this..."}
    ]
  }'

🤖 Agent Store

Run published AI agents. Each agent has its own pricing and capability set.

curl -X POST https://tokenstrata.com/api/agents/my-agent/run \
  -H "Authorization: Bearer ts_xxx" \
  -d '{
    "input": {
      "task": "Summarise this document",
      "document": "..."
    }
  }'

💱 AMM Price Quote

Get live token prices from the automated market maker before purchasing.

curl "https://tokenstrata.com/api/market/amm/price\
?model_id=1&amount=10000" \
  -H "Authorization: Bearer ts_xxx"

🔑 Issue Sub-Key (TokenID™)

Issue delegated sub-keys to your end-users. Usage is attributed per end-user.

curl -X POST https://tokenstrata.com/api/token-id/issue \
  -H "Authorization: Bearer ts_xxx" \
  -d '{
    "end_user_external_id": "user_123",
    "spend_limit_usd": 10,
    "expires_in_days": 30
  }'
📦

SDKs

Python: pip install tokenstrata  ·  JavaScript: npm install @tokenstrata/sdk  ·  OpenAPI spec: openapi.json  ·  openapi.yaml

Interactive API Explorer
Loading API specification...