The Karta data plane exposes a uniform HTTP API. Every project speaks the same session protocol — create a session, send a message, stream the response — so one client can talk to any project.Documentation Index
Fetch the complete documentation index at: https://docs.karta.sh/llms.txt
Use this file to discover all available pages before exploring further.
Base URL
karta serve hosts the same surface at
http://localhost:8000.
What’s here
Sessions
Create, fetch, and resume sessions.
Messages
Send and stream turns, unary or SSE.
Inputs
Resolve approval prompts mid-turn.
Gateway
Submit and deliver events across participants.
Consumer adapters
Talk to a project with the OpenAI or Anthropic SDK, unchanged.
Authentication
API keys, session tokens, and how each is scoped.
Conventions
- Versioned paths. Public endpoints live under
/v1. - Streaming everywhere. Message endpoints take
"stream": trueand respond with Server-Sent Events;false(the default) returns an accumulated JSON response. - JSON in, JSON (or SSE) out. Send
Content-Type: application/json. - Org-scoped by default. A key for one org can’t touch another org’s
sessions — cross-org access is default-deny and returns
404.
Two route families
| Family | Path shape | Auth | Use |
|---|---|---|---|
| Flat | /v1/sessions/… | kt_live_… API key | Server-side integrations holding an org key. |
| Project | /v1/projects/{ref}/… | session token or API key | A frontend/widget driving a specific deployed project. |
Machine-readable spec
An OpenAPI document is published at/openapi.json (public; excludes internal
endpoints). Point your codegen or API explorer at it.
Internal
/v1/internal/* endpoints (key validation, usage ingestion, release
materialization, cache invalidation) are control-plane only, gated by a
service token plus IP/Host allowlists, and are not part of the public API.