Universal LLM Gateway Quick Start
Create an API key, discover entitled models, and send the first request.
After the subscription becomes active, open Setup Wizard and create an API key. The full secret appears only on create or rotate, so store it immediately in a secret manager or environment variable.
Call GET /v1/models before hard-coding a model. Results are filtered by API key, subscription, plan, capability, and currently available routes.
Key points
- Store API_KEY in the environment and never commit it to source control.
- Use the Base URL published by Setup Wizard.
- Call GET /v1/models and choose a public model ID.
- Choose stream=false for JSON or stream=true for incremental SSE through the [DONE] marker.
- Keep x-routing-request-id for routing trace and support investigations.
Example request
curl --request POST 'https://api.xpncore.com/v1/chat/completions' \
--max-time 35 \
--header "Authorization: Bearer $API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "MODEL_ID_FROM_GET_V1_MODELS",
"messages": [
{
"role": "user",
"content": "Hello from the gateway"
}
],
"temperature": 0.7,
"max_tokens": 512,
"stream": false
}'