Setup Guide

Get unityai.cloud running inside your IDE, coding tool, or AI client with the real local proxy URL, UnityAI model IDs, and compatible endpoints.

Drop-in compatible Per-key budgets Proxy auth UnityAI models

Prerequisites

Node.js 18 or newer

Required for running the setup wizard with npx.

unityai.cloud API key

Create or receive a customer API key before connecting a coding tool.

Supported coding tool

Use Codex, Claude Code, Cline, Kilo Code, OpenCode, VS Code, or a manual client.

Quick Setup

Run the UnityAI setup wizard, paste your API key, then choose the client you want to configure.

Main Command
npx -y @unityai/cloud-cli@latest
Connection Values
API origin: https://unityai.cloud
Anthropic-compatible URL: https://unityai.cloud/v1
OpenAI-compatible URL: https://unityai.cloud/api/v1
API Key: YOUR_API_KEY
Primary model: unityai-cloud
Fast model: unityai-cloud

Interactive Setup Flow

1. Start the wizard

Run the npx command from a terminal where Node.js 18 or newer is available.

2. Paste your API key

The wizard stores the key only in the client configuration selected for that machine.

3. Pick a tool

Select Codex, Claude Code, OpenCode, Cline, Kilo Code, Factory Droid, or a manual setup.

Optional Direct Tool Command
npx -y @unityai/cloud-cli@latest configure --tool codex --api-key YOUR_API_KEY

CLI Tools

Claude Code CLI

Use the wizard when possible. For a manual setup, point Claude Code at the Anthropic-compatible URL.

npx -y @unityai/cloud-cli@latest configure --tool claude --api-key YOUR_API_KEY
{
  "env": {
    "ANTHROPIC_AUTH_TOKEN": "YOUR_API_KEY",
    "ANTHROPIC_BASE_URL": "https://unityai.cloud/v1",
    "ANTHROPIC_MODEL": "unityai-cloud"
  }
}

OpenAI Codex CLI

Codex-compatible clients should use the OpenAI-style base URL and the UnityAI routing model.

npx -y @unityai/cloud-cli@latest configure --tool codex --api-key YOUR_API_KEY
OPENAI_API_KEY=YOUR_API_KEY
OPENAI_BASE_URL=https://unityai.cloud/api/v1
MODEL=unityai-cloud

OpenCode

Add UnityAI as an Anthropic-compatible provider and list the model IDs you want available.

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "unityai": {
      "npm": "@ai-sdk/anthropic",
      "name": "unityai.cloud",
      "options": {
        "baseURL": "https://unityai.cloud/v1",
        "apiKey": "YOUR_API_KEY"
      },
      "models": {
        "unityai-cloud": { "name": "UnityAI Cloud" },
        "unityai-fast": { "name": "UnityAI Fast" },
        "unityai-reasoning": { "name": "UnityAI Reasoning" }
      }
    }
  }
}

Cline

Run the wizard and choose Cline. If needed, use Anthropic-compatible mode manually.

npx -y @unityai/cloud-cli@latest configure --tool cline --api-key YOUR_API_KEY
{
  "actModeApiProvider": "anthropic",
  "planModeApiProvider": "anthropic",
  "anthropicBaseUrl": "https://unityai.cloud/v1",
  "anthropicModelId": "unityai-cloud",
  "planModeAnthropicModelId": "unityai-cloud"
}

Kilo Code

Configure Kilo with the Anthropic-compatible UnityAI endpoint and your customer key.

npx -y @unityai/cloud-cli@latest configure --tool kilo --api-key YOUR_API_KEY
{
  "anthropic": {
    "type": "api-key",
    "apiKey": "YOUR_API_KEY",
    "baseUrl": "https://unityai.cloud/v1",
    "model": "unityai-cloud"
  }
}

Factory Droid

Add a custom Anthropic-compatible model entry when Droid cannot be configured automatically.

npx -y @unityai/cloud-cli@latest configure --tool droid --api-key YOUR_API_KEY
{
  "model": "unityai-cloud",
  "id": "custom:UnityAI-0",
  "baseUrl": "https://unityai.cloud/v1",
  "apiKey": "YOUR_API_KEY",
  "displayName": "UnityAI Cloud",
  "provider": "anthropic"
}

Manual IDE Configuration

Use these fallbacks when a client is not covered by the setup wizard or when you prefer direct configuration.

VS Code

Use the Claude Code or Cline settings, then restart VS Code so the extension reloads its provider config.

Cursor

Add a compatible model with base URL https://unityai.cloud/v1 and model unityai-cloud.

Windsurf

