Overview #
One endpoint, four actions, in the SMM Panel API v2 format your panel already speaks.
- HTTP method
- POST or GET
- API URL
- https://api.lightningmedia.in/v2/
- API key
- Get an API key from the Lightning Media bot
- Response
- JSON, always HTTP 200
Authentication #
Send your key as the key parameter on every request — form-encoded, JSON, or a query string. There are no headers to set.
Prefer
POST, so your key stays out of URLs and browser history. If a key leaks, regenerate it in the bot; that revokes every key you hold and issues a new one.balance #
Your current prepaid balance. Most panels call this first when you add a provider.
Request
POST /v2/ · balance
import requests resp = requests.post("https://api.lightningmedia.in/v2/", data={ "key": "YOUR_API_KEY", "action": "balance", }) print(resp.json())
Response
Response
{"balance": "100.00", "currency": "USD"}Response fields
| Field | Type | Meaning |
|---|---|---|
| balance | string | Your balance in USD, to between two and six decimal places |
services #
The services you can order, with your price per 1000.
Request
POST /v2/ · services
import requests resp = requests.post("https://api.lightningmedia.in/v2/", data={ "key": "YOUR_API_KEY", "action": "services", }) print(resp.json())
Response
Response
[
{
"service": "100",
"name": "Telegram Post Views",
"type": "Default",
"category": "Telegram",
"rate": "0.01",
"min": "100",
"max": "40000",
"refill": false,
"cancel": false
}
]Response fields
| Field | Type | Meaning |
|---|---|---|
| service | string | Service ID to pass to add |
| name | string | Display name |
| type | string | Service type, "Default" |
| category | string | Grouping, "Telegram" |
| rate | string | Your price in USD per 1000 |
| min | string | Smallest quantity you can order |
| max | string | Largest quantity you can order |
| refill | boolean | Always false; refill isn't supported |
| cancel | boolean | Always false; cancel isn't supported |
service, rate, min and max are strings, not numbers. Parse them before comparing.add #
Place an order. Your balance is charged and the order ID comes back immediately; fulfilment starts in the background.
Request
POST /v2/ · add
import requests resp = requests.post("https://api.lightningmedia.in/v2/", data={ "key": "YOUR_API_KEY", "action": "add", "service": 100, "link": "https://t.me/example/123", "quantity": 1000, }) print(resp.json())
Response
Response
{"order": 8421}order is a number, unlike most fields in this API. If an order can't be fulfilled, it moves to Canceled and the full charge is refunded to your balance.status #
Check one order, or up to 100 in a single call.
Single order
POST /v2/ · status
import requests resp = requests.post("https://api.lightningmedia.in/v2/", data={ "key": "YOUR_API_KEY", "action": "status", "order": 8421, }) print(resp.json())
Response
{
"charge": "0.01",
"start_count": "0",
"status": "In progress",
"remains": "400",
"currency": "USD"
}Response fields
| Field | Type | Meaning |
|---|---|---|
| charge | string | What this order cost you, in USD |
| start_count | string | Always "0"; track progress with remains |
| status | string | One of the status values |
| remains | string | Quantity not yet delivered |
Batched
POST /v2/ · status
import requests resp = requests.post("https://api.lightningmedia.in/v2/", data={ "key": "YOUR_API_KEY", "action": "status", "orders": "8421,8422", }) print(resp.json())
Response
{
"8421": {
"charge": "0.01",
"start_count": "0",
"status": "Completed",
"remains": "0",
"currency": "USD"
},
"8422": {"error": "Incorrect order ID"}
}A batched response is an object keyed by order ID. Each value is either a status object like the one above, or
{"error": ...} for an ID that isn't yours. Only the first 100 IDs are looked up; each one past that comes back as {"error": "Too many order IDs in one request"}.Status values #
The exact strings status returns. Match them case-sensitively: it's In progress, lower-case p.
- Pending
- Accepted, not started yet
- In progress
- Delivery is running
- Completed
- Fully delivered
- Partial
- Delivery stopped short of the full quantity
- Canceled
- Canceled and refunded in full
Notes #
- All amounts are in USD.
- Refill, cancel, and dripfeed are not supported on any service.
start_countis always"0". There is no delivery baseline to report, so track progress fromremains.- Status is refreshed in the background, not on each request, so polling more than once a minute gains little.