Your first request
Create a client key scoped to the models it needs (here: every CLIP model, 30 requests per minute, 5000 per day):
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.
KEY=sk-aigw-…curl -H "Authorization: Bearer $KEY" https://<hub-host>/v1/modelscurl -H "Authorization: Bearer $KEY" --data-binary @photo.jpg https://<hub-host>/v1/models/clip-l14-336/runfrom openai import OpenAIimport base64
hub = OpenAI(base_url="https://<hub-host>/openai/v1", api_key="sk-aigw-…")img = "data:image/jpeg;base64," + base64.b64encode(open("photo.jpg", "rb").read()).decode()vec = hub.embeddings.create(model="clip-l14-336", input=[img]).data[0].embeddingprint(len(vec)) # 768curl -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' \ -d "{\"model\":\"clip-l14-336\",\"input\":[\"data:image/jpeg;base64,$(base64 < photo.jpg | tr -d '\n')\"]}" \ https://<hub-host>/openai/v1/embeddingsEvery 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.