Goal: configure Zed with a personal OpenRouter key while keeping payment, credentials, and model selection explicit.
Prerequisites:
- the passport's manual Git mission or the current First safe pull request completed;
- Agents and interfaces understood;
- willingness to own and pay for a personal third-party account;
- only fictional training content for the initial test.
Execution context: OpenRouter in your browser and Zed on your local computer. This route is optional and is not required for the passport.
Personal Accounts And Financial Responsibility#
Any personal OpenRouter or other third-party AI account you create is owned and administered by you. Unless you receive explicit written approval before incurring the expense, IDEAL Lab does not provide credits, pay subscription or usage fees, reimburse expenses, administer personal accounts, or recover unused credits.
You are responsible for:
- all usage and charges associated with your account and API keys;
- monitoring prices, credit balances, and usage;
- securing, rotating, and revoking your API keys;
- disabling automatic credit purchases or auto-recharge;
- charges caused by accidental agent loops, background activity, exposed credentials, or unauthorized use;
- transaction fees, taxes, currency conversion, expiring credits, and changes to third-party prices or terms.
Spending limits reduce risk but do not replace monitoring. To the extent permitted by applicable law, IDEAL Lab accepts no responsibility for charges, lost credits, account restrictions, or other financial loss arising from a personal third-party account.
You do not need to purchase OpenRouter credits to complete onboarding. Use the recommended Copilot Student route or complete the manual workflow instead.
1. Create A Bounded Personal Key#
- Create or sign into your personal OpenRouter account.
- Review current model prices, credit fees, refund rules, and data policies.
- Keep auto-recharge disabled.
- Purchase only the smallest amount you are prepared to lose.
- Open the OpenRouter Keys page and create one key dedicated to this
exercise, such as
zed-onboarding. - Set a low spending limit and an expiration date if the current interface offers them.
- Copy the key only when Zed is ready. OpenRouter displays plaintext keys only at creation time.
Do not put the key in Git, .env.example, documentation, screenshots, prompts,
Slack, ordinary email, or terminal history.
2. Store The Key In Zed#
- Install Zed from its official site and open the fictional training folder
assigned by your passport. If you are following the current workbook before
generated-passport cutover, use its assigned
FirstStepsfolder. - Open Settings -> AI -> LLM Providers. The command palette action is agent: open settings.
- Find OpenRouter and enter the dedicated key through the UI.
- Select an explicit current model after checking its price and data policy. Do not use automatic routing for the first cost-controlled exercise.
- Close and reopen the Agent Panel if the provider list does not refresh.
Keys entered through this UI are stored in the operating-system keychain rather
than settings.json. A non-empty OPENROUTER_API_KEY environment variable in
the local Zed process overrides the keychain value.
External agents and terminal threads may have separate model configuration. This procedure configures Zed-owned AI features; it does not silently configure every agent installed in Zed.
3. Verify With Fictional Training Content#
Start a new Zed Agent session in the assigned fictional training repository:
Inspect this fictional training repository without editing or running commands.
Name the source file, declared checks, and current Git branch. State which model
and gateway this session is configured to use.
Then verify in Zed's local terminal:
git status --short --branch
Review OpenRouter's Activity and Keys pages immediately after the request. Record the model, request cost, key usage, and remaining key allowance for yourself; do not publish the API key.
Verification#
- Zed identifies OpenRouter and the intended explicit model.
- The request uses only the assigned fictional training content.
git statusshows no unexpected edit.- The request appears under the dedicated key in OpenRouter activity.
- Auto-recharge remains disabled and the key has a low limit.
Common Failures And Safe Recovery#
- Zed keeps using an old key: check whether
OPENROUTER_API_KEYwas set in the environment that launched Zed. Remove it from that environment, restart Zed, and use the keychain entry. 401or authentication failure: remove the Zed keychain entry, revoke the suspect key in OpenRouter, create a replacement with the same low limit, and enter it once through the UI.- Budget or payment error: stop requests and inspect OpenRouter usage. Do not enable auto-recharge to make the error disappear.
- Model unavailable: recheck the exact current model identifier and provider policy; do not switch to a more expensive model without reading its price.
- Unexpected rapid spending: stop the agent, revoke the key immediately, inspect activity, and contact OpenRouter about suspected unauthorized use.
- The key enters Git or chat: revoke it immediately and follow the incident procedure.
Understand Before Accepting AI Output#
- This is my personal paid account, not an IDEAL Lab-funded account.
- I disabled auto-recharge and set a low key limit.
- I know the model, gateway, Zed harness/interface, and billing account.
- I know that a keychain protects storage but not unsafe agent actions.
- I will monitor activity and revoke a suspicious key immediately.
Ask For Help When#
The service requests payment you did not intend, the model/provider data policy is unclear, Zed appears to use the wrong credential, or account activity does not match your requests. Do not send the key when asking for help.
Primary Sources#
- Zed gateway configuration
- Zed API-key storage and precedence
- OpenRouter key limits
- OpenRouter pricing
- OpenRouter terms
- OpenRouter provider logging
Verified: 2026-08-26. Review by: 2026-11-26. Owner: lab software maintainer with the project's information owner.