OpenAI & Anthropic Compatible API | Viktor Docs

Documentation

Learn how to set up and get the most out of Viktor.

If your application already talks to OpenAI or Anthropic, you can point it at Viktor and get an AI employee instead of a bare model. The compatible API accepts the standard Chat Completions, Responses, and Messages wire formats and runs a full Viktor agent behind them — with access to your connected tools.

Quickstart

Grant the chat:completions scope to a key in Settings → API Keys, then swap the base URL, API key, and model in your existing code:

from openai import OpenAI

client = OpenAI(
    base_url="https://api.viktor.com/api/compat/v1",
    api_key="zt_live_sk_...",
)

completion = client.chat.completions.create(
    model="viktor",
    messages=[
        {"role": "user", "content": "Summarize yesterday's Stripe payouts."}
    ],
)
print(completion.choices[0].message.content)

The Anthropic SDK works the same way with base_url="https://api.viktor.com/api/compat".

Endpoints

Method Endpoint Protocol
POST /api/compat/v1/chat/completions OpenAI Chat Completions
POST /api/compat/v1/responses OpenAI Responses
POST /api/compat/v1/messages Anthropic Messages
POST /api/compat/v1/messages/count_tokens Anthropic token counting
GET /api/compat/v1/models Model listing (returns viktor)

Streaming is supported on all three chat surfaces.

How it differs from a bare model

When to use which API