Ограничивайте ключи и управляйте ими
Выдавайте каждому приложению ключ только с нужными продуктами, сроком действия, списком разрешённых IP и месячным лимитом расходов, а ключами управляйте из кода.
Как это работает
- 01
Создайте ключ в панели управления или через
POST /api/v1/api-keysключом с правомapi_keys:write. - 02
Дайте ему полный доступ или ограничьте продуктами и уровнями, которые вызывает его приложение.
- 03
Сохраните ключ, когда он показан. Больше он не показывается.
Аутентификация
Эндпоинты управления ключами принимают ключ, как и все остальные, но только с отдельно выданным правом api_keys: read, чтобы получать ключи, и write, чтобы создавать, изменять и отзывать их. Полный доступ его никогда не включает.
Пример
Ключ появляется только в ответе на создание, в data.secret. Все остальные ответы показывают его как masked_key: nai_... и четыре последних символа. Чтобы у ключа был срок действия, добавьте expires_at с датой в будущем.
Полные и ограниченные ключи
Полный ключ получает все продукты на высшем уровне, включая продукты, которые появятся позже. Он никогда не включает api_keys: это право выдаётся только отдельно. Все ключи, созданные до появления прав, — полные.
Ограниченный ключ имеет ровно те уровни, что указаны в его permissions, и ничего больше. Запрос, для которого у него нет уровня, получает ответ 403 insufficient_permissions, а в сообщении указано нужное право, например tts:write.
Уровень — это none, read или write, причём write включает read. У некоторых продуктов нет read, а у аккаунта нет write.
Права по продуктам
Эндпоинты, которые открывает каждый уровень. Выдавайте ключу только то, что вызывает его приложение.
ttsСинтез речиУровниnonereadwrite
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
voicesГолосаУровниnonereadwrite
voices:writePOST /api/v1/tts/voicesDELETE /api/v1/tts/voices/{id}PATCH /api/v1/tts/voices/{id}POST /api/v1/tts/voices/{id}/audio
Стандартным голосам ключ не нужен. С уровнем read список голосов и отдельный голос показывают и клоны вашей организации.
sttРаспознавание речиУровниnonewrite
stt:writePOST /api/v1/stt/transcribe
llmЧат-моделиУровниnonereadwrite
llm:readGET /api/v1/modelsllm:writePOST /api/v1/chat/completions
embeddingsЭмбеддингиУровниnonewrite
embeddings:writePOST /api/v1/embeddings
rerankРеранжированиеУровниnonewrite
rerank:writePOST /api/v1/rerank
accountБаланс и расходыУровниnoneread
account:readGET /api/v1/balanceGET /api/v1/usage
api_keysAPI ключиУровниnonereadwrite
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 открывает и всё, что открывает read.
Срок действия, список IP и лимит расходов
Срок действия: после expires_at ключ получает ответ 401 api_key_expired. Оставьте его пустым, чтобы ключ не истекал.
Список IP: до 100 адресов IPv4 или IPv6 или диапазонов CIDR. Запрос с любого другого адреса получает ответ 403 ip_not_allowed, а пустой список разрешает все адреса.
Месячный лимит расходов: сколько ключ может потратить за календарный месяц, в кредитах. Запрос, который превысил бы его, получает ответ 402 spend_limit_exceeded.
Ключ проверяется в порядке этой таблицы, и первая неудачная проверка отвечает своим кодом. Так можно отличить ключ, который нужно заменить, от ключа, который достаточно снова включить.
| Код | Что делать |
|---|---|
invalid_api_key401 | Ключа нет или он неизвестен. Проверьте заголовок и сам ключ. |
api_key_revoked401 | Отозван навсегда. Создайте новый ключ. |
api_key_disabled401 | Отключён. Включите его снова, чтобы им пользоваться. |
api_key_expired401 | Срок действия истёк. Продлите его или создайте новый ключ. |
ip_not_allowed403 | Адреса нет в списке IP. Добавьте его или отправляйте запросы с адреса из списка. |
insufficient_permissions403 | У ключа нет уровня, который нужен этому эндпоинту. Повысьте уровень или используйте другой ключ. |
spend_limit_exceeded402 | Лимит этого месяца был бы превышен. Повысьте лимит или дождитесь следующего месяца по UTC. |
Как считается лимит расходов
Месяцы — календарные, по UTC: счёт начинается заново в 00:00 UTC первого числа каждого месяца.
Списание, которое ровно достигает лимита, разрешено. Отклоняется только то, что превысило бы его.
Проверка выполняется по возможности, как и проверка баланса: запросы, которые уже выполняются в момент достижения лимита, могут превысить его на свою стоимость.
Когда ключ может превысить лимит
- Эмбеддинги и реранжирование проверяются по оценке, а оплачиваются по токенам, о которых сообщает модель, и их может оказаться больше.
- Задачи синтеза проверяются при постановке в очередь, а оплачиваются по завершении, поэтому ключ может превысить лимит на столько задач, сколько может одновременно держать в очереди или в работе.
Распознавание речи оплачивается по реальной длительности записи, которая известна только после распознавания. Заранее запрос отклоняется, только если от лимита ничего не осталось. Иначе проверка идёт после распознавания, и распознавание, которое превысило бы лимит, получает ответ 402 и не оплачивается.
Лимит расходов относится к одному ключу. Ключи, созданные через API, получают собственные лимиты, поэтому вместе несколько ключей могут потратить больше любого одного лимита. Общим пределом для всех остаётся баланс организации.
Что проверяет список IP
Список IP проверяет публичный адрес, с которого запрос приходит в NeuronAI. За NAT, VPN или вашим прокси это адрес шлюза, поэтому внесите в список шлюз.
Запись совпадает только с адресами своего семейства: 203.0.113.7 не совпадает с ::ffff:203.0.113.7, и наоборот. Внесите в список все адреса, с которых могут приходить ваши запросы, IPv4 и IPv6.
Ключ со списком IP может создавать ключи только с записями из своего списка, и они сравниваются по записям: 10.0.0.0/24 не считается частью 10.0.0.0/16.
Ключи в панели управления
Ключи находятся в панели управления: откройте «Разработчикам», затем «API ключи».
Новый ключ показывается один раз, в окне, которое не закрывается кликом снаружи. Скопируйте его сразу: NeuronAI хранит только его хеш, поэтому показать ключ снова не сможет никто.
После этого в списке каждый ключ показан как nai_... и четыре последних символа, чтобы ключи можно было различить. У ключа подключённого приложения символы не показываются: его секрет никто не видит.
Чтобы заменить ключ, в том числе потерянный, создайте новый ключ, переключите на него приложения и отзовите старый.
Отключите ключ, чтобы остановить его на время, и включите позже. Отзовите ключ, чтобы остановить его навсегда: отозванный ключ больше никогда не работает.
Отозванные ключи остаются на странице вместе с их расходами, за кнопкой «Показать отозванные ключи». Ключи никогда не удаляются.
Ключи Telegram-бота помечены «Telegram-бот». Бот создаёт их только с правами tts:write, voices:read, stt:write и account:read. Их нельзя отключить, потому что бот заменяет свой ключ при каждой повторной регистрации. Изменить или отозвать такой ключ можно.
Ключи для MCP
ИИ-ассистенту нужны права tts:write, voices:write и stt:write, которых хватает всем инструментам MCP. Дайте его ключу только их и месячный лимит расходов.
Откройте «Разработчикам», затем «MCP», перейдите на вкладку CLI и для «Вход через» выберите вариант «API ключ»: кнопка «Создать ключ для MCP» там создаст ключ с этими правами.
Когда кто-то подключает приложение, например Claude или ChatGPT, через вход в NeuronAI, для него создаётся ключ с пометкой «Подключённое приложение». У него права tts:write, voices:write и stt:write, а его секрет никому не показывается.
Его лимит расходов, список IP и срок действия меняются, как у любого ключа, но для Claude и ChatGPT список IP оставьте пустым: они обращаются со своих серверов. Название и права остаются такими, какими их задали при подключении приложения. Вместо отзыва в строке ключа есть «Отключить»: так ключ отзывается, а приложение отключается.
Как подключить ассистента, описано в руководстве «MCP-сервер».
Участники и ключи
Каждый ключ принадлежит участнику, который его создал. Удаление участника из организации отзывает все его ключи, включая ключи, созданные его ключами через API.
Ключ, созданный через API, переживает создавший его ключ: отзыв создателя не останавливает созданные им ключи, поэтому при необходимости отзовите их сами.
У ключа, созданного через API, нет собственных лимитов: он делит общие лимиты организации с вашими остальными ключами.
Управление ключами из кода
Пять эндпоинтов получают, создают, изменяют и отзывают ключи вашей организации. Им нужен ключ с правом api_keys, и они принимают до 60 запросов в минуту на пользователя.
Ключ никогда не выдаёт больше, чем имеет сам: ни одного продукта выше своего уровня, никакого полного доступа от ограниченного ключа и никакого уровня api_keys выше собственного.
И не выдаёт более мягких ограничений: если у него есть срок действия, новый ключ должен истечь не позже; если есть лимит расходов, новому ключу нужен лимит не выше; если есть список IP, новый ключ может содержать только его записи. Нарушение получает ответ 403 insufficient_permissions.
При изменении передавайте только изменяемые поля: permissions заменяет весь набор прав, а null очищает expires_at, allowed_ips или monthly_spend_limit. Изменение, которое даёт ключу больше возможностей, проверяется как создание нового ключа, поэтому передавайте вместе с ним его ограничения.
Отозванный ключ нельзя изменить: ответ будет 409 conflict. В списке есть и отозванные ключи, сначала новые, а идентификаторы ключей — это ULID в нижнем регистре. Ключ может отозвать сам себя: так завершается ротация из кода.
Ключ подключённого приложения сохраняет свои права: PATCH, который передаёт name, access или permissions, получает ответ 422 invalid_request, а отзыв ключа отключает приложение.
Справочник API
Поля запросов, ответы, цены и примеры кода для каждого эндпоинта, а также форма, которая отправляет настоящий запрос.
Хранится только в вашем браузере.
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.
Параметры
| Field | Description |
|---|---|
limitquery integer | null | |
cursorquery string | null |
Ответы
| Заголовок | Описание |
|---|---|
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. |
| Поле | Описание |
|---|---|
dataОбязательноApiKey[] | |
next_cursorОбязательноstring | null | |
request_idОбязательноstring | format: uuid |
X-Request-Id: string| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
X-Request-Id: string| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
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. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
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`. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
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. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
Примеры
Попробовать
Укажите API-ключ в панели выше, чтобы отправлять запросы с ключом.
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.
Тело запроса
| Поле | Описание |
|---|---|
nameОбязательноstring | minLen: 1 · maxLen: 80 |
descriptionstring | null | maxLen: 500 |
accessОбязательноApiKeyAccess | |
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 |
Ответы
| Заголовок | Описание |
|---|---|
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. |
| Поле | Описание |
|---|---|
dataОбязательноApiKey | |
request_idОбязательноstring | format: uuid |
X-Request-Id: string| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
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. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
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. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
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`. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
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. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
Примеры
Попробовать
Укажите API-ключ в панели выше, чтобы отправлять запросы с ключом.
GET /v1/api-keys/{id}
Get an API key
One key by `id`. A key of another organization answers 404 `not_found`.
Параметры
| Field | Description |
|---|---|
idRequiredpath string | The key id: a lowercase ULID. |
Ответы
| Заголовок | Описание |
|---|---|
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. |
| Поле | Описание |
|---|---|
dataОбязательноApiKey | |
request_idОбязательноstring | format: uuid |
X-Request-Id: string| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
X-Request-Id: string| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
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. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
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`. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
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. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
Примеры
Попробовать
Укажите API-ключ в панели выше, чтобы отправлять запросы с ключом.
Заполните обязательный параметр: 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`.
Параметры
| Field | Description |
|---|---|
idRequiredpath string | The key id: a lowercase ULID. |
Тело запроса
| Поле | Описание |
|---|---|
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 |
Ответы
| Заголовок | Описание |
|---|---|
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. |
| Поле | Описание |
|---|---|
dataОбязательноApiKey | |
request_idОбязательноstring | format: uuid |
X-Request-Id: string| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
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. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
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. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
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. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
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. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
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`. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
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. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
Примеры
Попробовать
Укажите API-ключ в панели выше, чтобы отправлять запросы с ключом.
Заполните обязательный параметр: 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.
Параметры
| Field | Description |
|---|---|
idRequiredpath string | The key id: a lowercase ULID. |
Ответы
| Заголовок | Описание |
|---|---|
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| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
X-Request-Id: string| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
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. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
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`. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
| Заголовок | Описание |
|---|---|
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. |
| Поле | Описание |
|---|---|
errorОбязательноobject | |
request_idОбязательноstring | The same ID as the `X-Request-Id` header. format: uuid |
Примеры
Попробовать
Укажите API-ключ в панели выше, чтобы отправлять запросы с ключом.
Заполните обязательный параметр: id.
id*