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/      | POST /v1/signallane/x/analyze
InvoiceLane   | /v1/invoicelane/     | POST /v1/invoicelane/extract
UGCLane       | /v1/ugclane/         | POST /v1/ugclane/hooks/generate
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

34 tools available across Tera, Router, Agent Browser, ClipLoop, SignalLane, InvoiceLane, UGCLane, 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

SignalLane — X Growth Intelligence

X growth intelligence for builders: account analytics, content strategy, post drafting, experiments, and full growth reports.

POST /v1/signallane/x/analyze       — Analyze X account (30 credits)
POST /v1/signallane/x/content-plan  — Weekly content strategy (40 credits)
POST /v1/signallane/x/post-drafts   — Generate post drafts (40 credits)
POST /v1/signallane/x/experiments   — Design content experiments (30 credits)
POST /v1/signallane/x/report        — Full growth report (60 credits)

SignalLane: x.analyze 30cr, x.content_plan 40cr, x.post_drafts 40cr, x.experiments 30cr, x.report 60cr

InvoiceLane — Invoice/Receipt Extraction

Turn receipts, invoices, and business documents into clean structured data through one API. v0.1 supports text-based extraction only (OCR and PDF parsing planned).

POST /v1/invoicelane/extract            — General extraction (20 credits)
POST /v1/invoicelane/receipt/extract    — Receipt extraction (20 credits)
POST /v1/invoicelane/invoice/extract    — Invoice extraction (30 credits)
POST /v1/invoicelane/validate           — Validate document data (10 credits)
POST /v1/invoicelane/export/csv         — Export as CSV (5 credits)

InvoiceLane: extract 20cr, receipt.extract 20cr, invoice.extract 30cr, validate 10cr, export.csv 5cr

UGCLane — UGC Workflow API

Generate original UGC-style hooks, scripts, captions, calendars and content experiments through one API. Turn product positioning into content that converts.

POST /v1/ugclane/strategy/generate       — Generate content strategy (30 credits)
POST /v1/ugclane/competitor/analyze      — Analyze competitor positioning (40 credits)
POST /v1/ugclane/hooks/generate          — Generate UGC hooks (20 credits)
POST /v1/ugclane/scripts/generate        — Generate video scripts (40 credits)
POST /v1/ugclane/accounts/plan           — Plan account content strategy (30 credits)
POST /v1/ugclane/calendar/generate       — Generate content calendar (60 credits)
POST /v1/ugclane/experiments/generate    — Design content experiments (30 credits)
POST /v1/ugclane/report/generate         — Generate performance report (40 credits)
POST /v1/ugclane/export/markdown         — Export as markdown (5 credits)
POST /v1/ugclane/export/json             — Export as JSON (5 credits)

UGCLane: strategy.generate 30cr, competitor.analyze 40cr, hooks.generate 20cr, scripts.generate 40cr, accounts.plan 30cr, calendar.generate 60cr, experiments.generate 30cr, report.generate 40cr, export.markdown 5cr, export.json 5cr

Try It

100 free credits on every new project.