Skip to main content
Droid is Factory AI’s CLI coding assistant. With BYOK, you can connect BetterToken as a custom OpenAI-compatible provider.

Prerequisites

  • BetterToken API Key (register here (https://www.bettertoken.ai/register))

Install Droid

Setup

1

Clear conflicting environment variables

2

Set the BetterToken API Key

3

Edit the Droid config file

Config file path: ~/.factory/settings.json
Replace YOUR_CODEX_MODEL_ID with a current Codex group model ID copied from the model plaza (https://www.bettertoken.ai/pricing).
4

Only configure extra headers when the official docs explicitly require them

We did not find an official Droid setup requirement that makes User-Agent mandatory for BetterToken. Start with the Base URL, API key, and model ID shown on this page.If you are also using a custom gateway, tenant routing, observability, or caching layer, add headers only according to that upstream service’s official docs.
5

Restart Droid

After updating the config file or environment variables, stop the current Droid process and launch it again.
6

Start Droid

If your version labels the provider as OpenAI Compatible instead of openai, follow the current UI label. If you need extra headers, follow the current Droid docs or your upstream gateway requirements instead of assuming User-Agent is mandatory for BetterToken.