Home / API

Talocode Cloud API

Base URL: https://api.talocode.site

SDK: @talocode/sdk (available as @stacklane/sdk)

Authentication

All API requests require a TALOCODE_API_KEY.

Authorization: Bearer tk_dev_xxxxxxxxxxxx

API Namespaces

Each product is available under its own namespace at /v1/{product}/. Legacy routes remain supported.

Product       | Namespace           | Example
Router        | /v1/router/          | POST /v1/router/chat/completions
Tera          | /v1/tera/            | POST /v1/tera/writing/rewrite
Agent Browser | /v1/agent-browser/   | POST /v1/agent-browser/browser/check
ClipLoop      | /v1/cliploop/        | POST /v1/cliploop/brief/generate
Codra         | /v1/codra/           | POST /v1/codra/repo-summary
Tradia        | /v1/tradia/          | planned
SignalLane    | /v1/signallane/      | planned
WorkLane      | /v1/worklane/        | planned

Chat Completions

OpenAI-compatible endpoint with automatic provider routing.

POST /v1/chat/completions
POST /v1/router/chat/completions   (namespaced)

Request Body

{
  "model": "talocode/auto",
  "messages": [
    { "role": "user", "content": "Hello" }
  ],
  "max_tokens": 4096,
  "temperature": 0.7
}

Response

{
  "id": "chatcmpl_xxx",
  "object": "chat.completion",
  "created": 1700000000,
  "model": "talocode/auto",
  "provider": "openai",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Hello! How can I help you today?"
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 10,
    "completion_tokens": 20,
    "total_tokens": 30
  }
}

The provider field indicates which AI provider served the request.

Models

List available router models.

GET /v1/models
GET /v1/router/models   (namespaced)

Returns the list of available router models with provider information.

Charge Credits

Deduct credits from your project wallet for a specific action.

POST /api/v1/cloud/usage/charge

Request Body

{
  "product": "agent_browser",
  "action": "browser.check",
  "requestId": "my-unique-id"
}

Success Response

{
  "data": {
    "ok": true,
    "remainingCredits": 98
  }
}

Insufficient Credits (402)

{
  "data": {
    "ok": false,
    "error": "insufficient_credits",
    "required": 5,
    "available": 2
  }
}

Pricing

Get the full pricing catalog.

GET /api/v1/cloud/pricing

Returns all products, actions, and credit costs. View pricing →

Configured Providers

List which AI providers are configured.

GET /api/v1/cloud/router/providers

MCP (Model Context Protocol)

Talocode MCP exposes all product APIs through the Model Context Protocol. Connect from Cursor, Claude Desktop, VS Code, or any MCP-compatible client.

POST /mcp
Auth: Authorization: Bearer $TALOCODE_API_KEY

14 tools available across Tera, Router, Agent Browser, ClipLoop, and Cloud.

Talocode MCP Docs →

Configured Providers

List which AI providers are configured.

GET /api/v1/cloud/router/providers

Codra API

Hosted coding capabilities: repo analysis, code explanation, code review, and implementation planning. Local Codra remains open-source and local-first.

POST /v1/codra/repo-summary    — Analyze repository structure
POST /v1/codra/explain         — Explain code snippet
POST /v1/codra/review          — Review code for issues
POST /v1/codra/plan            — Generate implementation plan

Pricing: repo.summary 50cr, explain 20cr, review 40cr, plan 40cr

Try It

100 free credits on every new project.