Aider takes an OpenAI-compatible API through two environment variables and a model prefix. Set the base URL and the key, start it with --model openai/ and an id from the models page, and an uncensored build edits files in the terminal. The same ids work in OpenCode, Cursor and, through a router, in Claude Code.
Where the settings are
Aider has no provider menu. It reads the OpenAI base URL and key from two environment variables, OPENAI_API_BASE and OPENAI_API_KEY, and takes the model on the command line with an openai/ prefix. That is the whole of the OpenAI-compatible setup in aider’s docs.
The same values go in files. .aider.conf.yml holds any command-line option as a YAML key; aider loads it from your home directory, the root of the git repo and the current directory, in that order, and the file loaded last wins. --config <file> loads one file only. A .env file in the same three places takes environment variables, with --env-file for one somewhere else. Every flag also has an AIDER_ environment variable, so AIDER_MODEL and AIDER_OPENAI_API_BASE work from a shell profile.
Two more files describe a model aider does not know: .aider.model.metadata.json (context window and cost) and .aider.model.settings.yml (edit format, weak model, repo map). Aider looks for both in the same three places, or where --model-metadata-file and --model-settings-file point. Inside the chat, /model, /weak-model and /editor-model switch models for the session, and /settings prints what is in effect.
Steps
- Create a key in the console. In the shell that will run aider, set the base URL and the key (Windows:
setxinstead ofexport, then open a new shell):
export OPENAI_API_BASE=https://api.uncensoredllm.ai/v1export OPENAI_API_KEY=sk-ullm-live-…- Start aider in the project with the model id behind
openai/. Any id on the models page works the same way:
cd /to/your/projectaider --model openai/glm-5.3-uncensored- To stop typing the flags, put them in
.aider.conf.ymlat the git root.weak-modelis the model aider uses for commit messages and chat history summaries; a fast build keeps that cost small. Leave theopenai-api-keyline out if the key stays in the environment:
# .aider.conf.yml, in the git root (or ~ for every project)openai-api-base: https://api.uncensoredllm.ai/v1openai-api-key: sk-ullm-live-…model: openai/glm-5.3-uncensoredweak-model: openai/glm-5.3-flash-uncensored- At start, aider prints
Unknown context window size and costs, using sane defaultsfor a model it has no record of. It still works; it just cannot count cost or window. To end the line and get the figures, add.aider.model.metadata.jsonnext to the config, with the names carrying the sameopenai/prefix. The values below are the catalog’s own for the three ids, read when this page rendered:
{ "openai/glm-5.3-uncensored": { "input_cost_per_token": 0.000000282, "output_cost_per_token": 0.000000846, "litellm_provider": "openai", "mode": "chat" }, "openai/glm-5.3-flash-uncensored": { "input_cost_per_token": 0.00000010528, "output_cost_per_token": 0.00000036848, "litellm_provider": "openai", "mode": "chat" }, "openai/deepseek-v4.1-flash-abliterated": { "input_cost_per_token": 0.00000084875, "output_cost_per_token": 0.0000016975, "litellm_provider": "openai", "mode": "chat" }}- Optional:
.aider.model.settings.ymlfixes the edit format and the helper models per id, so a/modelswitch mid-session keeps them.diffis the search/replace format that returns only the changed lines:
- name: openai/glm-5.3-uncensored edit_format: diff weak_model_name: openai/glm-5.3-flash-uncensored editor_model_name: openai/deepseek-v4.1-flash-abliterated editor_edit_format: editor-diff use_repo_map: true- name: openai/glm-5.3-flash-uncensored edit_format: diff use_repo_map: true- name: openai/deepseek-v4.1-flash-abliterated edit_format: diff use_repo_map: true- Optional: architect mode. The main model proposes the change and a second request turns it into edits with the editor model. Two requests per turn, so it costs more, and it helps when a build plans well but fumbles the edit blocks.
/architectin the chat does the same for one message:
aider --architect --model openai/glm-5.3-uncensored --editor-model openai/deepseek-v4.1-flash-abliteratedWhat each setting does
- OPENAI_API_BASE
- https://api.uncensoredllm.ai/v1where aider sends every request; the /v1 at the end matters. openai-api-base in the YAML, --openai-api-base on the command line
- OPENAI_API_KEY
- the whole sk-ullm- keythe credential on each request. openai-api-key in the YAML, --openai-api-key on the command line; aider sends it as the OpenAI key, which is why this slot and not --api-key
- --model
- openai/glm-5.3-uncensoredthe main chat model: the prefix routes the id to the base URL above; the id after it is exactly as the models page spells it
- --weak-model
- openai/glm-5.3-flash-uncensoredthe model for commit messages and chat history summaries; defaults from the main model, which aider cannot do for an id it does not know
- --architect / --editor-model
- openai/deepseek-v4.1-flash-abliteratedarchitect mode splits a turn: the main model plans, the editor model writes the edit blocks; --editor-edit-format picks editor-diff or editor-whole
- .aider.model.metadata.json
- openai/<id> → window and costmax_input_tokens, max_output_tokens, input_cost_per_token and output_cost_per_token per id; ends the unknown-model line and turns on the cost readout
- .aider.model.settings.yml
- openai/<id> → edit_format…edit_format, weak_model_name, editor_model_name, use_repo_map and the rest of ModelSettings for an id aider has no built-in entry for
- --show-model-warnings
- true by defaultprints the unknown-model line; --no-show-model-warnings silences it without a metadata file, and the cost readout stays off
Picking a model
Aider sends OpenAI-format chat requests, and every build on the models page answers in that format. An edit turn carries the system prompt, the repo map (aider sizes it to about --map-tokens, 1k by default, and lets it grow when no files are in the chat), the files you added with /add and the conversation so far; the answer is a few search/replace blocks. Input tokens are most of the bill, so a build with a low input price costs the least per turn, and /drop and /clear cut the next turn’s cost directly.
Aider’s diff and whole formats are plain text, so a build that takes no tool calls still edits files. The last column matters when the same ids go into OpenCode or Cursor, whose agent loops need tool calls.
| Model | One edit turn | Tool calls |
|---|---|---|
| GLM-5.3 Uncensored | $0.01 | model page |
| GLM-5.3 Flash Uncensored | $0.0047 | model page |
| DeepSeek V4.1 Flash Abliterated | $0.04 | model page |
| DeepSeek V4 Pro Uncensored | $0.04 | model page |
| GLM-5.3 Abliterated | $0.09 | model page |
| GLM-5.3 Flash Code Uncensored | $0.25 | model page |
| GLM-5.3 Uncensored | Uncensored | $0.282 | $0.846 |
| GLM-5.3 Flash Uncensored | Uncensored | $0.1053 | $0.3685 |
| DeepSeek V4.1 Flash Abliterated | Abliterated | $0.8488 | $1.6975 |
| DeepSeek V4 Pro Uncensored | Uncensored | $0.97 | $1.94 |
| GLM-5.3 Abliterated | Abliterated | $2.1825 | $4.365 |
| GLM-5.3 Flash Code Uncensored | Uncensored | $6.00 | $6.00 |
For coding specifically, the uncensored coding AI guide compares the code builds and costs a full coding day on each. A strong build as --model and a fast one as --weak-model is the usual pair; the metadata file is what lets aider count the cost of the session.
Check it
List the models your key can call; every id you put behind openai/ should be in the answer:
curl https://api.uncensoredllm.ai/v1/models -H "Authorization: Bearer sk-ullm-live-…"Then send one request the way aider does. -i prints the headers: x-uplink-request-id names the request, and on a non-streamed answer x-uplink-charge is what it cost in USD.
curl -i https://api.uncensoredllm.ai/v1/chat/completions \ -H "Authorization: Bearer sk-ullm-live-…" \ -H "Content-Type: application/json" \ -d '{"model": "glm-5.3-uncensored", "messages": [{"role": "user", "content": "Reply with the single word ok."}]}'In aider, the announce lines at start name the main model, its edit format and the weak model; /settings prints the full configuration and /tokens the size of the next request, file by file. Send one message with a file added. The request shows on the console’s usage page with its tokens and its charge.
Errors and fixes
401 invalid_api_key: the key is wrong or revoked, orOPENAI_API_KEYis not set in the shell that started aider. Export it again, or copy the key again from the console. A key underapi-key:in the YAML does not reach this slot; useopenai-api-key:.404 model_not_found: the id afteropenai/is not on the models page. Check the spelling against the page; the id is the whole string after the prefix.402 insufficient_balance: the balance does not cover the request. Top up in the console.402 monthly_limit_reachedmeans the key hit the monthly spend limit you set on it.403 scope_denied: the key is limited to certain models and this is not one of them.429 rate_limited: the key hit its rate limit. The response carriesretry-after.Unknown context window size and costs, using sane defaults: aider has no record of the id. Not a failure; aider assumes an unlimited window and a free model. The metadata file in step 4 supplies both, or--no-show-model-warningsdrops the line.- Aider suggests a similarly named model instead of starting with yours: the
openai/prefix is missing. The prefix is what sends the id to the base URL; without it aider looks the name up in its own list. Failed to apply edit to <file>: the model did not follow the edit format. Aider’s own fixes, in order: a stronger build,--edit-format whole, architect mode with a second model on the edits, fewer files in the chat (/drop,/clear, and/tokensto see the size). Aider’s docs put the point where most models start slipping at about 25k tokens of context.- Settings from
.aider.model.settings.ymlnot applied: thenamehas to be the full string with the prefix,openai/glm-5.3-uncensored, not the bare id.
Questions
Yes. Aider sends OpenAI-format chat requests to OPENAI_API_BASE with OPENAI_API_KEY and routes any model written as openai/<id> there. This API is one such endpoint, so the two variables and the prefix are the whole setup; the YAML keys are the same values in a file.
Add .aider.model.metadata.json with an entry per openai/<id>: max_input_tokens, max_output_tokens, input_cost_per_token and output_cost_per_token. Aider then shows the session cost as it goes. --no-show-model-warnings hides the line without the figures.
Start with diff, the search/replace format that returns only the changed lines. If a build keeps failing to apply edits, switch to --edit-format whole, which returns the full file and costs more output tokens, or run --architect so a second model writes the edit blocks.
Per token at the model’s price, from your prepaid balance, with no subscription. The table above costs one edit-sized turn on each build at the live price; the weak model takes the commit messages and summaries at its own, lower rate. See the models page.
Every model above is on the uncensored model list with its live price per million tokens. Per-token pricing sets the whole catalog side by side, and the family directory groups the builds by base model.