---
title: "Bring your own key to Linear's coding agent, through Kaeso"
description: "Linear's cloud coding agent now takes your own key, and any gateway that speaks Anthropic Messages or OpenAI Responses. Point it at Kaeso to put its sessions under your own keys, limits, routes and request logs. Step by step."
url: https://kaeso.app/articles/linear-byok-through-kaeso
markdown: https://kaeso.app/articles/linear-byok-through-kaeso.md
language: en
alternates:
  de: https://kaeso.app/de/articles/linear-byok-through-kaeso.md
  zh-CN: https://kaeso.app/zh-CN/articles/linear-byok-through-kaeso.md
published: 2026-11-13
authors:
  - Kaeso Team
tags:
  - linear
  - agents
  - byok
  - guide
image: https://kaeso.app/articles/linear-byok-through-kaeso/cover.jpg
index: https://kaeso.app/llms.txt
---

# Bring your own key to Linear's coding agent, through Kaeso

Linear's cloud coding agent now takes your own key, and any gateway that speaks Anthropic Messages or OpenAI Responses. Point it at Kaeso to put its sessions under your own keys, limits, routes and request logs. Step by step.

> Every page, article and docs page of Kaeso is listed in https://kaeso.app/llms.txt.

- Published: 13 November 2026
- Reading time: 5 min
- Author: Kaeso Team

