Skip to main content

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.

Karta’s native session API is one way to drive a project. The consumer adapters are another: they expose the same turn under three familiar wire formats, so a client built for OpenAI or Anthropic can talk to a Karta project with little or no change.

OpenAI Responses

POST /v1/projects/{ref}/responses — the OpenAI Responses API shape, with previous_response_id continuation.

OpenAI Chat Completions

POST /v1/projects/{ref}/chat/completions — the classic messages-array shape.

Anthropic Managed Agents

Event-sourced managed-agent sessions with a streamed agent.* event log.

Why adapters

The point of a fixed session protocol is that one client talks to any project. The adapters extend that idea to clients you didn’t write for Karta: point an existing OpenAI or Anthropic SDK at your project URL and it works, because Karta maps its typed event stream onto each format’s wire shape.
        ┌─ /responses          → OpenAI Responses shape
Karta   ├─ /chat/completions   → OpenAI Chat Completions shape
turn ──▶├─ /managed-agents     → Anthropic Managed Agents events
        └─ /sessions/.../messages → native Karta shape
        (one turn, four projections)

Auth & scope

All adapters live on the project route family (/v1/projects/{project_ref}/…), so they accept either a session token (the browser-safe credential) or a kt_live_… API key. They enforce the same budget gate (402) and project pinning as the native routes.

Streaming

Every adapter supports stream: true and emits SSE in that format’s event vocabulary — response.output_text.delta for Responses, chunk for Chat Completions, agent.* for Managed Agents — rather than Karta’s native event names. Pick the adapter that matches your client and its streaming expectations.
These adapters are a compatibility surface, not a re-implementation of the providers’ full APIs. They cover the conversational turn — input, streamed output, usage. Provider-specific features beyond that aren’t guaranteed.