Client SDKs

Python

Synchronous and asynchronous governed model access

octoryn-llm provides the Python client. Use environment-managed credentials and close async clients during application shutdown.

Install

Pin the production package version.

pip install octoryn-llm==3.0.1

OpenAI-compatible migration

Existing OpenAI Python applications can also change base_url and API key while retaining their calling shape.

from openai import OpenAI
import os

client = OpenAI(base_url="https://api.octoryn.dev/v1", api_key=os.environ["OCTORYN_API_KEY"])
result = client.chat.completions.create(model="policy/frontier", messages=[{"role":"user","content":"Hello"}])

Async services

Reuse the async transport, set an explicit deadline and cancel abandoned streams. Never block an event loop while executing a product tool.


Structured output

Request JSON Schema only on eligible routes, then validate the returned object with Pydantic or the application's schema library.

NextServer runtimes