Skip to main content
POST
/
admin
/
api-keys
curl -X POST https://YOUR_API_SUBDOMAIN.avicenna.dev/admin/api-keys \
  -H 'Authorization: Bearer avcna_sk_xxxxxxxxx' \
  -H 'Content-Type: application/json' \
  -d '{
            "name": "Admin Key Production", 
            "ratelimit_min":120, 
            "permission":"admin"
        }'
{
    "success": true,
    "key": "avcna_sk_2675c53f9ed29fdac811b4c3bdda5b32598832523e4836fbdeadc1510b877812",
    "key_data": {
        "id": "6c3c3816-b8ad-4279-8fe0-1d19a0640f96",
        "name": "Admin Key Production",
        "last_used_at": null,
        "created_at": "2026-01-01T00:00:00+00:00",
        "ratelimit_min": 120,
        "permission": "admin"
    }
}

Documentation Index

Fetch the complete documentation index at: https://docs.avicenna.dev/llms.txt

Use this file to discover all available pages before exploring further.

Body Parameters

name
string
required
The API key reference name. Maximum 50 characters.
ratelimit_min
number
default:"60"
The ratelimit assigned to this specific API key. Measured in requests per minute.
permission
string
The API key can be assigned either the user or the admin permission.
  • user: Allows access only to unprotected endpoints or endpoints with the user type authentication enabled.
  • admin: Allows access to all endpoints by default and admin endpoints (manage API keys).
curl -X POST https://YOUR_API_SUBDOMAIN.avicenna.dev/admin/api-keys \
  -H 'Authorization: Bearer avcna_sk_xxxxxxxxx' \
  -H 'Content-Type: application/json' \
  -d '{
            "name": "Admin Key Production", 
            "ratelimit_min":120, 
            "permission":"admin"
        }'
{
    "success": true,
    "key": "avcna_sk_2675c53f9ed29fdac811b4c3bdda5b32598832523e4836fbdeadc1510b877812",
    "key_data": {
        "id": "6c3c3816-b8ad-4279-8fe0-1d19a0640f96",
        "name": "Admin Key Production",
        "last_used_at": null,
        "created_at": "2026-01-01T00:00:00+00:00",
        "ratelimit_min": 120,
        "permission": "admin"
    }
}