Skip to content

Quickstart

Omniflare is a drop-in replacement for the OpenAI API. If you already call OpenAI, you only change two things: the base URL and the API key.

Set base_url to https://api.omniflare.com/v1 and use your Omniflare key:

from openai import OpenAI
client = OpenAI(
base_url="https://api.omniflare.com/v1",
api_key="sk-omni-...", # your Omniflare key
)
response = client.chat.completions.create(
model="gpt-4o-mini",
messages=[{"role": "user", "content": "Hello from Omniflare!"}],
)
print(response.choices[0].message.content)

That’s the whole migration. The rest of your code — streaming, tool calls, response handling — is unchanged.

The model field selects the provider, so reaching a different vendor is a string change rather than a new integration:

response = client.chat.completions.create(
model="claude-sonnet-5",
messages=[{"role": "user", "content": "Hello from Omniflare!"}],
)

TODO: Add the Node/TypeScript and cURL equivalents, and describe what a first-run response looks like.