Kalitlaringizni cheklang va boshqaring
Har bir ilovaga faqat kerakli mahsulotlar, amal qilish muddati, ruxsat etilgan IP manzillar roʻyxati va oylik sarf limiti bor kalit bering, kalitlarni esa koddan boshqaring.
Qanday ishlaydi
- 01
Kalitni boshqaruv panelida yoki
api_keys:writeruxsati bor kalit bilanPOST /api/v1/api-keysorqali yarating. - 02
Unga toʻliq ruxsat bering yoki uni ilovasi chaqiradigan mahsulotlar va darajalar bilan cheklang.
- 03
Kalit koʻrsatilganda uni saqlab qoʻying. U boshqa hech qachon koʻrsatilmaydi.
Autentifikatsiya
Kalitlarni boshqaradigan endpointlar ham boshqalar kabi kalit qabul qiladi, lekin faqat api_keys ruxsati alohida berilgan kalitni: kalitlarni olish uchun read, yaratish, oʻzgartirish va chaqirib olish uchun write. Toʻliq ruxsat uni hech qachon oʻz ichiga olmaydi.
Namuna
Kalit faqat yaratish javobida, data.secret sifatida chiqadi. Boshqa barcha javoblar uni masked_key sifatida koʻrsatadi: nai_... va oxirgi toʻrt belgisi. Kalitning amal qilish muddati boʻlishi uchun kelajakdagi sana bilan expires_at ni qoʻshing.
Toʻliq va cheklangan kalitlar
Toʻliq kalit barcha mahsulotlarga, keyin qoʻshiladiganlariga ham, eng yuqori darajada ega. U hech qachon api_keys ni oʻz ichiga olmaydi: bu ruxsat faqat alohida beriladi. Ruxsatlar paydo boʻlishidan oldin yaratilgan barcha kalitlar toʻliq kalitlardir.
Cheklangan kalit faqat oʻz permissions idagi darajalarga ega, boshqa hech narsaga emas. Unga darajasi yetmaydigan soʻrov 403 insufficient_permissions javobini oladi, xabarda esa kerakli ruxsat, masalan tts:write, koʻrsatiladi.
Daraja none, read yoki write boʻladi, write esa read ni ham oʻz ichiga oladi. Baʼzi mahsulotlarda read yoʻq, hisobda esa write yoʻq.
Mahsulotlar boʻyicha ruxsatlar
Har bir daraja ochadigan endpointlar. Kalitga faqat uning ilovasi chaqiradigan narsalarni bering.
ttsMatnni ovozga aylantirishDarajalarnonereadwrite
tts:readGET /api/v1/tts/jobs/{id}GET /api/v1/tts/jobs/{id}/audiotts:writePOST /api/v1/tts/dialoguePOST /api/v1/tts/jobsPOST /api/v1/tts/synthesize
voicesOvozlarDarajalarnonereadwrite
voices:writePOST /api/v1/tts/voicesDELETE /api/v1/tts/voices/{id}PATCH /api/v1/tts/voices/{id}POST /api/v1/tts/voices/{id}/audio
Standart ovozlar uchun kalit kerak emas. read darajasi bilan ovozlar roʻyxati va alohida ovoz tashkilotingiz klonlarini ham koʻrsatadi.
sttOvozni matnga aylantirishDarajalarnonewrite
stt:writePOST /api/v1/stt/transcribe
llmChat modellariDarajalarnonereadwrite
llm:readGET /api/v1/modelsllm:writePOST /api/v1/chat/completions
embeddingsEmbeddinglarDarajalarnonewrite
embeddings:writePOST /api/v1/embeddings
rerankQayta saralashDarajalarnonewrite
rerank:writePOST /api/v1/rerank
accountBalans va sarfDarajalarnoneread
account:readGET /api/v1/balanceGET /api/v1/usage
api_keysAPI kalitlarDarajalarnonereadwrite
api_keys:readGET /api/v1/api-keysGET /api/v1/api-keys/{id}api_keys:writePOST /api/v1/api-keysPATCH /api/v1/api-keys/{id}POST /api/v1/api-keys/{id}/revoke
write darajasi read ochadigan hamma narsani ham ochadi.
Muddat, IP roʻyxati va sarf limiti
Muddat: expires_at dan keyin kalit 401 api_key_expired javobini oladi. Muddatsiz kalit uchun uni boʻsh qoldiring.
IP roʻyxati: 100 tagacha IPv4 yoki IPv6 manzil yoki CIDR diapazon. Boshqa har qanday manzildan kelgan soʻrov 403 ip_not_allowed javobini oladi, boʻsh roʻyxat esa barcha manzillarga ruxsat beradi.
Oylik sarf limiti: kalit bir kalendar oyida sarflashi mumkin boʻlgan eng koʻp summa, kreditda. Undan oshib ketadigan soʻrov 402 spend_limit_exceeded javobini oladi.
Kalit ushbu jadval tartibida tekshiriladi va birinchi muvaffaqiyatsiz tekshiruv oʻz kodi bilan javob beradi. Shu tariqa almashtirish kerak boʻlgan kalitni qayta yoqish kifoya boʻlgan kalitdan ajrata olasiz.
| Kod | Nima qilish kerak |
|---|---|
invalid_api_key401 | Kalit yoʻq yoki nomaʼlum. Sarlavha va kalitning oʻzini tekshiring. |
api_key_revoked401 | Butunlay chaqirib olingan. Yangi kalit yarating. |
api_key_disabled401 | Oʻchirib qoʻyilgan. Undan foydalanish uchun uni qayta yoqing. |
api_key_expired401 | Muddati oʻtgan. Muddatini uzaytiring yoki yangi kalit yarating. |
ip_not_allowed403 | Manzil IP roʻyxatida yoʻq. Uni qoʻshing yoki roʻyxatdagi manzildan soʻrov yuboring. |
insufficient_permissions403 | Kalitda bu endpointga kerakli daraja yoʻq. Darajani oshiring yoki boshqa kalitdan foydalaning. |
spend_limit_exceeded402 | Bu oylik limitdan oshib ketiladi. Limitni oshiring yoki UTC boʻyicha keyingi oyni kuting. |
Sarf limiti qanday hisoblanadi
Oylar UTC boʻyicha kalendar oylari: hisob har oyning birinchi kuni UTC boʻyicha 00:00 da qaytadan boshlanadi.
Limitga aynan teng boʻladigan toʻlov ruxsat etiladi. Faqat undan oshib ketadigani rad etiladi.
Tekshiruv balans tekshiruvi kabi imkon qadar bajariladi: limitga yetilgan paytda allaqachon bajarilayotgan soʻrovlar kalitni oʻz narxi miqdorida limitdan oshirib yuborishi mumkin.
Kalit limitdan qachon oshishi mumkin
- Embeddinglar va qayta saralash taxminiy hisob boʻyicha tekshiriladi, soʻng model xabar bergan tokenlar uchun toʻlanadi, ular esa koʻproq boʻlishi mumkin.
- Sintez vazifalari navbatga qoʻyilganda tekshiriladi va tugaganda toʻlanadi, shuning uchun kalit bir vaqtda navbatda yoki bajarilishda turishi mumkin boʻlgan vazifalar soni qadar limitdan oshishi mumkin.
Ovozni matnga aylantirish yozuvning haqiqiy davomiyligi uchun toʻlanadi, u esa faqat transkripsiyadan keyin maʼlum boʻladi. Soʻrov oldindan faqat limitdan hech narsa qolmaganda rad etiladi. Aks holda tekshiruv transkripsiyadan keyin boʻladi va limitdan oshadigan transkripsiya 402 javobini oladi hamda toʻlanmaydi.
Sarf limiti bitta kalitga tegishli. API orqali yaratilgan kalitlar oʻz limitlarini oladi, shuning uchun bir nechta kalit birgalikda istalgan bitta limitdan koʻproq sarflashi mumkin. Ularning barchasi uchun umumiy chegara baribir tashkilot balansi.
IP roʻyxati nimani tekshiradi
IP roʻyxati soʻrovingiz NeuronAIʼga kelgan ommaviy manzilni tekshiradi. NAT, VPN yoki oʻz proksi-serveringiz ortida bu shlyuz manzili, shuning uchun roʻyxatga shlyuzni kiriting.
Yozuv faqat oʻz manzil oilasiga mos keladi: 203.0.113.7 yozuvi ::ffff:203.0.113.7 manziliga mos kelmaydi va aksincha. Soʻrovlaringiz kelishi mumkin boʻlgan barcha IPv4 va IPv6 manzillarni roʻyxatga kiriting.
IP roʻyxati bor kalit faqat oʻz roʻyxatidagi yozuvlar bilan kalit yarata oladi, ular yozuvma-yozuv solishtiriladi: 10.0.0.0/24 10.0.0.0/16 ning qismi hisoblanmaydi.
Boshqaruv panelidagi kalitlar
Kalitlar boshqaruv panelida: «Dasturchilar», keyin «API kalitlar» boʻlimini oching.
Yangi kalit bir marta, tashqarisiga bosilganda yopilmaydigan oynada koʻrsatiladi. Uni darhol nusxalang: NeuronAI faqat uning xeshini saqlaydi, shuning uchun uni hech kim qayta koʻrsata olmaydi.
Shundan soʻng roʻyxatda har bir kalit nai_... va oxirgi toʻrt belgisi bilan koʻrsatiladi, shunda kalitlarni ajrata olasiz. Ulangan ilovaning kaliti belgilarsiz koʻrsatiladi: uning maxfiy qismini hech kim koʻrmaydi.
Kalitni, jumladan yoʻqotilganini almashtirish uchun yangi kalit yarating, ilovalaringizni unga oʻtkazing, soʻng eskisini chaqirib oling.
Kalitni vaqtincha toʻxtatish uchun uni oʻchirib qoʻying va keyinroq qayta yoqing. Butunlay toʻxtatish uchun uni chaqirib oling: chaqirib olingan kalit boshqa hech qachon ishlamaydi.
Chaqirib olingan kalitlar sarfi bilan birga sahifada, «Chaqirib olingan kalitlarni koʻrsatish» tugmasi ortida qoladi. Kalitlar hech qachon oʻchirilmaydi.
Telegram-bot kalitlari «Telegram-bot» deb belgilangan. Bot ularni faqat tts:write, voices:read, stt:write va account:read ruxsatlari bilan yaratadi. Ularni oʻchirib qoʻyib boʻlmaydi, chunki bot har safar qayta roʻyxatdan oʻtganda kalitini almashtiradi. Bunday kalitni oʻzgartirish yoki chaqirib olish mumkin.
MCP uchun kalitlar
AI assistentga barcha MCP vositalari uchun yetarli boʻlgan tts:write, voices:write va stt:write ruxsatlari kerak. Uning kalitiga faqat ularni va oylik sarf limitini bering.
«Dasturchilar», keyin «MCP» boʻlimini oching, CLI yorligʻiga oʻting va «Kirish usuli» maydonida «API kalit» variantini tanlang: u yerdagi «MCP uchun kalit yaratish» tugmasi shu ruxsatlar bilan kalit yaratadi.
Kimdir Claude yoki ChatGPT kabi ilovani NeuronAI orqali kirib ulasa, unga «Ulangan ilova» deb belgilangan kalit yaratiladi. Unda tts:write, voices:write va stt:write ruxsatlari boʻladi, uning maxfiy qismi esa hech kimga koʻrsatilmaydi.
Uning sarf limiti, IP roʻyxati va muddati har qanday kalitniki kabi oʻzgartiriladi, lekin Claude va ChatGPT uchun IP roʻyxatini boʻsh qoldiring: ular oʻz serverlaridan murojaat qiladi. Nomi va ruxsatlari ilova ulanganda qanday berilgan boʻlsa, shundayligicha qoladi. Kalit qatorida chaqirib olish oʻrniga «Uzish» bor: u kalitni chaqirib oladi va ilovani uzadi.
Assistentni qanday ulash «MCP serveri» qoʻllanmasida tushuntirilgan.
Aʼzolar va kalitlar
Har bir kalit uni yaratgan aʼzoga tegishli. Aʼzoni tashkilotdan chiqarish uning barcha kalitlarini, jumladan uning kalitlari API orqali yaratgan kalitlarni ham chaqirib oladi.
API orqali yaratilgan kalit uni yaratgan kalitdan keyin ham ishlayveradi: yaratuvchini chaqirib olish u yaratgan kalitlarni toʻxtatmaydi, shuning uchun kerak boʻlsa, ularni oʻzingiz chaqirib oling.
API orqali yaratilgan kalitning oʻz limitlari yoʻq: u tashkilotingizning umumiy limitlarini boshqa kalitlaringiz bilan birga ishlatadi.
Kalitlarni koddan boshqarish
Beshta endpoint tashkilotingiz kalitlarini oladi, yaratadi, oʻzgartiradi va chaqirib oladi. Ular uchun api_keys ruxsati berilgan kalit kerak va ular har bir foydalanuvchidan daqiqasiga 60 tagacha soʻrov qabul qiladi.
Kalit hech qachon oʻzida borlaridan koʻproq bermaydi: hech bir mahsulotni oʻz darajasidan yuqori, cheklangan kalitdan toʻliq ruxsatni va oʻzinikidan yuqori api_keys darajasini bermaydi.
Yumshoqroq cheklovlar ham bermaydi: agar uning muddati boʻlsa, yangi kalit undan kechiktirmay tugashi kerak; sarf limiti boʻlsa, yangi kalitga undan yuqori boʻlmagan limit kerak; IP roʻyxati boʻlsa, yangi kalit faqat uning yozuvlarini oʻz ichiga olishi mumkin. Buzilish 403 insufficient_permissions javobini oladi.
Oʻzgartirishda faqat oʻzgaradigan maydonlarni yuboring: permissions butun ruxsatlar toʻplamini almashtiradi, null esa expires_at, allowed_ips yoki monthly_spend_limit ni tozalaydi. Kalitga koʻproq imkoniyat beradigan oʻzgartirish yangi kalit kabi tekshiriladi, shuning uchun u bilan birga kalit cheklovlarini ham yuboring.
Chaqirib olingan kalitni oʻzgartirib boʻlmaydi: javob 409 conflict boʻladi. Roʻyxatda chaqirib olingan kalitlar ham bor, eng yangilari birinchi, kalit identifikatorlari esa kichik harfli ULID. Kalit oʻzini chaqirib olishi mumkin, koddan rotatsiya shunday yakunlanadi.
Ulangan ilovaning kaliti oʻz ruxsatlarini saqlaydi: name, access yoki permissions yuborilgan PATCH 422 invalid_request javobini oladi, kalitni chaqirib olish esa ilovani uzadi.
API maʼlumotnomasi
Har bir endpoint uchun soʻrov maydonlari, javoblar, narxlar va kod namunalari hamda haqiqiy soʻrov yuboradigan shakl.
Faqat brauzeringizda saqlanadi.
API keys
Create, list, change and revoke your organization's API keys from code. Every call needs a key holding the `api_keys` permission: `read` to list and get, `write` to create, change and revoke. These endpoints allow 60 requests a minute per user.
GET /v1/api-keys
List API keys
Lists your organization's API keys, newest first, revoked ones included. Pages hold up to `limit` keys (1–100, default 50); pass a page's `next_cursor` as `cursor` to get the next. Key ids are lowercase ULIDs.
Parametrlar
| Field | Description |
|---|---|
limitquery integer | null | |
cursorquery string | null |
Javoblar
| Sarlavha | Tavsif |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Maydon | Tavsif |
|---|---|
dataMajburiyApiKey[] | |
next_cursorMajburiystring | null | |
request_idMajburiystring | format: uuid |
X-Request-Id: string| Maydon | Tavsif |
|---|---|
errorMajburiyobject | |
request_idMajburiystring | The same ID as the `X-Request-Id` header. format: uuid |
X-Request-Id: string| Maydon | Tavsif |
|---|---|
errorMajburiyobject | |
request_idMajburiystring | The same ID as the `X-Request-Id` header. format: uuid |
| Sarlavha | Tavsif |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Maydon | Tavsif |
|---|---|
errorMajburiyobject | |
request_idMajburiystring | The same ID as the `X-Request-Id` header. format: uuid |
| Sarlavha | Tavsif |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
Retry-Afterinteger | Seconds to wait before retrying. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
X-RateLimit-Resetinteger | When the rate limit lets requests through again, as a Unix time in seconds. Sent with a 429 for `rate_limit_exceeded`. |
| Maydon | Tavsif |
|---|---|
errorMajburiyobject | |
request_idMajburiystring | The same ID as the `X-Request-Id` header. format: uuid |
| Sarlavha | Tavsif |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
Retry-Afterinteger | Seconds to wait before retrying. Sent with a 503 during maintenance, when a retry time was set. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Maydon | Tavsif |
|---|---|
errorMajburiyobject | |
request_idMajburiystring | The same ID as the `X-Request-Id` header. format: uuid |
Namunalar
Sinab koʻrish
Kalit bilan soʻrov yuborish uchun API kalitingizni yuqoridagi panelga kiriting.
limitcursorPOST /v1/api-keys
Create an API key
Creates a key. `name` (1–80 characters) and `access` (`full` or `restricted`) are required. A restricted key holds exactly the levels in `permissions`; a full key holds every product, and its `permissions` may then name only `api_keys`. `allowed_ips` is a list of addresses or CIDR ranges, and `monthly_spend_limit` is in credits per calendar month (UTC). Answers 201 with the key and its `secret`. This is the only time the secret is ever shown, so store it now. The new key never holds more than the calling key. A restricted caller cannot create full keys or set a product above its own level, and the caller's own `api_keys` level caps the one it grants. The new key cannot have looser limits either: if the caller expires, the new key must expire no later; if the caller has a monthly spend limit, the new key needs one no higher; and if the caller has an IP allowlist, every entry of the new key's must appear in the caller's, compared entry by entry. A violation answers 403 `insufficient_permissions`. A spend limit applies to each key on its own. A key made through the API outlives the key that made it, and per-key rate and concurrency overrides are not inherited.
Soʻrov tanasi
| Maydon | Tavsif |
|---|---|
nameMajburiystring | minLen: 1 · maxLen: 80 |
descriptionstring | null | maxLen: 500 |
accessMajburiyApiKeyAccess | |
permissionsobject | Levels by product, such as `{"tts": "write"}`. On a `restricted` key a product left out is `none`. A `full` key already holds every other product at its highest level, so its map may name only `api_keys`. |
expires_atstring | null | format: date-time |
monthly_spend_limitnumber | null | In credits per calendar month (UTC), from 0 to 999999999999.99 with at most two decimals. Leave it out, or send `null`, for no limit. |
allowed_ipsarray | null |
Javoblar
| Sarlavha | Tavsif |
|---|---|
Cache-Controlstring | Includes `no-store`: the answer holds the new key's secret, so no cache may keep a copy. |
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Maydon | Tavsif |
|---|---|
dataMajburiyApiKey | |
request_idMajburiystring | format: uuid |
X-Request-Id: string| Maydon | Tavsif |
|---|---|
errorMajburiyobject | |
request_idMajburiystring | The same ID as the `X-Request-Id` header. format: uuid |
| Sarlavha | Tavsif |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Maydon | Tavsif |
|---|---|
errorMajburiyobject | |
request_idMajburiystring | The same ID as the `X-Request-Id` header. format: uuid |
| Sarlavha | Tavsif |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Maydon | Tavsif |
|---|---|
errorMajburiyobject | |
request_idMajburiystring | The same ID as the `X-Request-Id` header. format: uuid |
| Sarlavha | Tavsif |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
Retry-Afterinteger | Seconds to wait before retrying. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
X-RateLimit-Resetinteger | When the rate limit lets requests through again, as a Unix time in seconds. Sent with a 429 for `rate_limit_exceeded`. |
| Maydon | Tavsif |
|---|---|
errorMajburiyobject | |
request_idMajburiystring | The same ID as the `X-Request-Id` header. format: uuid |
| Sarlavha | Tavsif |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
Retry-Afterinteger | Seconds to wait before retrying. Sent with a 503 during maintenance, when a retry time was set. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Maydon | Tavsif |
|---|---|
errorMajburiyobject | |
request_idMajburiystring | The same ID as the `X-Request-Id` header. format: uuid |
Namunalar
Sinab koʻrish
Kalit bilan soʻrov yuborish uchun API kalitingizni yuqoridagi panelga kiriting.
GET /v1/api-keys/{id}
Get an API key
One key by `id`. A key of another organization answers 404 `not_found`.
Parametrlar
| Field | Description |
|---|---|
idRequiredpath string | The key id: a lowercase ULID. |
Javoblar
| Sarlavha | Tavsif |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Maydon | Tavsif |
|---|---|
dataMajburiyApiKey | |
request_idMajburiystring | format: uuid |
X-Request-Id: string| Maydon | Tavsif |
|---|---|
errorMajburiyobject | |
request_idMajburiystring | The same ID as the `X-Request-Id` header. format: uuid |
X-Request-Id: string| Maydon | Tavsif |
|---|---|
errorMajburiyobject | |
request_idMajburiystring | The same ID as the `X-Request-Id` header. format: uuid |
| Sarlavha | Tavsif |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Maydon | Tavsif |
|---|---|
errorMajburiyobject | |
request_idMajburiystring | The same ID as the `X-Request-Id` header. format: uuid |
| Sarlavha | Tavsif |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
Retry-Afterinteger | Seconds to wait before retrying. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
X-RateLimit-Resetinteger | When the rate limit lets requests through again, as a Unix time in seconds. Sent with a 429 for `rate_limit_exceeded`. |
| Maydon | Tavsif |
|---|---|
errorMajburiyobject | |
request_idMajburiystring | The same ID as the `X-Request-Id` header. format: uuid |
| Sarlavha | Tavsif |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
Retry-Afterinteger | Seconds to wait before retrying. Sent with a 503 during maintenance, when a retry time was set. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Maydon | Tavsif |
|---|---|
errorMajburiyobject | |
request_idMajburiystring | The same ID as the `X-Request-Id` header. format: uuid |
Namunalar
Sinab koʻrish
Kalit bilan soʻrov yuborish uchun API kalitingizni yuqoridagi panelga kiriting.
Majburiy parametrlarni toʻldiring: id.
id*PATCH /v1/api-keys/{id}
Change an API key
Changes a key. Send only the fields to change: `permissions` replaces the whole map, `enabled` switches the key on or off, and `null` clears `expires_at`, `allowed_ips` or `monthly_spend_limit` — `allowed_ips: []` clears the allowlist too. A change that gives the key more power is checked as if the key were being created. More power means a higher level or full access, switching the key on, a later expiry, a higher spend limit, or a wider allowlist. So send the key's limits along with such a change. A violation answers 403 `insufficient_permissions`. An app someone connected to the MCP server, such as Claude or ChatGPT, has a key of its own, named after the app with “(connected app)” at the end. That key keeps the name, access and permissions it was given when the app was connected: a change that sends any of them answers 422 `invalid_request`. Its description, limits, expiry and switch change like any key's. A revoked key cannot be changed: 409 `conflict`.
Parametrlar
| Field | Description |
|---|---|
idRequiredpath string | The key id: a lowercase ULID. |
Soʻrov tanasi
| Maydon | Tavsif |
|---|---|
namestring | minLen: 1 · maxLen: 80 |
descriptionstring | null | maxLen: 500 |
accessApiKeyAccess | |
permissionsobject | Replaces the whole map. Levels by product, such as `{"tts": "write"}`. On a `restricted` key a product left out is `none`. A `full` key already holds every other product at its highest level, so its map may name only `api_keys`. |
expires_atstring | null | format: date-time |
monthly_spend_limitnumber | null | In credits per calendar month (UTC), from 0 to 999999999999.99 with at most two decimals. `null` removes the limit. |
enabledboolean | |
allowed_ipsarray | null |
Javoblar
| Sarlavha | Tavsif |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Maydon | Tavsif |
|---|---|
dataMajburiyApiKey | |
request_idMajburiystring | format: uuid |
X-Request-Id: string| Maydon | Tavsif |
|---|---|
errorMajburiyobject | |
request_idMajburiystring | The same ID as the `X-Request-Id` header. format: uuid |
| Sarlavha | Tavsif |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Maydon | Tavsif |
|---|---|
errorMajburiyobject | |
request_idMajburiystring | The same ID as the `X-Request-Id` header. format: uuid |
| Sarlavha | Tavsif |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Maydon | Tavsif |
|---|---|
errorMajburiyobject | |
request_idMajburiystring | The same ID as the `X-Request-Id` header. format: uuid |
| Sarlavha | Tavsif |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Maydon | Tavsif |
|---|---|
errorMajburiyobject | |
request_idMajburiystring | The same ID as the `X-Request-Id` header. format: uuid |
| Sarlavha | Tavsif |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Maydon | Tavsif |
|---|---|
errorMajburiyobject | |
request_idMajburiystring | The same ID as the `X-Request-Id` header. format: uuid |
| Sarlavha | Tavsif |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
Retry-Afterinteger | Seconds to wait before retrying. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
X-RateLimit-Resetinteger | When the rate limit lets requests through again, as a Unix time in seconds. Sent with a 429 for `rate_limit_exceeded`. |
| Maydon | Tavsif |
|---|---|
errorMajburiyobject | |
request_idMajburiystring | The same ID as the `X-Request-Id` header. format: uuid |
| Sarlavha | Tavsif |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
Retry-Afterinteger | Seconds to wait before retrying. Sent with a 503 during maintenance, when a retry time was set. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Maydon | Tavsif |
|---|---|
errorMajburiyobject | |
request_idMajburiystring | The same ID as the `X-Request-Id` header. format: uuid |
Namunalar
Sinab koʻrish
Kalit bilan soʻrov yuborish uchun API kalitingizni yuqoridagi panelga kiriting.
Majburiy parametrlarni toʻldiring: id.
id*POST /v1/api-keys/{id}/revoke
Revoke an API key
Revokes a key for good: it stops working at once and can never be switched back on. Its usage history stays. A key may revoke itself, to rotate. Revoking the key of an app connected to the MCP server also disconnects the app, ending its sign-in. Answers 204.
Parametrlar
| Field | Description |
|---|---|
idRequiredpath string | The key id: a lowercase ULID. |
Javoblar
| Sarlavha | Tavsif |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
X-Request-Id: string| Maydon | Tavsif |
|---|---|
errorMajburiyobject | |
request_idMajburiystring | The same ID as the `X-Request-Id` header. format: uuid |
X-Request-Id: string| Maydon | Tavsif |
|---|---|
errorMajburiyobject | |
request_idMajburiystring | The same ID as the `X-Request-Id` header. format: uuid |
| Sarlavha | Tavsif |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Maydon | Tavsif |
|---|---|
errorMajburiyobject | |
request_idMajburiystring | The same ID as the `X-Request-Id` header. format: uuid |
| Sarlavha | Tavsif |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
Retry-Afterinteger | Seconds to wait before retrying. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
X-RateLimit-Resetinteger | When the rate limit lets requests through again, as a Unix time in seconds. Sent with a 429 for `rate_limit_exceeded`. |
| Maydon | Tavsif |
|---|---|
errorMajburiyobject | |
request_idMajburiystring | The same ID as the `X-Request-Id` header. format: uuid |
| Sarlavha | Tavsif |
|---|---|
X-Request-Idstring | Identifies this request. A JSON body carries it as `request_id` too; quote it to support. |
Retry-Afterinteger | Seconds to wait before retrying. Sent with a 503 during maintenance, when a retry time was set. |
X-RateLimit-Limitinteger | The requests a minute the rate limit on this endpoint allows. Sent once the limit has counted the request, so not when the key itself is refused. |
X-RateLimit-Remaininginteger | How many of them are left this minute. |
| Maydon | Tavsif |
|---|---|
errorMajburiyobject | |
request_idMajburiystring | The same ID as the `X-Request-Id` header. format: uuid |
Namunalar
Sinab koʻrish
Kalit bilan soʻrov yuborish uchun API kalitingizni yuqoridagi panelga kiriting.
Majburiy parametrlarni toʻldiring: id.
id*