Documentation/Quickstart

Quickstart

Configure a model and make your first request.

1. Connect a model

Add credentials on Model providers, then create a deployment in My models. Set its public name, upstream model, protocol and rates. Capabilities depend on deployment and provider support.

2. Create a key

Create a virtual key on API keys and set model scope and budget. Store it in the server environment variable XHUB_API_KEY. Set XHUB_BASE_URL to the gateway root without /v1. Keep keys out of source control.

3. Request and verify

Replace YOUR_MODEL_NAME with your public model name. After success, inspect status, tokens and cost in request logs by call ID. For failures, check model permissions and protocol.

Request example

curl "$XHUB_BASE_URL/v1/chat/completions" \
  -H "Authorization: Bearer $XHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"YOUR_MODEL_NAME","messages":[{"role":"user","content":"Hello, introduce yourself."}],"stream":false}'

Search full documentation: budgets, routing, Docker…