Skip to content

OpenAI Compatibility

Qevron speaks OpenAI's API format. That means you can point your existing OpenAI code at Qevron with almost no changes. The only change: base_url (or baseURL).

Migrating from OpenAI: just 2 lines

If you already use OpenAI, the only thing to change is the client configuration:

diff
  client = OpenAI(
-     api_key=os.environ["OPENAI_API_KEY"],
+     api_key=os.environ["QEVRON_API_KEY"],
+     base_url="https://app.qevron.ai/v1",
  )

All your calls like chat.completions.create(...), embeddings.create(...) stay the same. Just change the model name to one defined in Qevron (see /v1/models).

Python (openai SDK)

python
from openai import OpenAI

client = OpenAI(
    api_key="QEVRON_API_KEY",
    base_url="https://app.qevron.ai/v1",   # the only change
)

resp = client.chat.completions.create(
    model="verinova",
    messages=[{"role": "user", "content": "Explain RAG briefly."}],
)
print(resp.choices[0].message.content)

JavaScript / TypeScript (openai SDK)

javascript
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.QEVRON_API_KEY,
  baseURL: "https://app.qevron.ai/v1",   // the only change
});

const resp = await client.chat.completions.create({
  model: "verinova",
  messages: [{ role: "user", content: "Explain RAG briefly." }],
});
console.log(resp.choices[0].message.content);

Which endpoints are compatible?

All the common methods the OpenAI client uses are supported:

OpenAI SDK callQevron endpoint
chat.completions.create()POST /v1/chat/completions
completions.create()POST /v1/completions
embeddings.create()POST /v1/embeddings
images.generate()POST /v1/images/generations
images.edit()POST /v1/images/edits
audio.speech.create()POST /v1/audio/speech
audio.transcriptions.create()POST /v1/audio/transcriptions
audio.translations.create()POST /v1/audio/translations
moderations.create()POST /v1/moderations
models.list()GET /v1/models

Other ecosystems

Any tool that accepts a base_url works:

  • LangChainChatOpenAI(base_url=..., api_key=...)
  • LlamaIndexOpenAI(api_base=..., api_key=...)
  • Vercel AI SDKcreateOpenAI({ baseURL, apiKey })

See the Using with LangChain guide for a full example.

Anthropic and Gemini formats too

Besides the OpenAI format, you can also use these providers' native API formats:

So you can connect the anthropic or google-genai SDKs just by changing the address.

Qevron — AI gateway. Arpanet / OpenAI / Anthropic / Gemini compatible.