Skip to content
Docs

Migrating from OpenAI

ORYVOX speaks the OpenAI API, so migration is usually two environment variables.

1. Point your SDK at ORYVOX

export OPENAI_BASE_URL=https://api.oryvox.ai/v1
export OPENAI_API_KEY=ory_live_...

Or in code:

import OpenAI from 'openai';
const openai = new OpenAI({ baseURL: 'https://api.oryvox.ai/v1', apiKey: process.env.ORYVOX_API_KEY });
from openai import OpenAI
client = OpenAI(base_url="https://api.oryvox.ai/v1", api_key=os.environ["ORYVOX_API_KEY"])

2. Choose models

Keep using concrete ids with a provider prefix (openai/gpt-5-mini), or switch to a routing profile to let ORYVOX pick per request:

BeforeAfter
gpt-5-miniopenai/gpt-5-mini (pinned) or oryvox-fast (routed)
gpt-5openai/gpt-5 or oryvox-quality

Use the full provider/model id; GET /models lists every id.

3. Use ORYVOX extensions (optional)

With the OpenAI Python SDK, send extensions via extra_body:

client.chat.completions.create(
    model="oryvox-auto",
    messages=messages,
    extra_body={"routing": {"mode": "economy"}, "max_cost": 0.01, "optimization": {"mode": "balanced"}},
)

In the OpenAI Node SDK, add the fields to the params object (cast if TypeScript complains).

Or switch to the ORYVOX SDKs for typed extensions, the oryvox metadata, request-log access and webhook helpers (SDKs).

What is the same

/chat/completions (including streaming, tools, response_format), /embeddings, /models, error JSON shape, bearer auth.

What is different

  • Responses include an oryvox object (request id, selected model, cost, savings, cache).
  • Streams end with an extra data: {"object":"oryvox.summary", ...} line before [DONE]; OpenAI SDKs ignore it.
  • /responses is a simplified subset (string or message input, text output). Built-in tools, previous_response_id and file inputs are not supported.
  • Assistants, Files, Fine-tuning, Images, Audio and Batch APIs are not available.
  • Errors use ORYVOX types (see Errors).
Was this page helpful?