Overview
Quickstart
Make your first governed model request
Octoryn provides one OpenAI-compatible endpoint for model access across the Octopus family. Start with the client you already use, then select a direct model or a stable policy alias.
ApproachBest for
OpenAI SDKExisting Python and TypeScript services
Direct HTTPAny language, runtime or framework
Policy aliasProvider-portable production workloads
Before you start
You need an Octoryn API key issued for the intended workspace and environment. Keep the key in a protected server-side runtime or secret manager.
- Use separate keys for development and production
- Never ship Router keys in browser bundles or mobile binaries
- Confirm the workspace permits the requested route
Send a request
Point an OpenAI-compatible client at the Octoryn base URL. The example uses policy/frontier so provider choice can evolve without an application deployment.
from openai import OpenAI
import os
client = OpenAI(
base_url="https://api.octoryn.dev/v1",
api_key=os.environ["OCTORYN_API_KEY"],
)
response = client.chat.completions.create(
model="policy/frontier",
messages=[
{"role": "user", "content": "Explain policy routing."}
],
)
print(response.choices[0].message.content)Use the client that fits your service
The same request can be sent with the OpenAI SDK or plain HTTPS. These examples are equivalent at the Router boundary.
Move from first request to production
Add production behaviour deliberately after connectivity is proven.
- Set an application deadline and cancellation path
- Handle authentication, rate limits and upstream failures separately
- Validate route-specific support before using tools, images or structured output
- Record available request correlation metadata
