# Other tools

> Connect any tool that accepts a custom OpenAI or Anthropic base URL, including Aider.

Most tools need two settings: a base URL and a key.

## Set up

1. Create a key in [API keys](https://deference.si/keys).
2. Choose the provider type that matches what the tool offers.

| The tool offers                            | Base URL                  |
| ------------------------------------------ | ------------------------- |
| OpenAI, OpenAI-compatible or custom OpenAI | `https://deference.si/v1` |
| Anthropic or Anthropic-compatible          | `https://deference.si`    |

3. Paste your `sk-df-...` key as the API key. Anthropic tools may call it an auth token.
4. Enter an exact model id from the [Models](https://deference.si/models) page.
5. If the tool asks for a context window or output limit, copy them from the model's page.

If the tool lets you pick an API style, choose Chat Completions. Choose Responses only when the tool supports nothing else.

## Verify

Check the connection with curl.

```bash
curl https://deference.si/v1/key \
  -H "Authorization: Bearer $DEFERENCE_API_KEY"
```

The response names your key and shows its available credit. Send a prompt from the tool, then open [Activity](https://deference.si/activity): the request is the top row.

## Aider

Aider reads an OpenAI-compatible endpoint from `OPENAI_API_BASE` and `OPENAI_API_KEY`, and needs the `openai/` prefix on the model.

**macOS and Linux**

```bash
export OPENAI_API_BASE="https://deference.si/v1"
export OPENAI_API_KEY="$DEFERENCE_API_KEY"
aider --model openai/anthropic/claude-sonnet-5.5
```

**Windows**

```powershell
$env:OPENAI_API_BASE = "https://deference.si/v1"
$env:OPENAI_API_KEY = $env:DEFERENCE_API_KEY
aider --model openai/anthropic/claude-sonnet-5.5
```

The `openai/` prefix tells Aider to use the OpenAI-compatible path. The rest is the exact model id. Pass `--weak-model` with another full id to use a smaller model for commit messages.

## Roo Code

Choose the OpenAI Compatible provider and use the settings in [Set up](#set-up).

## Troubleshooting

| You see                     | Cause                                       | Fix                                                           |
| --------------------------- | ------------------------------------------- | ------------------------------------------------------------- |
| `404` on every call         | The base URL has a doubled or missing `/v1` | OpenAI-style tools end in `/v1`. Anthropic-style tools do not |
| `401 invalid_api_key`       | The key has spaces or quotes around it      | Paste the bare key                                            |
| `404 model_not_found`       | The tool lowercases or shortens the id      | Enter the id exactly as listed                                |
| The tool lists no models    | It reads a different path                   | Type the model id by hand                                     |
| Aider cannot find the model | The `openai/` prefix is missing             | Start with `--model openai/` followed by the model id         |
| Requests reach OpenAI       | `OPENAI_API_BASE` is not set                | Export it in the shell that runs Aider                        |
