Nbility logoNbility Docs

Search documentation

Search guides and API reference content

Factory Droid CLI connects to Nbility through BYOK custom models. The current file is ~/.factory/settings.json with camelCase fields; legacy config.json and snake_case names are compatibility-only. See Factory's BYOK guide.

Install

macOS or Linux:

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

Windows PowerShell:

irm https://app.factory.ai/cli/windows | iex

Configure custom models

Set an environment variable first:

export NBILITY_API_KEY="YOUR_API_KEY"

Edit ~/.factory/settings.json:

{
  "customModels": [
    {
      "model": "gpt-5.4",
      "displayName": "GPT-5.4 via Nbility",
      "baseUrl": "https://api.nbility.ai/v1",
      "apiKey": "${NBILITY_API_KEY}",
      "provider": "openai",
      "maxOutputTokens": 16384
    },
    {
      "model": "claude-sonnet-4-6",
      "displayName": "Claude Sonnet 4.6 via Nbility",
      "baseUrl": "https://api.nbility.ai/v1",
      "apiKey": "${NBILITY_API_KEY}",
      "provider": "generic-chat-completion-api",
      "maxOutputTokens": 16384
    }
  ]
}

Choose the provider by protocol:

ProviderAPI formatUse for
openaiOpenAI ResponsesGPT-5/Codex models that require Responses
generic-chat-completion-apiOpenAI Chat CompletionsMost OpenAI-compatible models
anthropicAnthropic MessagesEndpoints explicitly using native Claude format

Do not copy arbitrary context or million-token output limits. maxOutputTokens should match the actual model; use a conservative value when uncertain.

Use and troubleshoot

Start droid, run /model, and select a Custom Model. Use Models as the source of truth for IDs.

  • Model missing: confirm the file is settings.json, the field is customModels, and restart Droid.
  • Invalid provider: use one of the current provider values above.
  • 401: make sure NBILITY_API_KEY is present in Droid's process environment.
  • 404 or empty output: ensure the provider type matches the model's protocol.

Custom models are available in Droid CLI only; they do not automatically appear in Factory's web or mobile apps.