Documentation

Setup guide

Everything you need to point a client at LightningDeals: install, configure your IDE, and call the API. If you already have a key, the whole thing takes about a minute.

Drop-in compatible

No SDK changes

Permanent Prepaid Balance

No Expiry Reset

Built-in tools

Search and image analysis

13 models

One base URL

Prerequisites

Node.js 18 or newer — Download from nodejs.org

A LightningDeals API key — Issued by your admin or reseller

A supported client — Claude Code, VS Code, Cursor, Windsurf, Cline, or Roo Code

Quick install

The fastest path. The wizard asks for your key, configures the clients you pick, and verifies the connection before it exits.

terminal
npx lightningdeals

What it does

  1. 01Asks for your API key
  2. 02Lets you choose which clients to configure
  3. 03Writes the correct settings for each one
  4. 04Verifies the connection

Web search and image analysis need no setup at all — they run server-side.

Windows — PowerShell

If you would rather run the setup script directly:

powershell (administrator)
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
irm https://lightningapi.pro/setup.ps1 | iex

macOS and Linux

The shell equivalent:

terminal
curl -fsSL https://lightningapi.pro/setup.sh | bash

IDE & Developer Tool Integrations

Select your primary IDE to view automatic and manual configuration steps.

Claude Code CLI Setup

Point Claude Code CLI at LightningDeals for drop-in 1M context token access.

~/.claude/settings.json
{
  "env": {
    "ANTHROPIC_AUTH_TOKEN": "YOUR_API_KEY",
    "ANTHROPIC_BASE_URL": "https://lightningapi.pro",
    "ANTHROPIC_MODEL": "claude-sonnet-5"
  }
}

API Reference — Authentication

All requests to the LightningDeals Gateway require a valid assigned API key passed in the x-api-key or Authorization: Bearer HTTP headers.

API Reference — Messages

POST/v1/messagesAPI key

Primary Anthropic-compatible message completion endpoint.

API Reference — Models

GET/v1/modelsAPI key

Returns active LLM model catalog supported by LightningDeals.

API Reference — 5-Hour Rolling Token Window & First-Request Activation

Every LightningDeals API key operates on an automated 5-hour rolling token allowance system. Your full token quota (e.g. 20M tokens for Claude Max 20x) automatically refreshes every 5 hours for the validity duration of your plan.

⚡ First-Request Activation Rule:

Your 5-hour usage window begins when your API key makes its first successful API request. Before that, the window remains inactive (Window Inactive — Starts on 1st API request). Creating a key in the admin panel does not start the timer.

API Reference — Token counting

POST/v1/messages/count_tokens

Calculates input token count before sending full completions.

API Reference — Key status

GET/api/key-status

Returns token balance, expiration date, and status for any assigned API key.

Image analysis

POST/tools/understand_imageAPI key

Analyse an image. Accepts an HTTP URL, a local path, or a base64 data URL. 18MB maximum.

Built-in tools

Both tools run server-side. There is nothing to install on your machine and no MCP server to configure.

Web search

Live web results for up-to-date information. Available automatically in every connected client.

Image analysis

Understands JPEG, PNG and WebP. Works out of the box with no extra configuration.

Available models

Every model below answers on the same key and the same base URL. Pass the ID exactly as written.

Claude Fable 5Newclaude-fable-51M
Claude Opus 5Newclaude-opus-51M
Claude Sonnet 5Newclaude-sonnet-51M
Claude Opus 4.8claude-opus-4-81M
Claude Opus 4.7claude-opus-4-71M
Claude Opus 4.6claude-opus-4-61M
Claude Sonnet 4.6claude-sonnet-4-61M
Claude Opus 4.5claude-opus-4-5200K
Claude Sonnet 4.5claude-sonnet-4-5-20250929200K
Claude Haiku 4.5claude-haiku-4-5-20251001200K
Claude Opus 4.1claude-opus-4-1-20250805200K
Claude Opus 4claude-opus-4-20250514200K
Claude Sonnet 4claude-sonnet-4-20250514200K

Context tier. Append [1m] to a model ID — e.g. claude-opus-4-8[1m] — to request the 1M-token window.

Troubleshooting

Connection errors

Check the key is active and has remaining balance — the Check a key page tells you in one look.

Web search or image tools not responding

They are server-side, so there is nothing local to fix. Confirm the key is valid and retry.

Model not found

Use an exact ID from the models list above. Display names are not accepted, only IDs and family aliases.

Rate limited

Your allocated RPM rate limit has been reached. Slow down requests or upgrade your tier.