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.
npx lightningdealsWhat it does
- 01Asks for your API key
- 02Lets you choose which clients to configure
- 03Writes the correct settings for each one
- 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:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
irm https://lightningapi.pro/setup.ps1 | iexmacOS and Linux
The shell equivalent:
curl -fsSL https://lightningapi.pro/setup.sh | bashClaude Code CLI
Point the Claude Code CLI at LightningDeals and every model in the lineup becomes selectable from the same session.
Automatic — recommended
Run npx lightningdeals and select Claude Code CLI.
Manual configuration
Create or edit ~/.claude/settings.json:
{
"env": {
"ANTHROPIC_AUTH_TOKEN": "YOUR_API_KEY",
"ANTHROPIC_BASE_URL": "https://lightningapi.pro",
"ANTHROPIC_MODEL": "claude-fable-5[1m]",
"ANTHROPIC_SMALL_FAST_MODEL": "claude-haiku-4-5-20251001",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-5",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4-8[1m]",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-4-5-20251001",
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
},
"hasCompletedOnboarding": true
}Replace YOUR_API_KEY with your actual key. The [1m] suffix asks for the 1M-token context tier — drop it to use the model's standard window.
VS Code
The VS Code Claude extension reads the same configuration as the CLI.
Automatic — recommended
Run npx lightningdeals and select VS Code.
Manual configuration
Same file as Claude Code CLI above. Restart VS Code once you have saved it.
Cursor
Route Cursor's AI features through LightningDeals.
Automatic — recommended
Run npx lightningdeals and select Cursor.
API routing
Open Settings → Models → add a Claude-compatible model with:
- Base URL:
https://lightningapi.pro/v1 - API key: your LightningDeals key
- Model:
claude-sonnet-5
Windsurf
Route Windsurf's AI provider through LightningDeals.
Automatic — recommended
Run npx lightningdeals and select Windsurf.
API routing
Open Settings → AI Provider → set the base URL to:
https://lightningapi.pro/v1Cline
Configure the Cline VS Code extension to use LightningDeals.
Automatic — recommended
Run npx lightningdeals and select Cline.
Manual configuration
Add to your VS Code settings.json:
{
"cline.apiProvider": "anthropic",
"cline.anthropicBaseUrl": "https://lightningapi.pro",
"cline.apiKey": "YOUR_API_KEY"
}Roo Code
Configure the Roo Code VS Code extension to use LightningDeals.
Automatic — recommended
Run npx lightningdeals and select Roo Code.
Manual configuration
Add to your VS Code settings.json:
{
"roo-cline.apiProvider": "anthropic",
"roo-cline.anthropicBaseUrl": "https://lightningapi.pro",
"roo-cline.apiKey": "YOUR_API_KEY"
}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
/v1/messagesAPI keyPrimary Anthropic-compatible message completion endpoint.
API Reference — Models
/v1/modelsAPI keyReturns 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
/v1/messages/count_tokensCalculates input token count before sending full completions.
API Reference — Key status
/api/key-statusReturns token balance, expiration date, and status for any assigned API key.
Web search
/tools/web_searchAPI keySearch the web for current information. Three to five keywords works best.
Image analysis
/tools/understand_imageAPI keyAnalyse 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.
Live web results for up-to-date information. Available automatically in every connected client.
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-51Mclaude-opus-51Mclaude-sonnet-51Mclaude-opus-4-81Mclaude-opus-4-71Mclaude-opus-4-61Mclaude-sonnet-4-61Mclaude-opus-4-5200Kclaude-sonnet-4-5-20250929200Kclaude-haiku-4-5-20251001200Kclaude-opus-4-1-20250805200Kclaude-opus-4-20250514200Kclaude-sonnet-4-20250514200KContext 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.