---
title: "Update an LLM key"
method: PATCH
path: "/company/llm-keys/{id}"
tags: ["LLM Provider Keys"]
---

# Update an LLM key

`PATCH /company/llm-keys/{id}`

## Request

- Base URL: `https://api.atako.ai`
- URL: `https://api.atako.ai/company/llm-keys/{id}`
- Auth: HTTP bearer

Company admins only.

## Path parameters

- `id` string, uuid, required

## Request body

- object
  - `label` string
  - `status` 'pending_validation' | 'active' | 'invalid' | 'disabled'
  - `priority` integer
  - `config` object
  - `isDefaultForCompany` boolean
  - `monthlyCapUsd` number, nullable

## Response `200`

- LlmProviderKey: A company bring-your-own-key inference key. The secret is never returned.
  - `id` string, uuid, required
  - `companyId` string, uuid
  - `provider` 'openrouter' | 'openai' | 'anthropic' | 'weflayr', required
  - `label` string, required
  - `config` object
  - `status` 'pending_validation' | 'active' | 'invalid' | 'disabled', required
  - `priority` integer
  - `isDefaultForCompany` boolean
  - `monthlyCapUsd` number, nullable
  - `lastValidatedAt` string, date-time, nullable
  - `discoveredModels` object[]
  - `createdAt` string, date-time
  - `updatedAt` string, date-time
  - `activeAgentCount` integer

## Other responses

- `400`: Invalid status / INVALID_MONTHLY_CAP / LABEL_REQUIRED
- `401`: Missing, malformed, or invalid bearer token / API key, or revoked session (SESSION_REVOKED).
- `403`: Not a company admin, or BYOK_NOT_ALLOWED for this company.
- `404`: Not found — or bring-your-own-key is not enabled on this deployment.

## Changes

- **2026-10-19** `aa555c56fbd7`: 2 warning
  - removed the request property `checkinModelId`
  - removed the optional property `checkinModelId` from the response with the `200` status

[Operation history](https://skmtc.dev/atako/apis/atako-api/changes/company/llm-keys/:id/patch.md)

---

[API](https://skmtc.dev/atako/apis/atako-api.md) · [All operations](https://skmtc.dev/atako/apis/atako-api/llms.txt) · [OpenAPI document](https://skmtc.dev/atako/apis/atako-api/revisions/aa555c56fbd7?raw)
