Create a gateway key
POST/api/gateway/keys
Create a key for the Bairav AI Gateway. Admin role required.
The response contains the key in token and ready-to-use openai_base_url. This is the only time the secret is shown. Store it now.
Keep using your own provider key in the Authorization header of your model calls; the gateway forwards it and never stores it. See the Gateway quickstart.
Request
Responses
- 201
- 401
- 403
- 422
The new key. The secret is shown once.
The token is missing, invalid or expired. Refresh it, or sign in again.
Your role does not allow this. The detail names the missing permission or role.
Validation Error