Use DoGPT with Aider
Aider reaches custom OpenAI-compatible endpoints through LiteLLM. Set the endpoint and key in the shell before starting Aider.
To use Aider with DoGPT, set its base URL to https://api.dogpt.ir/v1 and its API key to the prepaid key from your DoGPT account, then select a routed model id such as cx/gpt-5.6-luna. Those values go in Shell environment, and Aider keeps working exactly as it did otherwise — the change is which endpoint it sends prompts to, not how the tool behaves. This client speaks the OpenAI-compatible format, so the endpoint keeps its /v1 suffix and the official SDKs work unchanged. Verify with aider --model openai/cx/gpt-5.6-luna: a reply proves the endpoint, key, request format and model all agree. Billing is prepaid, with no subscription and no seat fee, and your balance is pushed upstream as the spending ceiling on the key. Requests travel from Aider straight to the API host rather than through the dashboard, and usage is reconciled into your balance on a schedule.
What does pointing Aider at DoGPT change?
Aider normally sends prompts to the endpoint configured for its selected provider. This recipe changes that endpoint to https://api.dogpt.ir/v1 and supplies a prepaid DoGPT key. The tool still owns its local files, prompts, project access, and user interface.
Requests go from the tool directly to the branded API host. They do not pass through the dashboard Worker. Your wallet balance becomes upstream spending headroom, and the dashboard reconciles reported usage into the balance on regular ticks.
How do I configure Aider?
- Sign in, add credit, and create an API key. Copy the full secret when it is revealed because the dashboard stores only its prefix.
- Install the tool with
python -m pip install aider-chat. - Put the configuration below in
Shell environment, replacing the sample key with the secret you copied.
export OPENAI_API_BASE="https://api.dogpt.ir/v1"
export OPENAI_API_KEY="sk-your-dogpt-key"
aider --model openai/cx/gpt-5.6-lunaLiteLLM expects an openai/ prefix before the DevGPT model id. The resulting argument has two slashes because the routed catalog id keeps its own provider prefix.
How do I test that it works?
Run aider --model openai/cx/gpt-5.6-luna. Start with a short prompt so a configuration mistake is easy to separate from a long-running model task. A successful response proves the endpoint, key, request format, and chosen model can work together.
If the request returns 401, copy the entire reveal-once key again, including its sk- prefix. A 404 that says the endpoint is not enabled means the tool called a path outside the public allowlist. A model-not-found response means the configured id is absent from the current model directory or lost its provider prefix.
What does it cost, and what happens when credit runs out?
The API key is prepaid. There is no subscription or seat charge from DoGPT, and the public directory shows input and output prices per million tokens. Your balance can pay for a mixture of models, so changing the configured id does not require another key.
Usage appears in the dashboard after reconciliation. The balance refresh control can settle the latest reported spend immediately. When the upstream ceiling stops new work, add credit or wait for a daily cap to reset. A request already running may finish slightly past the ceiling, but the customer balance never becomes a debt.
Model availability and rates come from the upstream catalog refreshed twice an hour. Treat a copied model id as configuration, not as a permanent product promise. Check the live model directory before automating a long unattended run.
Where should the API key be stored?
Store the secret in the tool's private settings or an environment file that is excluded from version control. Do not paste it into source code, a shared issue, a screenshot, or a URL. Rotate the key from the dashboard if it is exposed; rotation invalidates the old secret while preserving the same wallet and usage history.
The public endpoint uses a Bearer header. Avoid OmniRoute examples that place a token inside an /api/v1/ path: the branded host serves only its documented /v1 surface, and a URL token is easier to leak through logs.
This configuration was probed against the live DoGPT endpoint on 2026-08-13. Tools change their own config formats, so check the tool's documentation if a setting is rejected.