> ## Documentation Index
> Fetch the complete documentation index at: https://copilot-api.nick3.top/llms.txt
> Use this file to discover all available pages before exploring further.

# copilot-api start — start the proxy server

> Start the Copilot API proxy server on a local port. Configure the port, account type, rate limits, and Claude Code integration from a single command.

The `start` command launches the Copilot API proxy server. It listens for incoming OpenAI-compatible and Anthropic-compatible requests, translates them into GitHub Copilot API calls, and streams responses back to your client. If you have not authenticated yet, `start` handles the GitHub OAuth device flow automatically before the server starts.

## Usage

```bash theme={null}
npx @nick3/copilot-api@latest start [options]
```

## Options

### Start command options

| Option           | Alias | Default      | Description                                                                                                                                           |
| ---------------- | ----- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--port`         | `-p`  | `4141`       | Port the proxy server listens on.                                                                                                                     |
| `--verbose`      | `-v`  | `false`      | Enable verbose logging to the console.                                                                                                                |
| `--account-type` | `-a`  | `individual` | GitHub Copilot plan: `individual`, `business`, or `enterprise`.                                                                                       |
| `--manual`       |       | `false`      | Pause each request for manual approval in the terminal before forwarding.                                                                             |
| `--rate-limit`   | `-r`  | none         | Minimum seconds between requests. Requests that arrive before the cooldown expires are rejected.                                                      |
| `--wait`         | `-w`  | `false`      | When combined with `--rate-limit`, hold requests in a queue until the cooldown expires instead of returning an error.                                 |
| `--github-token` | `-g`  | none         | Provide a GitHub token directly instead of running the interactive OAuth flow. The token must be generated via `auth add`.                            |
| `--claude-code`  | `-c`  | `false`      | After the server starts, display an interactive prompt to select models and generate a Claude Code launch command, which is copied to your clipboard. |
| `--show-token`   |       | `false`      | Print the GitHub and Copilot tokens to the console whenever they are fetched or refreshed.                                                            |
| `--proxy-env`    |       | `false`      | Initialize HTTP/HTTPS proxy settings from the `HTTP_PROXY` and `HTTPS_PROXY` environment variables.                                                   |

### Global options

Pass global options **before** the subcommand using the `--key=value` form.

| Option             | Default | Description                                                                                             |
| ------------------ | ------- | ------------------------------------------------------------------------------------------------------- |
| `--api-home`       | none    | Path to the data directory where tokens and config are stored. Sets `COPILOT_API_HOME`.                 |
| `--oauth-app`      | none    | OAuth app identifier. Use `opencode` to authenticate as the opencode app. Sets `COPILOT_API_OAUTH_APP`. |
| `--enterprise-url` | none    | GitHub Enterprise hostname (for example `company.ghe.com`). Sets `COPILOT_API_ENTERPRISE_URL`.          |

<Note>
  Global options must use `--key=value` syntax when placed before the subcommand. For example: `npx @nick3/copilot-api@latest --oauth-app=opencode start`.
</Note>

## Examples

<CodeGroup>
  ```bash Basic start theme={null}
  npx @nick3/copilot-api@latest start
  ```

  ```bash Custom port theme={null}
  npx @nick3/copilot-api@latest start --port 8080
  ```

  ```bash Business plan theme={null}
  npx @nick3/copilot-api@latest start --account-type business
  ```

  ```bash Rate limiting with wait theme={null}
  npx @nick3/copilot-api@latest start --rate-limit 30 --wait
  ```

  ```bash Launch Claude Code theme={null}
  npx @nick3/copilot-api@latest start --claude-code
  ```

  ```bash OpenCode OAuth theme={null}
  npx @nick3/copilot-api@latest --oauth-app=opencode start
  ```
</CodeGroup>

<Tip>
  If you use OpenCode, start with `--oauth-app=opencode`. This uses OpenCode's OAuth credentials rather than the default device flow, which is identical to OpenCode's built-in Copilot provider and carries no additional Terms of Service risk.
</Tip>
