aq.dev / guides / ai-coding-agents-with-your-own-keys

Running AI Coding Agents With Your Own Keys

Running AI coding agents "with your own keys" means the tool you use to run the agents does not resell model usage to you. You authenticate to the model provider directly, with your own Claude, ChatGPT, or API platform account, and you pay the provider's published price with no markup and no in-between credit unit. As of August 2026 that describes the popular agent CLIs run standalone (Claude Code, Codex CLI, and open-source tools like Aider and OpenCode), Warp's bring-your-own-key option, and AQ, where each engineer's own CLI logins are the only model billing there is. This guide covers the three ways agent tools charge for inference, why per-user accounts beat a shared org key, and how to run your own keys on shared team infrastructure.

The three ways agent tools bill for models

Every AI coding tool answers one question somewhere in its pricing page: who pays the model provider? There are only three answers.

"Your own keys" covers the first two.

Route 1: subscription logins, the default for agent CLIs

As of August 2026, Anthropic includes Claude Code in its paid Claude plans: you log in with the same Claude account you use on the web, and terminal usage draws from the same pool as your chats. Codex works the same way, and OpenAI includes it across ChatGPT plans: you sign in with your ChatGPT account.

Subscription login is the cheapest route for sustained daily use, because heavy agent sessions that would cost hundreds of dollars in metered tokens are covered by a fixed monthly price. The limits are per account: one person's plan is sized for one person, which is also the strongest argument for per-user accounts below.

Route 2: raw API keys, metered but controllable

The same CLIs also accept an API key instead of a subscription login. OpenAI documents the split explicitly for Codex as of August 2026: ChatGPT sign-in uses your plan, while API-key sign-in pays standard API pricing and is the recommended route for programmatic workflows like CI. The API route costs more per token for a heavy interactive user, but it gives you what subscriptions do not: per-key spend visibility in the provider console, budget alerts, keys scoped to a project or pipeline, and revocation of exactly one credential when a laptop is lost or a contractor rolls off.

The alternative: credit-metered platforms

Platforms that resell inference each define their own unit. All of the following is verified against vendor documentation as of August 2026:

The honest case for credits: the unit often bundles real costs beyond inference (sandboxes, orchestration, VM time), and one predictable seat price is easier to procure than "it depends on tokens." The honest case against: you cannot compare a credit to a provider's price list, the conversion can change under you, heavy users pay real markup, and new models arrive when the platform adds them, not when the provider ships them. With your own keys, all four problems disappear: the price list is public, the model catalog is the provider's, and the bill is itemized per person.

Per-user accounts vs a shared org key

Teams that adopt agent CLIs often start by putting one company API key in a shared environment file. It works for a week and then fails in predictable ways:

The fix is boring and effective: every engineer authenticates as themselves, with their own subscription login for interactive work, and automation gets its own scoped API keys. Cost attribution, rate limits, and offboarding collapse into problems the provider's own dashboard already solves.

Doing it manually on shared infrastructure

Per-user keys are trivial when everyone works on their own laptop. The friction appears when a team runs agents on a shared VM so sessions survive laptop lids (the setup covered in our self-hosted agents guide). The rule that keeps custody clean: one OS user per human, and each CLI logged in inside that user's home directory.

# One Unix account per engineer on the shared box
sudo adduser dana

# Each person logs in to their OWN CLIs inside their own home
ssh dana@dev-box
claude   # first run opens the browser login for dana's Claude account
codex    # same, for dana's ChatGPT account

# Automation uses scoped API keys, never a human's login
export OPENAI_API_KEY=sk-...   # in the CI environment only

Never commit keys or shared .env files to the repository, and give each person their own GitHub auth too, so commits and pull requests are attributable to a human rather than a bot account with a shared token. This all works with plain SSH and tmux; what it lacks is visibility (who is running what right now?) and any notion of a shared workspace, which is where a harness earns its keep.

The billing models at a glance

