Skip to main content
PATCH
/
v1
/
api-keys
/
sub-keys
/
{key_id}
Update Sub-API Key
curl --request PATCH \
  --url https://api.io.solutions/v1/api-keys/sub-keys/{key_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <x-api-key>' \
  --data '
{
  "description": "<string>",
  "allowed_models": [
    "<string>"
  ],
  "credit_limit": 1,
  "credit_refresh_cycle": "8h",
  "expires_at": "2023-11-07T05:31:56Z"
}
'
{
  "status": "succeeded"
}
All body fields are optional — only the fields you include will be updated.

Unblocking an over-limit key

When a sub-key’s credit_used exceeds its credit_limit, the key is automatically blocked (returns 429 Too Many Requests on inference calls). To unblock it without waiting for the next cycle reset, raise the credit_limit via this endpoint:
curl -X PATCH "https://api.intelligence.io.solutions/v1/api-keys/sub-keys/{key_id}" \
  -H "x-api-key: $ADMIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"credit_limit": 50.0}'

Clearing model restrictions

Pass an empty array for allowed_models to remove all model restrictions, giving the sub-key access to all models available to the admin:
{ "allowed_models": [] }

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

x-api-key
string
required

Admin API key that owns the sub-key. Admin API key (io.net Intelligence)

Path Parameters

key_id
string<uuid>
required

UUID of the sub-key to update.

Body

application/json

All fields are optional. Only provided fields are updated.

description
string | null
allowed_models
string[] | null

New model allow-list. Pass an empty array [] to remove all restrictions.

credit_limit
number | null

New per-cycle credit cap. Set to a higher value to unblock a key that has exceeded its limit.

Required range: x >= 0
credit_refresh_cycle
enum<string> | null
Available options:
8h,
daily,
weekly,
monthly
expires_at

Response

Sub-key updated successfully

status
string
Example:

"succeeded"