API quickstart
Get an API key from the client portal, then authenticate, list the catalog, fetch episodes, and request playback. Paths below match the custom-api gateway under https://api.shortdramaapi.com.
1. Authentication
Send your API key on every request with the x-client-api-key header.
x-client-api-key: YOUR_API_KEY
# Base URL: https://api.shortdramaapi.com
2. Catalog
GET /api/v1/custom-api/catalog — series summary index. Pagination via page and page_size.
curl -sS -H "x-client-api-key: YOUR_API_KEY" \
"https://api.shortdramaapi.com/api/v1/custom-api/catalog?page=1&page_size=20"
{
"status": true,
"message": "Custom API catalog fetched",
"data": {
"data": [
{
"id": "vcpAlwpqSM",
"title": "Betray Me, Crave for Me",
"cover": "/images/demo/posters/vcpAlwpqSM.webp",
"episode_count": 52,
"original_audio_languages": ["en-US"],
"subtitle_languages": ["en-US", "hi-IN"]
}
],
"meta": {
"total": 2,
"page": 1,
"page_size": 20,
"hasMore": false,
"nextCursor": null
}
}
}
Real response from the sample catalog (trimmed). Playback URLs can change — request playback from your server.
3. Episode list
GET /api/v1/custom-api/series/:seriesId/episodes — ordered episodes for a series.
curl -sS -H "x-client-api-key: YOUR_API_KEY" \
"https://api.shortdramaapi.com/api/v1/custom-api/series/SERIES_ID/episodes?page=1"
{
"status": true,
"message": "Custom API episodes fetched",
"data": {
"seriesId": "vcpAlwpqSM",
"total": 52,
"episodes": [
{
"id": "OuiA2iGBsY",
"number": 1,
"title": "Betray Me, Crave for Me",
"isLocked": false,
"cover": "https://codderlab.blr1.digitaloceanspaces.com/reelsnap-hi-en/series/vcpAlwpqSM/episodes/001-OuiA2iGBsY/cover.jpg",
"subtitles": [
{
"language": "en-US",
"languageName": "English",
"url": "https://codderlab.blr1.digitaloceanspaces.com/reelsnap-hi-en/series/vcpAlwpqSM/episodes/001-OuiA2iGBsY/subtitles/en-US.vtt",
"format": "vtt"
},
{
"language": "hi-IN",
"languageName": "Hindi",
"url": "https://codderlab.blr1.digitaloceanspaces.com/reelsnap-hi-en/series/vcpAlwpqSM/episodes/001-OuiA2iGBsY/subtitles/hi-IN.vtt",
"format": "vtt"
}
]
},
{
"id": "cJ7KQKARLM",
"number": 2,
"title": "Betray Me, Crave for Me",
"isLocked": false,
"cover": "https://codderlab.blr1.digitaloceanspaces.com/reelsnap-hi-en/series/vcpAlwpqSM/episodes/002-cJ7KQKARLM/cover.jpg",
"subtitles": [
{
"language": "en-US",
"languageName": "English",
"url": "https://codderlab.blr1.digitaloceanspaces.com/reelsnap-hi-en/series/vcpAlwpqSM/episodes/002-cJ7KQKARLM/subtitles/en-US.vtt",
"format": "vtt"
},
{
"language": "hi-IN",
"languageName": "Hindi",
"url": "https://codderlab.blr1.digitaloceanspaces.com/reelsnap-hi-en/series/vcpAlwpqSM/episodes/002-cJ7KQKARLM/subtitles/hi-IN.vtt",
"format": "vtt"
}
]
}
],
"hasMore": true,
"nextCursor": "page:2"
}
}
Real response from the sample catalog (trimmed). Playback URLs can change — request playback from your server.
4. Playback
GET /api/v1/custom-api/series/:seriesId/episodes/:episodeId/playback — HLS URL and media fields (audio / subtitle choices where provided).
curl -sS -H "x-client-api-key: YOUR_API_KEY" \
"https://api.shortdramaapi.com/api/v1/custom-api/series/SERIES_ID/episodes/EPISODE_ID/playback"
{
"status": true,
"message": "Custom API playback fetched",
"data": {
"episode_id": "OuiA2iGBsY",
"series_id": "vcpAlwpqSM",
"number": 1,
"hls_url": "https://codderlab.blr1.digitaloceanspaces.com/reelsnap-hi-en/series/vcpAlwpqSM/episodes/001-OuiA2iGBsY/index.m3u8",
"quality": {
"width": 720,
"height": 1280,
"short_side": 720,
"requested": 720
},
"audio_languages": ["en-US"],
"subtitles": [
{
"language": "en-US",
"languageName": "English",
"url": "https://codderlab.blr1.digitaloceanspaces.com/reelsnap-hi-en/series/vcpAlwpqSM/episodes/001-OuiA2iGBsY/subtitles/en-US.vtt",
"format": "vtt"
},
{
"language": "hi-IN",
"languageName": "Hindi",
"url": "https://codderlab.blr1.digitaloceanspaces.com/reelsnap-hi-en/series/vcpAlwpqSM/episodes/001-OuiA2iGBsY/subtitles/hi-IN.vtt",
"format": "vtt"
}
]
}
}
Real response from the sample catalog (trimmed). Playback URLs can change — request playback from your server.
Expiry: Playback URLs can expire. When a URL stops working, request playback again from your server and hand the fresh URL to the player.
Catalog vs playback
- Catalog / series / episodes — metadata for browsing and episode selection (titles, covers, counts, locks).
- Playback — media delivery fields for the player (HLS
.m3u8, optional subtitle tracks). Call playback only when the user is about to watch.
Try the shape visually on the live demo.
Errors, pagination & rate limits
| Code | Meaning |
|---|---|
| 401 | Missing or invalid API key |
| 403 | Plan, quota, or rights restriction |
| 404 | Series or episode not found |
| 429 | Rate limit exceeded |
| 500 | Upstream or server error |
Pagination: list endpoints accept page / page_size (or platform-specific cursors on gateway feeds).
Rate limits: limits depend on your plan and are stated in your agreement; back off and retry on 429.
Server-side example (Node.js)
Keep the API key on your server. This Express proxy reads SDAPI_BASE_URL and SDAPI_API_KEY from the environment and forwards the playback request.
import express from "express";
const app = express();
const base = process.env.SDAPI_BASE_URL; // e.g. https://api.shortdramaapi.com
const key = process.env.SDAPI_API_KEY;
app.get("/playback/:seriesId/:episodeId", async (req, res) => {
const { seriesId, episodeId } = req.params;
const url =
`${base}/api/v1/custom-api/series/${encodeURIComponent(seriesId)}` +
`/episodes/${encodeURIComponent(episodeId)}/playback`;
const upstream = await fetch(url, {
headers: { "x-client-api-key": key },
});
const body = await upstream.json();
res.status(upstream.status).json(body);
});
app.listen(process.env.PORT || 8080);
How to get an API key
- Create an account at portal.shortdramaapi.com/register (name, email, password — or Google sign-in when enabled).
- Activate access — on first login the portal can grant a one-time Free trial (limited API quota for a validity window), or you can activate a paid plan from Plans. An API key is provisioned when an active plan is linked to your account.
- Copy your key from API Keys in the client workspace (full secret is shown only at creation/rotation — store it securely).
- Call the catalog with
x-client-api-keyusing the cURL above. Keep keys on your server only.
Guides & OpenAPI
- Draft OpenAPI spec (JSON) — confirm with ShortDramaAPI before production use
- Mobile integration guide
- Flutter HLS integration — Flutter can play HLS; this guide does not assume a vendor SDK
- Server-side Node.js example — proxy playback with env-based credentials
Analytics hooks (for portal/backend): docs_view, sandbox_key_created, first_api_success.