---
title: "Add an LLM key (validated right away)"
method: POST
path: "/company/llm-keys"
tags: ["LLM Provider Keys"]
---

# Add an LLM key (validated right away)

`POST /company/llm-keys`

## Request

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

Company admins only. The secret is stored encrypted and never returned.

## Request body

- object
  - `provider` 'openrouter' | 'openai' | 'anthropic' | 'weflayr', required
  - `label` string, required
  - `secret` string, required
  - `config` object

## Response `201`

- object: 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
  - `validationMessage` string, nullable

## Other responses

- `400`: provider/label/secret required, PROVIDER_NOT_SUPPORTED
- `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`: 1 warning
  - removed the optional property `allOf[#/components/schemas/LlmProviderKey]/checkinModelId` from the response with the `201` status

[Operation history](https://skmtc.dev/atako/apis/atako-api/changes/company/llm-keys/post.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)
