Metadata-Version: 2.4
Name: octoryn-llm
Version: 3.0.0
Summary: Official Python SDK for the Octoryn Router API
Project-URL: Homepage, https://octoryn.dev/en/developers/sdks
Project-URL: Documentation, https://octoryn.dev/en/developers/docs
Author: Octopus Core Pty Ltd
License: Proprietary
Keywords: llm,octoryn,openai-compatible,router
Classifier: Intended Audience :: Developers
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27
Requires-Dist: pydantic>=2.9
Requires-Dist: typing-extensions>=4.12
Provides-Extra: dev
Requires-Dist: langchain-openai<2,>=1.4; extra == 'dev'
Requires-Dist: llama-index-llms-openai-like<1,>=0.7; extra == 'dev'
Requires-Dist: openai>=1.50; extra == 'dev'
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: pytest-asyncio; extra == 'dev'
Requires-Dist: pytest-timeout; extra == 'dev'
Requires-Dist: respx; extra == 'dev'
Provides-Extra: integrations
Requires-Dist: langchain-openai<2,>=1.4; extra == 'integrations'
Requires-Dist: llama-index-llms-openai-like<1,>=0.7; extra == 'integrations'
Provides-Extra: langchain
Requires-Dist: langchain-openai<2,>=1.4; extra == 'langchain'
Provides-Extra: llamaindex
Requires-Dist: llama-index-llms-openai-like<1,>=0.7; extra == 'llamaindex'
Description-Content-Type: text/markdown

# octoryn-llm

Official Python client for the independent Octoryn Router.

## Install

```bash
pip install octoryn-llm
```

## Quickstart

```python
import os
from octoryn import Octoryn

client = Octoryn(api_key=os.environ["OCTORYN_API_KEY"])
result = client.chat.completions.create(
    model="openai/gpt-4.1-mini",
    messages=[{"role": "user", "content": "Hello"}],
)
print(result.choices[0].message.content)
```

The default base URL is `https://api.octoryn.dev/v1`. Service credentials need
the Router `route` scope.

## Supported wire resources

- Inference: `chat.completions`, `completions`, `responses`, `embeddings`,
  `moderations`, and `rerank`.
- Catalogue: `models` and `providers`.
- Management: `keys`, `governance`, `route.simulate`, and `operations`.

Management resources require their documented Router scopes and are kept
separate from inference resources. Key creation and revocation require an
explicit idempotency key; revocation also requires a reason code.

The production Router does not expose the former Gateway audio, image, video,
realtime, BYOK, usage-run, audit-run, agent, document, memory, knowledge, or
skills endpoints. Those methods were removed in v3 instead of remaining as
methods that always return 404. The `octoryn.openai_compat` alias raises
`NotImplementedError` for absent OpenAI surfaces.

Framework integrations are optional and use Chat Completions only:

```bash
pip install "octoryn-llm[langchain]"
pip install "octoryn-llm[llamaindex]"
```

The checked-in production method/path manifest is
[`../../contracts/router-api-v1.json`](../../contracts/router-api-v1.json).
Run `python3 ../../scripts/sdk/check_router_contract.py --live` before release.
