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.1.tar.gz (264.9 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.1-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: octoryn_llm-3.0.1.tar.gz
  • Upload date:
  • Size: 264.9 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.1.tar.gz
Algorithm Hash digest
SHA256 68c056c3d544167828238e826a263a08530acc0d95f80031c5aff279d429e72f
MD5 436382a4490ec1d37733f330ec34ac60
BLAKE2b-256 bbfe0343f99385ab6f5bb959e503b1ac642a75772592bf27775e2c52b1e82abb

See more details on using hashes here.

Provenance

The following attestation bundles were made for octoryn_llm-3.0.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: octoryn_llm-3.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 996b2be9267b191b5a29bc3fcc928b0d96812fff69cd8cb24073f3f7189df80e
MD5 b94e9a12194b8a5eeb259724cc27d9fa
BLAKE2b-256 1e644db17ab22ec9b26565ae2d5165f37e13cc14722ba741e1cc1e8c1bfedf1a

See more details on using hashes here.

Provenance

The following attestation bundles were made for octoryn_llm-3.0.1-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