OpenAI-Compatible API
Connect an existing compatible client to the managed Panel gateway. The Panel has a separate engine lifecycle: an API route being registered does not prove a model is running.
- Open API workbench (
/rust/api), then Base URLs. Read thebase_urlfromGET /api/gateway/connect, which reports blocked single-user mode and any published model IDs. - In Access and API keys, enable multi-user mode and create an API key. For gateway requests the key belongs in the bearer Authorization header. Store it in a local secret store, never in a URL.
- Set the existing client's base URL to the gateway's
base_url(the Panel origin plus/v1) and its secret to the created key. For command-line samples setPANEL_URLto the origin without/v1. - Use
GET /v1/modelsto choose a reported model ID. SubmitPOST /v1/chat/completionsonly after a model is available. The endpoint handles chat messages; passingstream:falserequests a non-streaming response. - In Endpoint catalog, expand Browse every
endpoint (generated from route registration) and open
POST /v1/chat/completions; administrators may instead select it and press Generate examples. The samples containMODEL_ID; replace it with the model ID from the inventory.
Example JSON for POST /v1/chat/completions:
{"model":"MODEL_ID","messages":[{"role":"user","content":"Hello"}],"stream":false}
GET /api/openapi.json describes the native Panel route
set and authorization metadata. Some HTTP-dispatch gateway routes are
separate from that native list; their examples are labeled as such.
POST /v1/decide and POST /v1/messages are
engine-only endpoints, not automatically proxied by the Panel. See Panel API and Embeddings.
Control reference
| Control | Help text |
|---|---|
Base URLs (api.urls) |
Inspect the current gateway URL and locate separate engine endpoints without exposing upstream ports. |
Model discovery (api.models) |
See available model IDs; an empty model list means there is nothing to request yet. |
Chat completions (api.chat) |
Call the configured gateway's chat route only when a model is available. |