Chat completions
/v1/chat/completions with system, user, assistant and tool messages.
Developers
This page is for developers. With the Otasi API, your apps, websites and internal tools can use our AI directly. It works with code written for OpenAI or Anthropic, and with tools like Claude Code: change the base URL, keep your code, and keep your data in Switzerland.
Quick start
Generate a key in the Otasi console and store it as OTASI_API_KEY.
OpenAI clients: https://api.otasi.ai/v1. Anthropic clients and Claude Code: https://api.otasi.ai.
Use otasi-core to start; switch models by changing one string.
curl https://api.otasi.ai/v1/chat/completions \
-H "Authorization: Bearer $OTASI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "otasi-core",
"messages": [
{"role": "system", "content": "You are a concise assistant."},
{"role": "user", "content": "Summarise the nLPD in 3 bullets."}
],
"stream": false
}'
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.otasi.ai/v1",
api_key=os.environ["OTASI_API_KEY"],
)
stream = client.chat.completions.create(
model="otasi-core",
messages=[{"role": "user", "content": "Summarise the nLPD in 3 bullets."}],
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")
# Claude Code on Otasi servers, in Switzerland
otasi-claude
Capabilities
/v1/chat/completions with system, user, assistant and tool messages.
/v1/messages, compatible with the Anthropic SDKs and Claude Code.
Server-sent events for token-by-token responses.
Describe functions with JSON Schema; the model decides when to call them.
JSON mode and schema-constrained responses.
Repeated prompt prefixes are cached and re-read at a much lower price. 1M token context on both models.
Prompts and outputs are not stored after the response. Prompt cache is deleted after at most 1 hour.
Scoped API keys, per-project limits and usage reports.
Tine, the Otasi harness
An agent is an AI that does more than answer: it works through a task step by step. Tine runs on your computer, in your terminal or as a desktop app (Tine GUI). It reads and edits your project, runs commands and tests, and checks its own work, using Otasi servers in Switzerland.
Uses your Otasi subscription or API key. Your code is processed in Switzerland and never used for training.
$ tine
> Add input validation to the signup form and write tests
Reading src/forms/signup.ts, src/api/users.ts
Editing src/forms/signup.ts (+38 −4)
Creating tests/signup.test.ts
Running npm test … 24 passed
Done. Review the changes? [y/n]
Request an API key and get started with otasi-core in minutes.