On November 12, Linear [opened its cloud coding agent to your own key](https://linear.app/changelog/2026-11-12-bring-your-own-key). Until then, every session ran on models Linear bought for you. Now an admin can connect the workspace's own Anthropic or OpenAI account, Amazon Bedrock, or a custom endpoint: any gateway that speaks the Anthropic Messages API or the OpenAI Responses API.

Kaeso speaks both. Point Linear at your install, and every request the agent makes goes through a project you control: billed to your provider keys at your rates, held to your limits, routed by your aliases and written to your request log.

## What changes, and what doesn't

Linear's agent, Linear Code, runs Claude Code or Codex in a sandbox. Bring your own key moves the model calls; the sandbox stays with Linear.

| | On Linear credits | Through Kaeso |
| --- | --- | --- |
| Model usage | Paid with Linear AI credits | Paid by your provider keys in Kaeso, at your rates |
| Sandbox runtime | Linear AI credits | Linear AI credits, unchanged |
| Who calls the model | Linear | Your Kaeso install, with your provider keys |
| Limits and logs | Linear's | Your project's limits, budgets and request log |

So the workspace still needs AI credits for the sandbox. Linear also needs an API key, not a ChatGPT or Claude subscription; behind Kaeso, that key is a Kaeso key. Bring your own key is on all of Linear's current plans, and only a workspace owner or admin can set it up. Members change nothing: they assign issues to the agent as before.

## Before you start

- **A Kaeso install Linear can reach.** The sandbox runs in Linear's cloud, so the install needs a public HTTPS address, such as `https://kaeso.example.com`. An install on your laptop or behind a VPN won't do. [Where to run Kaeso](https://kaeso.app/articles/where-to-run-kaeso) helps you choose a place.
- **A project for the agent,** with the models it should use in its catalogue and provider keys for them. A project of its own keeps the agent's spending, limits and logs apart from your apps.
- **Admin rights in Linear,** and Linear Code, the cloud coding agent, turned on under **Settings › AI & agents**.

## 1. Create a key for Linear

In the Kaeso console, open the project and choose **API keys › Create key**. Give it a name Linear's requests will be easy to find by, such as `linear-agent`. A service account of the project is a better owner than a person, so the key outlives anyone leaving the team.

Under **Models and limits**, choose the models the agent may call, and set a token budget for the day or the month ([limits and budgets](https://docs.kaeso.app/console/limits-and-budgets)). Copy the key: Kaeso shows it once.

Prefer a token budget over a spend budget here. Kaeso prices a request by its tokens and can't price server tools that the provider bills per call, such as web search. While any spend budget covers a request, Kaeso refuses one that uses such a tool, and coding agents search the web. A token budget lets these requests through.

## 2. Connect Kaeso in Linear

In Linear, open **Settings › Linear Code**. Under **Agent configuration**, **Agent** chooses what powers Linear Code, such as Claude Code, and **Model** which model it runs. Below them, **Inference** has two rows, and each says who runs and pays for a family of models:

| Row | Covers | Kaeso endpoint it needs |
| --- | --- | --- |
| **Anthropic** | Claude models | Anthropic Messages, `POST /v1/messages` |
| **OpenAI** | OpenAI models | OpenAI Responses, `POST /v1/responses` |

Both rows start on **Linear credits**, and each connection is shared by the whole workspace. Connect the row of the models your agent runs, or both.

For **Claude models**, in the **Anthropic** row:

1. Open the menu that says **Linear credits** and choose **API key**. **Add API key** opens.
2. Under **Provider**, choose **Custom endpoint**.
3. **Endpoint URL**: your install's address, without a path, as the placeholder `https://api.anthropic.com` is written. The agent adds `/v1/messages` itself.
4. **API key**: the Kaeso key from step 1.
5. Choose **Test connection**, then **Save**.

```text
Endpoint URL   https://kaeso.example.com
API key        sk-kso-…
```

For **OpenAI models**, in the **OpenAI** row, do the same with your install's address and `/v1`, as OpenAI's own SDKs take it. The agent adds `/responses`. Use the same Kaeso key, or a second one if you want each family's usage apart.

```text
Endpoint URL   https://kaeso.example.com/v1
API key        sk-kso-…
```

If **Test connection** fails with a 404, the path is joined differently than you entered it: add or remove `/v1`. A 401 means the key is wrong or expired, and a 403 that it lacks inference access. If you cancel the dialog, the row's models stay on Linear credits.

New sessions use the connection of their models, including sessions a Loop starts. Sessions already running keep the provider they started with, so keep a working key in a row as long as sessions on it may resume.

## 3. Check the first session

Assign an issue to the agent and open the project's **Request logs** in Kaeso. Filter by the `linear-agent` key: every turn of the session is a request there, with its model, tokens, cost and time. Kaeso logs a request it refused too, with what it asked for, so a session that fails at once shows you why.

The log also tells you the exact model ids Linear sends. Linear picks the model under **Model**, on **Auto** unless you choose one, such as Claude Opus 5.5 or GPT-6 Sol. On **Auto**, a session may ask for a model of the other family, so connect both rows, or choose a model whose row you connected. Every id the agent asks for must be in the project's catalogue and allowed for the key; otherwise Kaeso answers 404, and the session ends. When a session fails like that, the refused request in the log names the id to add.

## 4. Route the agent's models

Linear sends a fixed model id, and Kaeso decides what serves it. An [alias](https://docs.kaeso.app/console/models-and-aliases) wins over a model of the same name, so you can create an alias named exactly as the model Linear asks for, and the list marks it **Shadows a model**. Then give it a route:

- **A fallback chain.** When Anthropic's API is overloaded or a key runs out of balance, the next step answers, such as another provider that serves the same model. Kaeso remembers a step that failed for a lasting reason and skips it on the following requests, so a long session doesn't wait on a dead provider each turn ([alias routes](https://docs.kaeso.app/concepts/alias-routes)).
- **Another provider's model.** Kaeso translates between the formats, streams and tool calls included, so the alias the agent asks for can be served by another model in the catalogue ([format translation](https://docs.kaeso.app/concepts/format-translation)). Test such a route with real issues before you rely on it: a coding agent leans on its model's tool use more than most apps.
- **A split.** Send a share of the sessions to a second model to compare them on your own issues, with the request log as the record.

Changing a route changes the next request. You don't touch Linear's settings again.

## Switch back

To leave Kaeso, set the row in **Inference** back to **Linear credits**, or replace its key. New sessions then use Linear's models; ones that started on Kaeso still need the Kaeso key to resume. To cut the agent off at once, turn the key off in Kaeso under **API keys**.

## Learn more

- [Coding tools](https://docs.kaeso.app/get-started/coding-tools): Claude Code and Codex against Kaeso on your own machine, with the same base URLs.
- [Linear cloud coding agent](https://linear.app/docs/linear-cloud-coding-agent): Linear's own documentation, with plans, billing and environments.
- [Alias routes](https://kaeso.app/articles/alias-routes): Fallbacks, conditions and splits in Kaeso's route editor.

By Kaeso Team

## More articles

- [Kaeso 0.6: one gateway for chat and media, with alias routes and an MCP portal](https://kaeso.app/articles/kaeso-0-6.md): Kaeso 0.6.0 is out. Apps make images, speech and video through the same gateway as chat, Gemini apps connect under /v1beta, aliases become routes with fallbacks and splits, and every project gets an MCP portal. Here is what changed and how to update.
- [Introducing the MCP portal](https://kaeso.app/articles/mcp-portal.md): Every Kaeso project now has an MCP portal. Connect your organization's MCP servers once, choose which tools each project offers, and let claude.ai, ChatGPT, Cursor and your own agents call them with Kaeso's sign-in, rights, limits and logs.

[See all articles](https://kaeso.app/articles.md)

## Own the gateway. Own the record

```bash
curl -fsSL https://kaeso.app/install.sh | sh
```

[Install Kaeso](https://docs.kaeso.app/self-hosting/installation) · [Open the live demo](https://demo.kaeso.app)