Set the AI provider base URL to the Anthropic-compatible UnityAI endpoint.

Cline settings.json
{
  "cline.apiProvider": "anthropic",
  "cline.anthropicBaseUrl": "https://unityai.cloud/v1",
  "cline.apiKey": "YOUR_API_KEY"
}
Roo Code settings.json
{
  "roo-cline.apiProvider": "anthropic",
  "roo-cline.anthropicBaseUrl": "https://unityai.cloud/v1",
  "roo-cline.apiKey": "YOUR_API_KEY"
}
Generic OpenAI-Compatible Client
OPENAI_API_KEY=YOUR_API_KEY
OPENAI_BASE_URL=https://unityai.cloud/api/v1
MODEL=unityai-cloud

API Reference

UnityAI accepts API keys through either a custom API-key header or a bearer token. Dashboard routes use session credentials.

POST /v1/messages

Create an Anthropic-compatible message request. Streaming is available through server-sent events.

GET /v1/models

Return Anthropic-compatible model records enabled for the current key.

POST /v1/messages/count_tokens

Estimate message token usage without sending the request to an upstream model.

POST /api/auth/login

Create a dashboard session for authenticated management views.

Header Options
x-api-key: YOUR_API_KEY
# OR
Authorization: Bearer YOUR_API_KEY

Messages

Send structured conversation turns to the Anthropic-compatible endpoint. Use stream: true when your client supports SSE output.

Request
{
  "model": "unityai-cloud",
  "max_tokens": 1024,
  "messages": [
    { "role": "user", "content": "Hello, UnityAI" }
  ],
  "stream": false
}

Models Endpoint

Use the models endpoint to confirm the IDs available to your key before updating a client configuration.

Response
{
  "data": [
    { "id": "unityai-cloud", "object": "model", "display_name": "UnityAI Cloud" },
    { "id": "unityai-fast", "object": "model", "display_name": "UnityAI Fast" },
    { "id": "unityai-reasoning", "object": "model", "display_name": "UnityAI Reasoning" },
    { "id": "unityai-vision", "object": "model", "display_name": "UnityAI Vision" },
    { "id": "claude-opus-4-8", "object": "model", "display_name": "Claude Opus 4.8" },
    { "id": "gpt-5.5", "object": "model", "display_name": "GPT 5.5" },
    { "id": "gemini-3.1-pro", "object": "model", "display_name": "Gemini 3.1 Pro" },
    { "id": "deepseek-v4-pro", "object": "model", "display_name": "DeepSeek V4 Pro" },
    { "id": "qwen-3.7-plus", "object": "model", "display_name": "Qwen 3.7 Plus" }
  ]
}

Token Counting

Count projected tokens for a request before it is routed to a provider.

Request
{
  "model": "unityai-cloud",
  "messages": [
    { "role": "user", "content": "How many tokens is this?" }
  ]
}

Dashboard Auth

Dashboard sessions are created separately from API keys. Use this route for email-and-password sign-in flows.

Request
{
  "email": "YOUR_EMAIL",
  "password": "YOUR_PASSWORD"
}

Available Models

unityai-cloudPrimary auto-routing model for balanced speed, quality, and cost.
unityai-fastLow-latency route for chat helpers, UI generation, and lightweight automation.
unityai-reasoningDeeper analysis route for planning, code review, and multi-step decisions.
unityai-visionImage and document understanding path for visual workflows.
claude-opus-4-8High-reasoning route for complex analysis and long-context tasks.
gpt-5.5Advanced reasoning option for broad text, code, and agent work.
gemini-3.1-proLarge-context model path with strong vision and multimodal support.
deepseek-v4-proEfficient mixture-of-experts route for code and structured reasoning.
qwen-3.7-plusLong-context generation route with strong multilingual coverage.

Build Notes

Built-in search and vision

UnityAI routes can support web-aware and image-aware workflows without requiring every client to install separate tool servers.

One key, many clients

The same customer key can be used across compatible IDEs and API clients, subject to your workspace policy.

Restart after config changes

Most desktop tools cache provider settings, so restart the client after changing base URLs or model IDs.

Troubleshooting

Connection errors

Confirm that the client is using https://unityai.cloud and that the selected compatible path matches the client type.

Model not found

Use exact model IDs from the Available Models section. If in doubt, call the models endpoint for your account.

Rate limited

Your request window, RPM cap, or token budget may be exhausted. Wait for reset or move to a higher plan.

Changes not applying

Restart your IDE or client after editing provider configuration files.

Cursor or Windsurf is not routing

Make sure the Anthropic-compatible base URL ends with /v1 and the model is set to unityai-cloud.