HomeAPI REFERENCE

API REFERENCE

A concise compatibility contract for the Router.

Octoryn exposes an OpenAI-compatible /v1 entrypoint. This reference describes the integration contract without implying support for endpoints or capabilities that have not been confirmed for a selected route.

01/v1Compatible API entrypoint
02BearerToken authentication pattern
03SSEIncremental streaming pattern
01

Base URL and request shape.

Configure the client base URL as https://api.octoryn.dev/v1 and use the OpenAI-compatible request surface supported by your selected route. Consult route capability information before relying on optional fields.

  • Send JSON requests through an OpenAI-compatible clientExpand details

    This is part of Base URL and request shape.. Octoryn keeps its configuration, outcome and routing context together so teams can validate and review the capability independently.

    View implementation docs
  • Select an eligible model or a governed policy aliasExpand details

    This is part of Base URL and request shape.. Octoryn keeps its configuration, outcome and routing context together so teams can validate and review the capability independently.

    View implementation docs
  • Do not assume every upstream supports every optional capabilityExpand details

    This is part of Base URL and request shape.. Octoryn keeps its configuration, outcome and routing context together so teams can validate and review the capability independently.

    View implementation docs
02

Authenticate every request.

Use the API key supplied for the intended customer or product environment. Compatible clients place it in bearer-token authentication; never embed it in browser bundles, mobile binaries or source control.

  • Keep keys in a protected server-side environmentExpand details

    This is part of Authenticate every request.. Octoryn keeps its configuration, outcome and routing context together so teams can validate and review the capability independently.

    View implementation docs
  • Separate development and production credentialsExpand details

    This is part of Authenticate every request.. Octoryn keeps its configuration, outcome and routing context together so teams can validate and review the capability independently.

    View implementation docs
  • Rotate or revoke exposed credentials through the responsible operatorExpand details

    This is part of Authenticate every request.. Octoryn keeps its configuration, outcome and routing context together so teams can validate and review the capability independently.

    View implementation docs
03

Read errors by category.

Authentication and authorization failures require credential or policy correction. Rate-limit responses require pacing, while upstream and service failures require bounded, context-aware recovery.

  • Do not retry invalid authentication or malformed requests unchangedExpand details

    This is part of Read errors by category.. Octoryn keeps its configuration, outcome and routing context together so teams can validate and review the capability independently.

    View implementation docs
  • Use backoff for rate limits and transient failuresExpand details

    This is part of Read errors by category.. Octoryn keeps its configuration, outcome and routing context together so teams can validate and review the capability independently.

    View implementation docs
  • Capture status, response body and available correlation metadataExpand details

    This is part of Read errors by category.. Octoryn keeps its configuration, outcome and routing context together so teams can validate and review the capability independently.

    View implementation docs
04

Consume streaming incrementally.

When streaming is enabled and supported by the selected route, process server-sent events as they arrive. Your client should handle cancellation, disconnects and a stream ending before a complete application result.

  • Render or process incremental output without buffering the full responseExpand details

    This is part of Consume streaming incrementally.. Octoryn keeps its configuration, outcome and routing context together so teams can validate and review the capability independently.

    View implementation docs
  • Treat disconnects and partial output as explicit application statesExpand details

    This is part of Consume streaming incrementally.. Octoryn keeps its configuration, outcome and routing context together so teams can validate and review the capability independently.

    View implementation docs
  • Apply an application deadline to long-running streamsExpand details

    This is part of Consume streaming incrementally.. Octoryn keeps its configuration, outcome and routing context together so teams can validate and review the capability independently.

    View implementation docs
05

Treat capabilities as route-specific.

Tools, vision, structured output and other optional request features depend on the route and upstream model. Validate arguments and outputs at the application boundary even when the provider reports schema support.

  • Check capability support before production useExpand details

    This is part of Treat capabilities as route-specific.. Octoryn keeps its configuration, outcome and routing context together so teams can validate and review the capability independently.

    View implementation docs
  • Validate tool arguments before executionExpand details

    This is part of Treat capabilities as route-specific.. Octoryn keeps its configuration, outcome and routing context together so teams can validate and review the capability independently.

    View implementation docs
  • Preserve a fallback path when a capability is operationally criticalExpand details

    This is part of Treat capabilities as route-specific.. Octoryn keeps its configuration, outcome and routing context together so teams can validate and review the capability independently.

    View implementation docs

OCTORYN ROUTER

Use your existing SDK workflow.

See how OpenAI SDKs and compatible clients can be configured without adding a Router-specific application framework.

Open SDK guide