> ## Documentation Index
> Fetch the complete documentation index at: https://docs.routeway.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Droid

> Use the Droid CLI agent with Routeway by adding a custom model to your config.

Droid is a CLI coding agent by Factory. You can connect it to Routeway by adding a custom model entry in `~/.factory/config.json` that points to Routeway's OpenAI-compatible API.

<Note>
  Requires a valid Routeway API key. Get yours from the [dashboard](https://routeway.ai/dashboard/api-keys).
</Note>

***

## Setup

<Steps>
  <Step title="Install Droid CLI">
    ```bash theme={null}
    curl -fsSL https://app.factory.ai/cli | sh
    ```
  </Step>

  <Step title="Configure Routeway as a custom model">
    Add (or merge) the following block into `~/.factory/config.json`:

    ```json theme={null}
    {
      "custom_models": [
        {
          "model_display_name": "GPT 4.1 (Routeway)",
          "model": "gpt-4.1",
          "base_url": "https://api.routeway.ai/v1/",
          "api_key": "YOUR_ROUTEWAY_API_KEY",
          "provider": "generic-chat-completion-api"
        }
      ]
    }
    ```

    <Warning>
      Keep the trailing slash on `base_url` — Droid expects it when talking to OpenAI-compatible APIs.
    </Warning>

    <Info>
      If you already have other `custom_models`, just append this object to the existing array. You can add multiple Routeway models with different IDs.
    </Info>

    Replace the `model` value with any model from [routeway.ai/models](https://routeway.ai/models).
  </Step>

  <Step title="Start Droid">
    Open a new terminal and run:

    ```bash theme={null}
    droid
    ```

    When prompted for a model, pick the display name you configured (e.g. **GPT 4.1 (Routeway)**) to route requests through Routeway.
  </Step>
</Steps>

***

## Reference

| Setting     | Value                                                   |
| ----------- | ------------------------------------------------------- |
| Config file | `~/.factory/config.json`                                |
| Base URL    | `https://api.routeway.ai/v1/` (trailing slash required) |
| Provider    | `generic-chat-completion-api`                           |

***

## Example Prompts

* *"Summarize this project and list the key entry points."*
* *"Find where feature X is implemented and explain the flow."*
* *"Run tests and fix the first failure."*
