Reference for all endpoints, authentication, and request/response formats.
Base URL: https://apihosting.sbs (or your API host, e.g. https://api.apihosting.sbs). All responses are JSON. Protected endpoints require an API key.
| Method | Path | Auth |
|---|---|---|
| GET | /health | — |
| POST | /html-pusher | API key |
| GET | /hosted/:id | — |
| POST | /upload-image | API key |
| GET | /image/:id | — |
| GET | /uploads | API key |
| POST | /create-ltc-address | API key |
| GET | /wallets | API key |
| GET | /wallets/:id | API key |
| POST | /send-ltc | API key |
| GET | /check-address-balance?address= | API key |
| GET | /check-txid?txId= | API key |
| GET | /check-ltc-price | API key |
Send your API key in one of these ways:
x-api-key: YOUR_API_KEYAuthorization: Bearer YOUR_API_KEY?apiKey=YOUR_API_KEYProtected endpoints return 401 if the key is missing or 403 if it's invalid.
GET /health
No auth. Returns service status and uptime.
{
"status": "ok",
"timestamp": "2025-02-18T12:00:00.000Z",
"uptime": 3600
}
POST /html-pusher API key
Submit HTML and get a public URL where it is hosted. The URL is https://apihosting.sbs/hosted/<id> where <id> is a 16-character string. Viewing the URL does not require an API key. Optional expiresAt removes the page after that time (ISO 8601 date).
Request body:
{
"html": "<!DOCTYPE html><html><body>Hello</body></html>",
"expiresAt": "2026-12-31T23:59:59.000Z"
}
expiresAt is optional. html is required (max 512KB).
Response (201):
{
"id": "a1b2c3d4e5f67890",
"url": "https://apihosting.sbs/hosted/a1b2c3d4e5f67890"
}
Viewing hosted HTML:
GET /hosted/:id
No auth. Returns the stored HTML as text/html. Returns 404 if the id does not exist or has expired.
POST /upload-image API key
Upload an image (base64). Stored and served at https://apihosting.sbs/image/<id>. Max size 4MB (decoded).
Request body:
{
"image": "base64string",
"contentType": "image/png"
}
Or send a data URL: "image": "data:image/png;base64,...". contentType is optional if using a data URL.
Response (201):
{
"id": "a1b2c3d4e5f67890",
"url": "https://apihosting.sbs/image/a1b2c3d4e5f67890"
}
GET /image/:id
No auth. Returns the image with the stored Content-Type. 404 if not found.
GET /uploads API key
Returns all images and hosted HTML pages created with your API key (with url and createdAt). Use this to list what you've uploaded for the dashboard.
Response (200):
{
"images": [
{ "id": "...", "type": "image", "contentType": "image/png", "createdAt": "...", "url": "https://apihosting.sbs/image/..." }
],
"hostedHtml": [
{ "id": "...", "type": "html", "createdAt": "...", "url": "https://apihosting.sbs/hosted/..." }
]
}
POST /create-ltc-address API key
Creates a new Litecoin wallet and derives the first address. Credentials are stored in our database for your API key; the response includes an id you can use to fetch them later. Store the mnemonic securely.
Response (200):
{
"id": "a1b2c3d4e5f6a1b2c3d4e5f6",
"mnemonic": "word1 word2 ...",
"xpub": "...",
"index": 0,
"address": "ltc1..."
}
GET /wallets API key
Returns all wallets created with your API key (mnemonic, xpub, index, address, createdAt). Optional query ?address=ltc1... returns only the wallet with that address.
Response (200):
{
"wallets": [
{
"id": "a1b2c3d4e5f6a1b2c3d4e5f6",
"mnemonic": "...",
"xpub": "...",
"index": 0,
"address": "ltc1...",
"createdAt": "2026-02-18T12:00:00.000Z"
}
]
}
GET /wallets/:id API key
Returns a single wallet by id (24-character hex from create-ltc-address or the wallets list). Returns 404 if the id does not exist or belongs to another key.
Response (200):
{
"id": "a1b2c3d4e5f6a1b2c3d4e5f6",
"mnemonic": "...",
"xpub": "...",
"index": 0,
"address": "ltc1...",
"createdAt": "2026-02-18T12:00:00.000Z"
}
POST /send-ltc API key
Broadcast a transaction from one address to one or more recipients.
Request body:
{
"fromAddress": "ltc1...",
"to": [
{ "address": "ltc1...", "value": 0.001 },
{ "address": "ltc1...", "value": 0.002 }
]
}
value is in LTC. Response shape is from the underlying provider (e.g. transaction hash/details).
GET /check-address-balance?address=ltc1... API key
Returns balance for the given address. Response shape is from the underlying provider (e.g. incoming, outgoing, balance).
GET /check-txid?txId=... API key
Returns transaction details for the given transaction ID.
GET /check-ltc-price API key
Returns current LTC/USD price. Response shape is from the underlying provider (e.g. basePair, price).
Errors return JSON with an error message. Common status codes:
| Code | Meaning |
|---|---|
400 | Bad request (missing or invalid parameters) |
401 | Missing API key |
403 | Invalid API key |
404 | Unknown path, wallet not found, or hosted page not found/expired |
429 | Rate limited; response may include retryAfterMs |
500 | Server or upstream error |
Requests are rate-limited per IP (e.g. 20 requests per minute). Exceeding the limit returns 429 and a cooldown period.