Skip to main content
The OpenTracy engine speaks OpenAI-compatible HTTP, so any language that can do a POST request can use it. Python is a convenience; the REST API is the real surface.

Two services, two ports

The gateway is the hot path — every completion goes through it. The management API is the slow path — you hit it when you’re building datasets, kicking off training jobs, or reviewing analytics.

Authentication

Out of the box, neither port requires auth. The engine expects you to put it behind your own proxy (Traefik, Caddy, a VPN, a service mesh) before exposing it to the internet. When you configure authentication, both services accept a bearer token:
Provider API keys (OpenAI, Anthropic, …) are held by the engine, not passed by the client. See Self-hosting → Configuration.

Request format

Every endpoint is JSON-in, JSON-out:
All responses are UTF-8 JSON. Errors follow the OpenAI shape:

OpenTracy-specific response headers

The gateway adds a few headers to every /v1/chat/completions response:

Health

Pages

Chat completions

POST /v1/chat/completions — the OpenAI-compatible entry point.

Routing decision

POST /v1/route — ask the router which model it would pick, without generating.

Models & health

GET /v1/models, GET /health — discover what’s configured.

Distillation

Create jobs, poll status, fetch artifacts over HTTP.

Traces

Search captured traces by model, time range, cost, or metadata.

Dropping in over the OpenAI SDK

The gateway is OpenAI-compatible by design. Any client library that lets you set a base URL works unchanged — see the drop-in OpenAI guide for Python, TypeScript, and raw curl.