File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44# Place in your home dir, or at the root of your git repo.
55# #########################################################
66
7- # Note: You can only put OpenAI and Anthropic API keys in the YAML
8- # config file. Keys for all APIs can be stored in a .env file
9- # https://aider.chat/docs/config/dotenv.html
10-
117# #########
128# options:
139
2925# # Specify the Anthropic API key
3026# anthropic-api-key: xxx
3127
28+ # # Specify API key for other providers (eg: --api-key provider=<key> sets PROVIDER_API_KEY=<key>)
29+ # api-key:
30+ # - openrouter=sk-or-v1-42424242
31+ # - deepseek=sk-42424242
32+ # - ...
33+
3234# # Specify the api base url
3335# openai-api-base: xxx
3436
5254# - yyy
5355# - zzz
5456
55- # # Set an API key for a provider (eg: --api-key provider=<key> sets PROVIDER_API_KEY=<key>)
56- # api-key: xxx
57- # # Specify multiple values like this:
58- # api-key:
59- # - xxx
60- # - yyy
61- # - zzz
62-
6357# ################
6458# Model settings:
6559
Original file line number Diff line number Diff line change @@ -19,6 +19,13 @@ export OPENROUTER_API_KEY=<key> # Mac/Linux
1919setx OPENROUTER_API_KEY <key> # Windows, restart shell after setx
2020```
2121
22+ Alternatively, you may set the API key in the config file ~ /.aider.conf.yml , just add the line:
23+
24+ ```
25+ api-key: openrouter=sk-...
26+ ```
27+
28+
2229Start working with aider and OpenRouter on your codebase:
2330
2431``` bash
Original file line number Diff line number Diff line change @@ -52,12 +52,12 @@ on the existing information in their contexts.
5252
5353If your code is throwing an error,
5454use the [ ` /run ` command] ( commands.html )
55- to share the error output with the aider.
56- Or just paste the errors into the chat. Let the aider figure out how to fix the bug.
55+ to share the error output with aider.
56+ Or just paste the errors into the chat. Let aider figure out how to fix the bug.
5757
5858If test are failing, use the [ ` /test ` command] ( lint-test.html )
5959to run tests and
60- share the error output with the aider.
60+ share the error output with aider.
6161
6262## Providing docs
6363
You can’t perform that action at this time.
0 commit comments