# Aider setup

## Compatibility and prerequisites

This guide prepares Aider integration with U9 AI. You need an active U9 key, sufficient credit and an available model matching the endpoint. Official documentation was checked on 2026-10-24; this is not an end-to-end test of every client version or upstream model.

## Setup steps

1. Install official Aider and check the version. Set the session environment variables below.
2. Use the U9 /v1 OPENAI_API_BASE and your U9 key for OPENAI_API_KEY.
3. Replace the model placeholder with the U9 ID and retain the openai/ provider prefix.
4. Test short chat and a small edit in a temporary project before using the setup on a real project.

## Configuration values

| Setting | Value |
| --- | --- |
| OPENAI_API_BASE | https://u9ai.ai/v1 |
| API Key | YOUR_U9AI_API_KEY · U9 API key |
| Model | YOUR_CHAT_MODEL_ID · Available model ID |
| Expected chat endpoint | https://u9ai.ai/v1/chat/completions |

```bash
export OPENAI_API_BASE="https://u9ai.ai/v1"
export OPENAI_API_KEY="YOUR_U9AI_API_KEY"
aider --model openai/YOUR_CHAT_MODEL_ID
```

```powershell
$env:OPENAI_API_BASE = "https://u9ai.ai/v1"
$env:OPENAI_API_KEY = "YOUR_U9AI_API_KEY"
aider --model openai/YOUR_CHAT_MODEL_ID
```

## Important differences

Unknown models may require real context and price metadata. Additional weak/editor/architect models need their own availability checks.

## Acceptance and handoff

First follow [quickstart](/en/docs/quickstart) to check GET /v1/models without generating content. Then test a short non-streaming request, streaming and any required tool-call round trip separately. Generation tests may incur charges. Record the request ID and verify [cost analysis](/en/docs/billing). For failures, include client version, model ID, endpoint, status and sanitized errors in a [ticket](/en/support). Do not blindly resubmit timed-out jobs.

Give this Markdown file to your developer or agent. Ask it to preserve current settings, substitute only available model IDs and report untested capabilities. Never put real keys in shared Markdown.

## Official reference

[Aider](https://aider.chat/docs/llms/openai-compat.html)
