AgentRouter

Using AgentRouter with Droid CLI

Complete guide to set up Droid CLI with AgentRouter API

Using AgentRouter with Droid CLI

This guide will help you configure Droid CLI (Factory.ai's coding assistant) to use AgentRouter as your API provider.

Install Droid CLI

curl -fsSL https://app.factory.ai/cli | sh
irm https://app.factory.ai/cli/windows | iex

Configure Custom Model

Edit the configuration file ~/.factory/config.json with the following content:

{
  "custom_models": [
    {
      "model_display_name": "agentrouter-gpt5",
      "model": "gpt-5",
      "base_url": "https://agentrouter.org/v1",
      "api_key": "YOUR_AGENT_ROUTER_KEY",
      "provider": "generic-chat-completion-api",
      "max_tokens": 1280000
    }
  ]
}

Important

Replace YOUR_AGENT_ROUTER_KEY with your actual API key from AgentRouter Console.

Launch and Use

After configuration:

  1. Open a terminal and run droid
  2. In the interface, type /model
  3. Select Custom Modelagentrouter-gpt5
  4. Start coding with AI assistance!

Available Models

You can add multiple custom models to your configuration:

{
  "custom_models": [
    {
      "model_display_name": "agentrouter-gpt5",
      "model": "gpt-5",
      "base_url": "https://agentrouter.org/v1",
      "api_key": "YOUR_AGENT_ROUTER_KEY",
      "provider": "generic-chat-completion-api",
      "max_tokens": 1280000
    },
    {
      "model_display_name": "agentrouter-deepseek",
      "model": "deepseek-v3.1",
      "base_url": "https://agentrouter.org/v1",
      "api_key": "YOUR_AGENT_ROUTER_KEY",
      "provider": "generic-chat-completion-api",
      "max_tokens": 1280000
    }
  ]
}
ModelDescription
gpt-5Latest GPT model
deepseek-v3.1DeepSeek V3.1 model
deepseek-v3.2DeepSeek V3.2 model
glm-4.5GLM 4.5 model
glm-4.6GLM 4.6 model
Ctrl+I
AgentRouter AI
English

How can I help?

Ask me about configuration, installation, or specific features.