Creating a gateway-scoped token¶
Note
The Admin API requires no token. The Admin API is typically protected at the network level.
Send the request as POST to the path /admin/v1/gateways/{gateway_id}/tokens.
Description¶
Creates an auth token for this gateway. The plaintext token is returned once in the response and cannot be retrieved later.
Request¶
The following parameters are available:
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
gateway_id |
path | string |
yes | ID of the gateway. |
Example¶
Example of the request body:
{
"user_id": "usr_abc123",
"label": "production-client",
"scopes": [
"inference"
],
"expires_at": null,
"rate_limit": {
"requests": 100,
"window_sec": 60
},
"budget_usd": 100.0
}
Responses¶
The endpoint answers the request with the following status codes:
| Status code | Description |
|---|---|
201 |
Token created. Store the token value securely — it is not retrievable later. |