---
title: "CLI · Docs · rawroute"
canonical: "https://rawroute.dev/docs/cli"
lang: "en"
last_verified: "2026-11-28"
description: "Detect your SDK, measure latency and inspect models from the terminal."
---
# CLI

Detect your SDK, measure latency and inspect models from the terminal.

- Base URL: `https://api.rawroute.dev/v1`
- Auth: `Authorization: Bearer $RAWROUTE_API_KEY` (`x-api-key` for Anthropic, `x-goog-api-key` for Gemini)
- Sections (Start / API / In production / Ecosystem):
- [Quickstart](https://rawroute.dev/docs)
- [Authentication](https://rawroute.dev/docs/auth)
- [Model IDs](https://rawroute.dev/docs/models)
- [Chat Completions](https://rawroute.dev/docs/chat)
- [Images](https://rawroute.dev/docs/images)
- [Video](https://rawroute.dev/docs/video)
- [Voice & Audio](https://rawroute.dev/docs/audio)
- [Endpoints](https://rawroute.dev/docs/endpoints)
- [Errors](https://rawroute.dev/docs/errors)
- [Billing](https://rawroute.dev/docs/billing)
- [n8n / Make](https://rawroute.dev/docs/automation)
- [CLI](https://rawroute.dev/docs/cli)
- [MCP Server](https://rawroute.dev/docs/mcp)
- [AI SDK & Presets](https://rawroute.dev/docs/integrations)
- [Starter Repos](https://rawroute.dev/docs/starters)

## CLI Commands (`rawroute`)
- Install: `npm install -g https://rawroute.dev/downloads/rawroute-cli.tgz`.
- `rawroute init [--mcp] [--verify]`: detect SDKs & `.env`/`.env.local`, configure `RAWROUTE_API_KEY` + `RAWROUTE_BASE_URL`, optionally wire IDE MCP config.
- `rawroute ping [--all]`: measure HTTP RTT (`min`/`avg`/`p95`) and streaming SSE TTFT + tok/s.
- `rawroute balance`: check remaining USD balance, spend limit and usage.
- `rawroute models [model-id]`: inspect catalog prices, cached/long-context rates, specs and endpoints.
- `rawroute doctor`: verify Node, `.env`, `.gitignore`, gateway reachability, auth and balance.
