Getting Started with the OpenAI-Compatible API

Getting Started with the OpenAI-Compatible API

Why OpenAI-compatible? 🤔

Because thousands of tools already speak the OpenAI protocol, you can plug them in without writing any special integration code. Same JSON structure, same authentication header, same streaming events.

OpenAI-compatible API endpoint
One endpoint, every tool that speaks the OpenAI protocol

Example with curl 🖥️

The fastest way to test your token is a single curl request:

curl https://api.your-domain.com/v1/chat/completions -H "Authorization: Bearer sk-your-token" -H "Content-Type: application/json" -d '{"model":"gpt-4o-mini","messages":[{"role":"user","content":"Hello"}]}'

Example with Python 🐍

The official openai Python library works out of the box. Just point base_url to our endpoint and set your API key.

Supported frameworks table

Frameworkbase_url optionWorks out of the box
openai-pythonopenai.base_urlYes ✅
openai-nodebaseURLYes ✅
LangChainopenai_api_baseYes ✅
LiteLLMapi_baseYes ✅
Open WebUIOPENAI_API_BASE_URLYes ✅

What about LangChain, and other frameworks? 🧩

All major frameworks let you configure a custom base URL and API key. Look for the base_url option and set it to our endpoint. It really is that simple.

Frequently asked questions

Is the endpoint truly OpenAI-compatible?

Yes. Requests, responses and streaming events match the OpenAI protocol, so tools work without modification.

Which SDKs can I use?

Any library that lets you set a base URL: openai-python, openai-node, LangChain, LiteLLM, Open WebUI and more.

Do I need a special API key format?

No. A normal Bearer token created in the panel works with every SDK.

What happens if I send a wrong model name?

You get a model_not_found error that lists the models available on your account.