Skip to main content
The to11ai-sdk package gives Python services typed access to to11. You use it to render managed prompts at runtime, shaped for the provider client you already use, and to manage prompts, versions, skills, and project environments from code. It mirrors the TypeScript SDK surface with snake_case, synchronous methods. The SDK talks to the to11 API (https://api.to11.ai). It never sends the model request itself — there is no .chat(). Your own provider client (OpenAI, Anthropic, or any other) sends the rendered prompt to the provider, with your own provider key. The distribution is published as to11ai-sdk and imported as to11ai_sdk, under the MPL-2.0 license.

Runtime requirements

  • Python: 3.10 or later.
  • One runtime dependency: Pydantic 2.14.3 or later. The client is synchronous — there is no async client; every method returns its value directly.
  • Credentials: a to11 API key and a project id. The SDK reads TO11_API_KEY and TO11_PROJECT_ID from the environment, and TO11_API_URL for the API address, which defaults to https://api.to11.ai. Run it server-side: a to11 API key must never reach an end user’s device.

Installation

Install your provider client, such as openai or anthropic, separately; the SDK does not depend on it.

The happy path

Create a client, render a prompt shaped for OpenAI, and send it with your OpenAI client:
prompt["config"] carries the model settings from the prompt version’s Config pane, prompt["messages"] the rendered messages, and prompt["metadata"] which prompt version produced them, for your own logging.

Where to next

Configuration

Client options, credential resolution, and what the client exposes.

Rendering prompts

Formats, the rendered result shape, and the converters.

Prompt management

Prompt lifecycle, versions, labels, skills, and project environments.

Errors

The typed error classes the SDK raises, and how to catch them.