Point any OpenAI SDK at Atlantis
Use the key you created for this project. Sub-apps inside it
name themselves with X-Client-App so usage still breaks down per app — see the Usage tab.
from openai import OpenAI
client = OpenAI(
base_url="ORIGIN/v1",
api_key="YOUR_PROJECT_KEY", # the key named for this project/env
default_headers={"X-Client-App": "my-app"}, # names this app in usage
)
r = client.chat.completions.create(
model="auto", # or "coding:low", or any exact model
messages=[{"role": "user", "content": "Hello Atlantis"}],
)
print(r.choices[0].message.content)
Check your wiring before you ship
A status code proves nothing — another service on a
neighbouring port answers too, and a revoked key still gets a response. Assert on
service, not on 2xx, or a wrong URL looks exactly like a working one.
import httpx
r = httpx.get("ORIGIN/v1/whoami", headers={"X-API-Key": "YOUR_PROJECT_KEY"})
r.raise_for_status() # wrong key -> 401, loudly
me = r.json()
assert me["service"] == "atlantis-engine" # wrong host/port -> caught here
print(me["key_name"], me["scopes"], me["git_sha"])
Migrating from OpenRouter? X-Title / HTTP-Referer are honored too.
Or use the outcome door for validated answers + receipts:
POST /v1/execute {"goal": "..."}. Full reference at /docs.