Skip to main content
Relay does not require an Oximy SDK. Use the endpoint shown for the project and authenticate with a project-scoped Relay key.

Authentication

The full Relay key is shown once when it is created. Store it in a secret manager and revoke it if it is exposed.

Execute a chat completion

Use oximy/auto for the project’s active routing policy or a provider-prefixed model ID for an explicit model. The response uses an OpenAI-compatible chat-completion envelope. Relay can also return: For streaming, send "stream": true. Relay returns server-sent events when the selected provider and request path support streaming. Include "stream_options": {"include_usage": true} when usage in the stream is needed.

Request a routing decision

Use POST /v1/route when Relay should choose the model but your infrastructure should execute the provider request.
The response includes model and decision_id. Preserve the decision identifier in execution telemetry so Relay can correlate the recommendation with the outcome.

Send OpenTelemetry traces

Send OTLP/HTTP protobuf traces to:
Use the same bearer-authentication pattern. See Observe with OpenTelemetry for exporter configuration.

Handle failures

Preserve the HTTP status, sanitized error body, request or decision identifier, and UTC timestamp when investigating a failure.

Gateway behavior

Understand automatic and explicit model execution through Relay.

Route-only behavior

Keep provider execution, retries, credentials, and fallback in your infrastructure.