Compatibility
OpenAI compatibility
Point the OpenAI SDK at Odyssey.
Odyssey speaks the OpenAI API. If you already call OpenAI through an official SDK, the base URL and the key are the only things that change, and the model id now names the model's author as well as the model.
Change one line
import OpenAI from "openai"; const client = new OpenAI({ baseURL: "https://odysseyapi.tech/v1", apiKey: process.env.ODYSSEY_API_KEY,});What carries over
POST /chat/completions, includingstream,stop,temperature,top_p,max_tokensandseed.- Tool calling with
toolsandtool_choice, and thetool_callsresponse shape. - JSON mode through
response_format, on models with thejsoncapability. - Image parts in messages, on models with the vision capability.
POST /responses, including streaming and function tools. See Responses and images.POST /images/generationson image models, plusPOST /images/editson the ones flagged for editing.GET /models, returning the catalog the calling key may use.- Server-sent events framed exactly as the SDKs expect, ending with
[DONE].
What differs
- Model ids are namespaced. Use
openai/gpt-5rather thangpt-5, and any model from another author the same way. - Organization headers are ignored. Billing follows the key, not an
OpenAI-Organizationheader. - Not implemented: embeddings, audio, batches, files, image edits and the assistants API.
Errors keep the same status codes
Error bodies use Odyssey's shape rather than OpenAI's, but the status codes match, so SDK error classes such as RateLimitError still behave as you expect. See Errors.
Frameworks and tools
Anything that accepts an OpenAI-compatible base URL works: LangChain, LlamaIndex, the Vercel AI SDK's OpenAI-compatible provider, and most self-hosted chat interfaces.
from langchain_openai import ChatOpenAI llm = ChatOpenAI( model="anthropic/claude-sonnet-5", base_url="https://odysseyapi.tech/v1", api_key=os.environ["ODYSSEY_API_KEY"],)