QuotioQuotio
Integrations

CLI Integration

CLI Integration

Quotio exposes a local proxy server that simulates the OpenAI API. This allows any CLI tool compatible with the OpenAI SDK to route traffic through Quotio, enabling centralized quota management and failover.

Note: You need to generate an API key from Quotio's API Keys tab to authenticate with the proxy.

Enabling the Local Server

  1. Open the main app window and go to the Dashboard tab.
  2. If prompted, download and install the CLIProxyAPI binary.
  3. Click Start Proxy to enable the local server.
  4. Note the port number (Default: 8317) shown in the dashboard.

Configuration

The base URL for the local proxy is: http://localhost:8317/v1

Generate API Key

First, generate an API key in Quotio:

  1. Open the main app window
  2. Go to the API Keys tab
  3. Click Generate to create a new API key
  4. Copy the generated key

API Keys management interface

Environment Variables

Most CLI tools accept OPENAI_BASE_URL and OPENAI_API_KEY.

To use Quotio, export these variables in your shell profile (.zshrc or .bashrc):

export OPENAI_BASE_URL="http://localhost:8317/v1"
export OPENAI_API_KEY="your-generated-api-key-here"

Usage Example

curl

curl http://localhost:8317/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your-generated-api-key-here" \
  -d '{
    "model": "gpt-4",
    "messages": [{"role": "user", "content": "Hello via Quotio!"}]
  }'

Quotio will receive this request, select the best available Agent based on your failover rules, and forward the request to the actual provider.

Supported Endpoints

  • /v1/chat/completions (Streaming & Non-streaming)
  • /v1/models (Returns list of active Agents as models)

Next Steps

Learn how to integrate specifically with Claude Code.

Claude Code

On this page