ApproachWho bills you for modelsUnitBest for
Subscription login (Claude Code, Codex CLI)The model providerFlat monthly plan per personDaily interactive agent work
Raw API keyThe model providerPer token, published ratesCI, automation, strict budgets
Platform credits (Devin, Replit, Warp, Cursor)The platformACUs, checkpoints, or credit poolsTeams that want one bundled bill
AQThe model provider, via each user's own CLI loginWhatever plan each engineer already hasTeams running agent CLIs together

Where AQ fits

AQ is the multiplayer coding harness where engineering teams run AI coding agents like Claude Code and Codex together: shared live terminals, a code editor, and app previews, in your own cloud. AQ is built on the first two routes and does not have a third: there is no AQ credit, no included-usage pool, and no markup on model usage, because AQ never sits in the billing path for inference at all. Agents run as the real CLIs (Claude Code, Codex, Cursor Agent, Kimi, Grok, or plain shells) in persistent tmux sessions on your team's VM, and each engineer connects those CLIs to their own Claude or OpenAI account, exactly as they would on a laptop.

The per-user rule extends past model keys: GitHub auth is per user too, so when an agent commits, pushes, and opens a PR, the work is attributable to the person who drove it, and PRs are tracked on the workspace they came from. Each workspace gets its own isolated git worktree, teammates can open the same workspace and watch the same live session (typing in someone else's terminal requires the owner to approve a control request), and sessions survive a closed laptop and resume from any device.

Pricing follows the same no-resale logic. The Free plan is the full product: you bring your own VM and pay only your cloud provider. The Team plan is $100 per user per month (promotional; standard $200, billed monthly) and includes a dedicated always-on VM managed by AQ in its own isolated network, with the rate locked for your first 12 months. In both cases the model bill stays where it started: between each engineer and their model provider.

If your requirement for a collaborative agent platform is "our own accounts, no resold inference," the honest shortlist as of August 2026 is short: a hand-rolled shared VM with per-user logins, Warp with BYOK enabled if its credit system fits the rest of your usage, or AQ, where own-keys is not a mode but the only design.

Frequently asked questions

What does bring your own keys mean for AI coding tools?

It means the tool does not resell model usage. You authenticate to the model provider yourself, either by signing the tool in to a subscription you hold (a Claude plan for Claude Code, a ChatGPT plan for Codex) or by supplying your own API key billed per token at the provider's published rates. The opposite model is platform credits, where the vendor buys inference and resells it in a unit it defines.

Is a subscription login or an API key cheaper for running coding agents?

For a human using an agent daily, the subscription is almost always cheaper: heavy sessions that would cost hundreds of dollars in metered tokens are covered by a flat monthly price. API keys win for automation and CI, where you want scoped credentials, budget alerts, and per-key spend visibility instead of a shared human login. Most teams should use both.

Can my whole team share one Claude or OpenAI account for agents?

You can, briefly, and then it fails: usage limits are sized for one person so the team hits them immediately, rate limits are shared so one long agent session starves everyone, spend cannot be attributed to anyone, and offboarding means rotating a credential everybody holds. Per-user accounts solve all four problems with the provider's own tooling.

Do credit-metered platforms mark up model usage?

Usually the unit bundles more than inference (sandbox compute, orchestration, VM time), which makes a direct comparison to provider price lists impossible, and that opacity is the real cost. Specifics vary: as of August 2026 Devin meters agent effort in ACUs, Replit prices per effort-based checkpoint, Warp meters AI, compute, and platform credits, and Cursor's on-demand usage beyond its included pool is billed at API rates with no markup.

Which collaborative AI coding platform uses my own keys?

As of August 2026: AQ, where each engineer signs the agent CLIs in with their own Claude or OpenAI account and AQ never marks up model usage; Warp, which offers bring-your-own-key on all plans (inference bills through your provider account, while platform credits still apply on some plans); and the do-it-yourself route, a shared VM where every engineer logs in to the CLIs as themselves. Single-player BYOK tools like Aider, Cline, and OpenCode also run on your key but are not collaborative platforms.