Skip to content

Users & provider keys

Create an InferBridge account and mint an API key.

POST /v1/users
Content-Type: application/json
{"email": "you@example.com"}
Terminal window
curl -X POST https://inferbridge.dev/v1/users \
-H 'Content-Type: application/json' \
-d '{"email":"you@example.com"}'

201 Created

{
"user_id": "8294669a-6d77-43d3-a204-d4de7c94b7ef",
"email": "you@example.com",
"api_key": "ib_Ji3uubDajZx7N1XFcooqAVjKGkVFlC1D",
"shown_once": true
}

shown_once: true is a reminder — the key is not retrievable later.

Errors

StatustypeWhen
409conflict_erroremail is already registered
422invalid_request_erroremail is not a valid address

Store a BYOK key for one of the supported providers. All provider keys are Fernet-encrypted at rest; InferBridge decrypts them only in-memory at request time.

POST /v1/keys
Authorization: Bearer ib_...
Content-Type: application/json
{
"provider": "openai",
"api_key": "sk-..."
}
ProviderRequired fieldsNotes
openaiprovider, api_key
anthropicprovider, api_key
togetherprovider, api_key
sarvamprovider, api_keyResidency auto-set to india
self_hostedprovider, api_key, base_url, declared_regionSee below
  • label (string, ≤ 128 chars) — human-readable hint, especially useful for multiple self-hosted entries ("mumbai-llama-70b", "sgp-mistral-7b").

self_hosted registers an OpenAI-compatible endpoint you operate yourself (vLLM, TGI, Ollama, llama.cpp, LM Studio, etc.):

Terminal window
curl -X POST https://inferbridge.dev/v1/keys \
-H 'Authorization: Bearer ib_...' \
-H 'Content-Type: application/json' \
-d '{
"provider": "self_hosted",
"api_key": "sk-local-or-any-placeholder",
"base_url": "https://llm.internal.mycompany.com/v1",
"declared_region": "india",
"label": "mumbai-llama-70b"
}'

base_url must use HTTPS unless the host is localhost / *.localhost or a private / loopback / link-local IP. Self-hosted keys are never auto-routed — they’re only reachable via X-InferBridge-Override-Model: self_hosted:<your-model-id> on chat completions.

{
"id": "5e4b02f9-2efb-4b69-8d6b-0a8e4e3e6ab2",
"provider": "openai",
"residency": "global",
"declared_region": null,
"base_url": null,
"label": null,
"created_at": "2026-04-21T06:33:12.046069Z"
}

Errors

StatustypeWhen
401authentication_errorMissing / bad InferBridge key
409conflict_errorDuplicate commercial-provider key for this user
422invalid_request_errorUnknown provider, missing base_url/declared_region on self_hosted, base_url set on non-self_hosted, or HTTP base_url on a public host

Duplicate self_hosted entries are allowed — the unique index is partial — so a user can register mumbai-llama-70b, bangalore-mistral-7b, and sgp-mixtral-8x7b side-by-side.


Terminal window
curl https://inferbridge.dev/v1/keys \
-H 'Authorization: Bearer ib_...'

200 OK

[
{
"id": "5e4b02f9-2efb-4b69-8d6b-0a8e4e3e6ab2",
"provider": "openai",
"residency": "global",
"declared_region": null,
"base_url": null,
"label": null,
"created_at": "2026-04-21T06:33:12.046069Z"
}
]

Secrets are never returned.


Terminal window
curl -X DELETE https://inferbridge.dev/v1/keys/5e4b02f9-2efb-4b69-8d6b-0a8e4e3e6ab2 \
-H 'Authorization: Bearer ib_...'

204 No Content — empty body. 404 Not Found if the key doesn’t exist or is owned by a different user.