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 call | Qevron 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:
- LangChain —
ChatOpenAI(base_url=..., api_key=...) - LlamaIndex —
OpenAI(api_base=..., api_key=...) - Vercel AI SDK —
createOpenAI({ 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:
- Anthropic Messages API →
/v1/messages - Google Gemini API →
/v1beta/models/...
So you can connect the anthropic or google-genai SDKs just by changing the address.