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 | bashIDE & 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.
{
"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
/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.