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.
Pictures in
/v1/chat/completions (since 8f6f542)
A LexiEngine model that takes pictures says so in
GET /v1/models: its row carries
"capabilities": [..., "vision"] and an
image_input record with "supported": true, the
endpoint, the formats (png, jpeg), the cell
size (40 px) and the limits. A file without an image tower reports
"supported": false with the reason.
Send each picture as an image_url content part holding a
base64 data URL, in a user or tool
message:
{"model": "local", "messages": [{"role": "user", "content": [
{"type": "image_url", "image_url": {"url": "data:image/png;base64,iVBORw0KGgo..."}},
{"type": "text", "text": "What is in this picture?"}]}]}
- Formats: PNG and JPEG as data URLs. WebP and picture URLs
(
https://...) are refused. - Limits in the engine: up to 256 pictures in a request, 32 MiB and 64 megapixels each; a picture costs one token per started 40 x 40 pixel cell, plus 3. The Panel chat applies smaller limits of its own (see Panel LexiChat).
- Pictures are accepted by
/v1/chat/completionsonly;/v1/responsesand the other endpoints refuse them with the reason. Message text must not spell the model's own picture tokens. Audio parts are refused. - The pictures are encoded on the processor; the next turn of the same conversation does not encode them again.
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. |