Skip to main content

Official Python SDK for the Octoryn Router API

Project description

octoryn-llm

Official Python client for the independent Octoryn Router.

Install

pip install octoryn-llm

Quickstart

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:

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

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

octoryn_llm-3.0.0.tar.gz (264.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

octoryn_llm-3.0.0-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

Details for the file octoryn_llm-3.0.0.tar.gz.

File metadata

  • Download URL: octoryn_llm-3.0.0.tar.gz
  • Upload date:
  • Size: 264.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for octoryn_llm-3.0.0.tar.gz
Algorithm Hash digest
SHA256 a228be788421a2f5fad51af868c598d9fe7af5501b60cddd0dc927f2c35b8f74
MD5 7d8f81c3017223b900b8f0659103823e
BLAKE2b-256 9aa8f502b7983e6536c4c06980b0cdca525c5b5bebc9ca0990af9f50265c122d

See more details on using hashes here.

Provenance

The following attestation bundles were made for octoryn_llm-3.0.0.tar.gz:

Publisher: sdk-publish.yml on octoryn/octoryn-llm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file octoryn_llm-3.0.0-py3-none-any.whl.

File metadata

  • Download URL: octoryn_llm-3.0.0-py3-none-any.whl
  • Upload date:
  • Size: 20.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for octoryn_llm-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fbaba52e3ed1d305aae94268d8fbc747348b66fba36721f92a40fc9b596ecf95
MD5 dde40cf44353f62dfa95302f339d26e9
BLAKE2b-256 3873df53d58a72c59ce46ccb3a937af87d2c5bc3477ddcd7237b3baba67bcc24

See more details on using hashes here.

Provenance

The following attestation bundles were made for octoryn_llm-3.0.0-py3-none-any.whl:

Publisher: sdk-publish.yml on octoryn/octoryn-llm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page