Before you start
- Create a key on the API Keys page and add funds to your API balance.
- Choose a text model with Function calling and streaming on the Models page. Copy its exact model ID.
- Use the connection values below. Replace key placeholders locally; keep secrets out of project files and source control.
Replace
your-model-id throughout the examples with the exact ID of a text model that supports function calling and streaming. Check the Models page for current availability and limits.Install and configure
1. Install Aider
With Python 3.8–3.13 installed, run the installer. It creates a separate environment for Aider.2. Set your API key
Aider reads the compatible connection key fromOPENAI_API_KEY. Set it in the terminal used to launch Aider.
- macOS / Linux / WSL
- Windows PowerShell
3. Save your project settings
Create.aider.conf.yml in your project directory:
openai/ tells Aider to use the compatible API. Keep the full NoMask ID after that prefix. The weak and editor model settings keep summaries, commit messages and editing tasks on the same selected model.
Aider may warn that a custom model has unknown context or pricing metadata. Check its NoMask model card for the actual limits and prices. An unknown-model warning alone does not mean the connection failed.
Launch and test
Open your project and load the settings file explicitly:- Confirm the startup summary shows
openai/your-model-id. - Enter
/ask Reply with exactly NOMASK_OK.to test without editing a file. - Enter
/add nomask-test.txtand accept creating the file if asked. Then enter/code Put NOMASK_OK on the first line of nomask-test.txt. - Use
/diffto inspect the change.
aider --config .aider.conf.yml --edit-format whole with a small file. This simpler format returns the entire updated file and can use more output tokens.
If the API key is missing, check OPENAI_API_KEY in the same terminal. Keep the base URL at the API root and preserve the openai/ prefix in all three model settings.
Troubleshooting
- 401: check that your key is active and available to the process running the tool. Restart the tool after changing environment variables.
- 402: add funds to your API balance or reduce the requested output.
- 404: check the exact model ID and base URL. Direct connections use Chat Completions, not Responses or Anthropic Messages.
- 429: wait for
Retry-After. API keys share account limits; creating another key does not reset usage. Check the key’s monthly spending cap too. - Context or tool errors: start a shorter task, lower the output limit and confirm the model supports function calling. A plain text reply alone does not confirm file-editing tools work.