You run aider because it edits files from the terminal without ceremony. The problem is the model behind it: ask a stock assistant to review a proof of concept against a host in your scope and it declines. Aider will use any OpenAI-compatible API, so swap the model. Set two environment variables, start aider with --model openai/ plus an id from the models page, and a security-tuned or uncensored build does the editing. The same ids drop into OpenCode, Cursor and Claude Code; the short version of this page is at /agents/aider.
What you need
A key from the console with credit on it, aider installed, and a repository you are allowed to work in: your own tooling, a client codebase under an engagement, or the files from a CTF challenge. Nothing else. Aider has no provider picker; it treats this API as an OpenAI endpoint at a different address.
Two environment variables do the routing. OPENAI_API_BASE is the address, OPENAI_API_KEY the credential, and the model goes on the command line behind an openai/ prefix. That prefix is the whole trick: it tells aider to send the id to the base URL rather than look it up in its built-in list.
Everything the command line takes can live in a file instead. .aider.conf.yml takes each option as a YAML key and is read from three places, your home directory, then the git root, then the directory you launched from, with the later file overriding the earlier one. --config <file> reads a single file and nothing else. A .env in the same three places carries environment variables, --env-file names one elsewhere, and every flag doubles as an AIDER_ variable (AIDER_MODEL, AIDER_OPENAI_API_BASE), which is handy in a shell profile on a testing VM.
A model aider has never heard of gets two more files: .aider.model.metadata.json for the window and the price, and .aider.model.settings.yml for the edit format and the helper models. Both are searched for in the same three directories or wherever --model-metadata-file and --model-settings-file point. Mid-session, /model, /weak-model and /editor-model swap models, and /settings shows the live configuration.
First reply in two commands
- Export the base URL and the key in the shell that will run aider. On Windows use
setxin place ofexportand open a fresh shell afterwards:
export OPENAI_API_BASE=https://api.pentestllm.ai/v1export OPENAI_API_KEY=sk-ptl-live-…- Launch aider inside the repository with the id behind
openai/. Every id on the models page goes in the same slot:
cd /to/your/projectaider --model openai/glm-5.3-uncensoredThat is enough to work. /add the handler you are reviewing and ask where the input reaches a sink, or add a proof of concept for a target in scope and ask for a line-by-line read before you run it. If you would rather see the model answer before installing anything, the home page gives a few demo turns with no account, and the playground runs the same catalog from a browser.
- Move the flags into
.aider.conf.ymlat the git root so you stop retyping them.weak-modelis the build aider uses for commit messages and for summarising old chat history; a fast id keeps those calls cheap. Drop theopenai-api-keyline if the key is already exported:
# .aider.conf.yml, in the git root (or ~ for every project)openai-api-base: https://api.pentestllm.ai/v1openai-api-key: sk-ptl-live-…model: openai/glm-5.3-uncensoredweak-model: openai/glm-5.3-flash-uncensored- On start, aider prints
Unknown context window size and costs, using sane defaultsbecause the id is not in its table. It runs anyway; it just cannot show you cost or window. Give it the figures in.aider.model.metadata.jsonbeside the config, each entry named with theopenai/prefix. The block below holds the catalog values for the three ids at the moment this page was built:
{ "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: pin edit format and helper models per id in
.aider.model.settings.yml, so they survive a/modelswitch.diffis the search/replace format, which returns changed lines and nothing else:
- 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, where the main model writes the plan; a second request hands that plan to the editor model, which produces the edit blocks. Two requests per turn, so the bill goes up, but it rescues a build that reasons well and botches the edit syntax.
/architectin the chat applies it to one message:
aider --architect --model openai/glm-5.3-uncensored --editor-model openai/deepseek-v4.1-flash-abliteratedEach setting, one line
- OPENAI_API_BASE
- https://api.pentestllm.ai/v1the address every request goes to, including the trailing /v1. In YAML it is openai-api-base; on the command line --openai-api-base
- OPENAI_API_KEY
- the whole sk-ptl- keythe bearer credential. YAML openai-api-key, flag --openai-api-key. Aider treats it as the OpenAI key, so it has to sit in this slot rather than --api-key
- --model
- openai/glm-5.3-uncensoredthe main chat model. The prefix sends the request to the base URL; what follows it must match the models page character for character
- --weak-model
- openai/glm-5.3-flash-uncensoredhandles commit messages and history summaries. Aider derives a default from the main model, which it cannot do for an id it does not know, so set it
- --architect / --editor-model
- openai/deepseek-v4.1-flash-abliteratedarchitect mode: the main model plans the change, the editor model writes the blocks. --editor-edit-format chooses 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 for each id. Kills the unknown-model warning and switches on the running cost
- .aider.model.settings.yml
- openai/<id> → edit_format…edit_format, weak_model_name, editor_model_name, use_repo_map and the other ModelSettings keys for an id aider ships no entry for
- --show-model-warnings
- true by defaultcontrols the unknown-model line. --no-show-model-warnings hides it with no metadata file, but then the cost readout stays dark
Choosing the build
Aider speaks OpenAI chat requests, and every build in the catalog answers them. Picture one edit turn late in a review session: the system prompt, the repo map (aider holds it near --map-tokens, 1k by default, and lets it swell when the chat has no files), the files you brought in with /add and the whole conversation go up; a handful of search/replace blocks come back. Input dominates the cost, which is why a build with a cheap input rate wins per turn and why /drop and /clear are the fastest way to cut the next request.
Both diff and whole are plain text, so a build with no tool calling still edits files under aider. The tool-call column is there for when you reuse the same ids in OpenCode or Cursor, whose agent loops depend on 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 a whole day of exploit development or tooling work, the uncensored coding AI guide puts the code builds next to each other with a day’s cost on each. The common pairing is a strong id as --model and a fast one as --weak-model; the metadata file is what lets aider tally the session as you go.
Prove it works
Ask the API which models your key may call. Each id you plan to put behind openai/ has to appear in this list:
curl https://api.pentestllm.ai/v1/models -H "Authorization: Bearer sk-ptl-live-…"Next, fire one request shaped like aider’s own. The -i flag shows the response headers, which carry the request id and, when the answer is not streamed, the charge in USD.
curl -i https://api.pentestllm.ai/v1/chat/completions \ -H "Authorization: Bearer sk-ptl-live-…" \ -H "Content-Type: application/json" \ -d '{"model": "glm-5.3-uncensored", "messages": [{"role": "user", "content": "Reply with the single word ok."}]}'Inside aider, the opening lines name the main model, the edit format in use and the weak model. /settings dumps the full configuration; /tokens sizes the next request file by file, useful before you add a large scan output. Send one message with a file attached, then open the console’s usage page: the request is there with its token counts and its charge.
When it breaks
401 invalid_api_key: wrong or revoked key, orOPENAI_API_KEYwas never exported in the shell that launched aider. Re-export it or paste it fresh from the console. A key underapi-key:in the YAML lands in the wrong slot; it has to beopenai-api-key:.404 model_not_found: whatever followsopenai/is not an id on the models page. Compare it character by character; the id is everything after the prefix.402 insufficient_balance: not enough credit for this request; top up in the console.402 monthly_limit_reached: the key reached the monthly cap you gave it.403 scope_denied: this key is restricted to a set of models and the one you asked for is outside it.429 rate_limited: the key is over its rate limit. Readretry-afteron the response.Unknown context window size and costs, using sane defaults: aider has no entry for the id. Not an error; it assumes a boundless window and a free model. Step 4’s metadata file fixes both, or--no-show-model-warningshides the line.- Aider offers a look-alike model name instead of starting on yours: you left off
openai/. Without the prefix aider searches its own catalog; with it, the id goes to the base URL. Failed to apply edit to <file>: the model broke the edit format. Aider’s own remedies, in order: a stronger build,--edit-format whole, architect mode so a second model handles the edits, and fewer files in the chat (/drop,/clear, with/tokensto measure). Aider’s docs mark roughly 25k tokens of context as the point where many models start to slip..aider.model.settings.ymlseems ignored:namemust be the prefixed string,openai/glm-5.3-uncensored, not the bare id.
Questions
Yes. Point OPENAI_API_BASE at the endpoint, put the key in OPENAI_API_KEY, and write the model as openai/<id>; aider sends OpenAI-format chat requests there. This API is such an endpoint, so those two variables plus the prefix are the complete setup, and the YAML keys hold the same values on disk.
Create .aider.model.metadata.json with one entry per openai/<id> carrying max_input_tokens, max_output_tokens, input_cost_per_token and output_cost_per_token. With those in place aider reports the running session cost. --no-show-model-warnings only hides the line and gives you no figures.
Begin with diff, the search/replace format: it sends back changed lines only. If a build keeps producing edits aider cannot apply, move to --edit-format whole, which returns the complete file at a higher output cost, or run --architect so a separate editor model writes the blocks.
Tokens at the model’s listed price, drawn from prepaid credit, no subscription required. The table above prices one edit-sized turn per build at the live rate; commit messages and summaries go to the weak model at its own cheaper 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.