OpenAI-compatible API
Use the OpenAI SDK or plain HTTP against the gateway; only the base URL, key and model name change.
Point the client at the gateway
- ScreenBase URL
- ActionBearer key
- ResultSame SDK
Copy the model namepad/JPX is ready for any client
Example dataThe base URL is the gateway URL from GET /api/v1/config. Send the key as Authorization: Bearer (or x-api-key).
pip install openaiReading the gateway URL and model list from the backend.
Create a chat completion
- Screenclient.chat.completions
- ActionPOST /v1/chat/completions
- ResultReply + receipt
Your request finishesIt appears in the public log with its receipt
Example dataSupported request fields pass through: model, messages, max_tokens or max_completion_tokens, temperature (0 to 2), stream, tools and image parts.
Reading the gateway URL and model list from the backend.
What the gateway adds
- ScreenRequest
- ActionEndpoint config injected
- ResultCapped output
Open the receiptMoney and tokens, never content
Example dataFor endpoints the gateway puts the endpoint prompt and files ahead of your messages, caps max_tokens at the endpoint maximum, and rewrites the response model to the name you called.