Skip to content

Your first request

Create a client key scoped to the models it needs (here: every CLIP model, 30 requests per minute, 5000 per day):

Terminal window
curl -H "Authorization: Bearer $ADMIN" \
-d '{"name":"homeassistant","scopes":["clip-*"],"ratePerMinute":30,"dailyQuota":5000}' \
https://<hub-host>/v1/admin/keys
# → 201 {"key":{…,"prefix":"sk-aigw-Ab12"},"secret":"sk-aigw-…"} (the secret is shown once)

Then call the hub. It routes to whichever node has the model. /openai/v1 covers models and embeddings (embedding models only); every model, classifiers included, runs through the native POST /v1/models/{id}/run. Call the hub from your backend: /v1 and /openai/v1 send no CORS headers, and a client key does not belong in a web page.

Terminal window
KEY=sk-aigw-…
curl -H "Authorization: Bearer $KEY" https://<hub-host>/v1/models
curl -H "Authorization: Bearer $KEY" --data-binary @photo.jpg https://<hub-host>/v1/models/clip-l14-336/run

Every answer says where it ran: servedBy is the node, via is the hub, and native answers carry a timings breakdown (decode, queue, load, render, pack, invoke, postprocess, total). Every request also lands in the audit log under the key’s name.