API documentation

v1

Export drama data, prepare episode files and build reports through the same operations as the ShortDramaKit tools.

Choose your inputs
Read capabilities without a key, then choose a supported title link or discovery source. Supporting reads do not run a tool.
Work with your account
Every new tool run requires a signed-in session or a scoped API key and uses the shared credit balance. The dashboard holds your tasks, files, keys and usage.

This reference describes the implemented API. Check GET /api/v1/capabilities on your base URL before choosing a runtime-dependent operation.

Your first export

Create an account, copy an API key with live:write and jobs:read, then follow these three steps. New accounts receive 10 credits once; the export uses credits.

Replace the example with your original title link. Keep data.id from the created task.

POST /api/v1/live/jobs
BASE_URL="<your preview origin>"
# Set SHORTDRAMAKIT_API_KEY securely in your environment.

curl --fail -X POST "$BASE_URL/api/v1/live/jobs" \
  -H "Authorization: Bearer $SHORTDRAMAKIT_API_KEY" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: replace-with-a-unique-request-key' \
  -d '{
  "inputs": [
    "https://netshort.com/episode/the-mafia-bosses-max-level-nanny-2108386528632586241-ep-2"
  ],
  "format": "csv",
  "fields": [
    "platform",
    "platformId",
    "title",
    "metadataLocale",
    "reportedEpisodeCount",
    "sourceUrl",
    "observedAt"
  ]
}'

After this page loads, the examples use this preview’s origin. For another environment, set BASE_URL to its actual address. This example fetches current title data. Advance requests can require several passes; they reuse the same task and reservation.

This one-title example reserves up to 0.7 credits. Advancing the same task and downloading its saved result do not add another task charge. View pricing.

Keep the same request key when retrying

Reuse the Idempotency-Key with the same payload. Changing inputs, fields or format requires a new key; a conflicting payload returns 409.

Authentication and scopes

Create a key in the dashboard, copy its secret once and keep it in server-side secret storage. Send a bearer key only to endpoints that accept its scope.

Read your current-data tasks with jobs:read
BASE_URL="<your preview origin>"
# Set SHORTDRAMAKIT_API_KEY securely in your environment.

curl "$BASE_URL/api/v1/live/jobs" \
  -H "Authorization: Bearer $SHORTDRAMAKIT_API_KEY"
jobs:read
Read owned tasks, files and manifests. Does not run tools or start acquisition.
jobs:write
Prepare episode tables from completed metadata exports; this scope does not grant source acquisition or media writes.
live:write
Create and control current metadata, candidate-discovery and platform-download tasks. Source execution still requires an enabled runtime and its configured allowance.
media:write
Delete owned delivered video files. It does not grant source acquisition.
Key limits
Up to 5 active keys. Each key permits 600 requests per UTC minute, with no daily request cap. Usage is recorded even if an admitted operation later fails.

Use both the relevant write scope and jobs:read for a script that creates a task and downloads its result. A key’s permissions apply only to its owner’s resources.

Public capability and pricing reads do not authenticate API keys. Omit Authorization; if supplied, it is ignored and does not consume the key’s request allowance. Account settings, key management and billing require browser sign-in. Session mutations must be same-origin. Do not combine a session cookie with a bearer key.

Choose an operation

Open the outcome you need for its routes, input contract and access rules. Each listed key scope is an alternative to a signed-in owner session unless the route is marked public.

Export current title and episode dataSupported title links → a durable task and versioned files

Current reads require an enabled source runtime. Episode tables use source results from a completed task; they do not start a new acquisition.

POST
/api/v1/live/jobs

Session or live:write

Send inputs, fields and format (csv/json), with Idempotency-Key. Returns an owned task.

GET
/api/v1/live/jobs/api/v1/live/jobs/:id

Session or jobs:read

List recent owned tasks or read one task, including status, items, progress, canAdvance, canResume and downloadPath. Reading does not advance work.

POST
/api/v1/live/jobs/:id/advance/api/v1/live/jobs/:id/cancel

Session or live:write

Advance one persisted step or cancel unfinished work, with no request body. Cancelled paid exports cannot resume; start a new task with a new Idempotency-Key. Follow the returned action flags.

GET
/api/v1/live/jobs/:id/download?revision=N

Session or jobs:read

Download the immutable revision in the returned downloadPath. Keep this full path to retrieve the same bytes later.

POST
/api/v1/live/jobs/:id/episodes

Session or jobs:write · Idempotency-Key

Prepare or continue an episode table from completed source results. No body or Content-Type header is required. A non-empty body is rejected. Reuse the same Idempotency-Key for continuation; one table uses credits once. Inspect canContinue and per-input coverage; reported counts do not create episode rows.

GET
/api/v1/live/jobs/:id/episodes/api/v1/live/jobs/:id/episodes?format=csv/api/v1/live/jobs/:id/episodes?format=json

Session or jobs:read

Read the stored table envelope, or request a CSV/JSON attachment after preparation finishes. Missing fields and coverage remain explicit.

Find drama candidatesA supported keyword or category source → bounded title candidates

Discovery is a supporting step of drama-list collection. NetShort and DramaBox use category sources; ReelShort uses a bounded keyword source. Each mode requires an enabled runtime. A returned candidate is not enriched metadata or proof of full-catalog coverage.

POST
/api/v1/discovery/jobs

Session or live:write

Send platform, limit (1–20) and exactly one of keyword or category, with Idempotency-Key. Keyword accepts ReelShort only: {platform: 'reelshort', keyword: 'mafia', limit: 3}. Category accepts NetShort or DramaBox. NetShort categories: Modern Romance, Feel-Good, Revenge, Sweet Romance, Werewolf. DramaBox: Romance, Revenge, Billionaire, CEO, Strong Female Lead, Werewolf. Discovery and metadata enrichment have separate upfront quotes.

GET
/api/v1/discovery/jobs/api/v1/discovery/jobs/:id

Session or jobs:read

Read existing batches or a batch’s candidates, coverage, expiresAt and canAdvance. Each candidate includes its original sourceUrl; collection containers and entries without a valid title identity are omitted and can produce partial coverage. Reading makes no source request.

POST
/api/v1/discovery/jobs/:id/advance/api/v1/discovery/jobs/:id/cancel

Session or live:write

Advance one step or cancel the batch, with no request body. Select returned sourceUrl values as inputs to a metadata export. Batches expire after one hour.

Download selected available episodesA supported title, episode link or PineDrama series ID → private episode ZIP

Bounded NetShort, ReelShort and DramaBox delivery requires enabled source and media runtimes. Locked, unknown and unsupported episodes are excluded. Availability is separate from the catalog’s reported episode count.

POST
/api/v1/downloads

Session or live:write

Send {sourceUrl} and Idempotency-Key for an original link. PineDrama accepts {platform: "pinedrama", titleId: "native-series-id", episodeNumber: 1}; its task returns sourceUrl=null and sourceTitleId, without an invented page URL. TikTok supports original /shortdrama/episode/<series>/<number> links and retains preview scope. Supported public episode/share links create mode=episode, reserve one episode_download and advance directly to one file without a check fee or selection. Title links create mode=title and reserve the episode_check price for one owned availability report before acquisition. A verified report is charged even if zero episodes are selectable; a source failure with no report releases the reservation. Reusing the same key recovers the same task.

GET
/api/v1/downloads/api/v1/downloads/:id

Session or jobs:read

Read tasks or one task’s stage, episode availability, expiry and mediaJob. Reading does not acquire or transfer episodes.

POST
/api/v1/downloads/:id/advance/api/v1/downloads/:id/cancel

Session or live:write

Advance one bounded acquisition or delivery step, or cancel further work.

POST
/api/v1/downloads/:id/quote

Session or jobs:read

Send {requestedUnits: N} for the number of available episodes you intend to select. Returns {data: {operation, platform, downloadTaskId, maximumCredits, ...}, requestId}. Platform and source retrieval cost come from your owned, unexpired task; no source call, reservation or charge occurs. Do not send platform or source IDs. Availability checks cost at most 1.3 credits for NetShort and 0.7 for ReelShort or DramaBox under current rates.

POST
/api/v1/downloads/:id/deliver

Session or live:write

For mode=title only, send episodeNumbers after checking availability. mode=episode starts at creation; read/advance the same task instead. Reserve the separate episode_download price for the selected count, then settle only delivered episodes. The selected episode set becomes immutable. Request /api/v1/downloads/:id/quote first. GET /api/v1/pricing publishes NetShort reference rates, task minimum and rounding; other platform delivery prices depend on the owned availability report. The dashboard shows both quotes before submission.

GET
/api/v1/downloads/:id/manifest

Session or jobs:read

Download the provenance and coverage report. Retrieve the completed ZIP through /api/v1/media/files/:id using mediaJob.file.id.

Download episode result filesA completed episode delivery → its private ZIP

Use the mediaJob.file.id returned by the download task. Files are private and expire at their displayed expiresAt.

GET
/api/v1/media/files/:id/api/v1/media/files/:id/manifest

Session or jobs:read

Download the episode ZIP or inspect its delivery manifest. File metadata includes byteLength and sha256. Reading existing files adds no new task charge.

DELETE
/api/v1/media/files/:id

Session or media:write

Delete an owned delivered video file. Returns {data: {deleted: true}, requestId}.

Account, keys and balanceSupporting account management for both workflows

Public capability and pricing reads need no authentication; supplied Authorization is ignored, so omit it. Account management requires a signed-in browser session; API keys cannot manage other keys or billing.

GET
/api/v1/capabilities/api/v1/pricing

Public · omit Authorization

Read current operation availability, supported inputs, limits and prices before creating a task. Pricing includes downloadCheckQuotes for title-based platforms and downloadDirectQuotes for single public episode platforms; rates marks NetShort download references. For delivery, quote the owned task and selected count.

GET
/api/v1/workspace/overview/api/v1/workspace/tasks/api/v1/workspace/billing/api/v1/workspace/billing/history

Signed-in session

Read account overview, task history, available credits and credit changes.

GET
/api/v1/workspace/api-keys

Signed-in session

List your API keys without exposing their secrets.

POST
/api/v1/workspace/api-keys

Signed-in session

Create a key with a name and selected scopes. Copy its secret from this one response.

DELETE
/api/v1/workspace/api-keys/:id

Signed-in session

Revoke your key.

Follow a task to its result

Drama-list collection and episode-download workflows retain private tasks that you can return to. A task ID is an owned resource, not a public share link.

  1. Create once. Save the returned task ID. Task-creation endpoints for current exports, discovery and platform downloads require Idempotency-Key.
  2. Read status. Use the task’s GET route. A read does not initiate source acquisition. Inspect per-input outcomes and available action flags before continuing.
  3. Advance the supported workflow. Current exports, candidate batches and platform downloads expose advance.
  4. Download the returned output. Use the exact downloadPath or media file ID, and retain revision and expiry information. Partial results may include a usable file with missing items recorded.

Cancellation, recovery and expiry

Cancellation stops future processing; it cannot undo a source request already accepted. Cancelled paid exports are final: canResume is false and resume returns 409 billing_task_finished. Existing completed records remain downloadable. Start a new task with a new Idempotency-Key to run again.

Current exports can report needs_attention; use their message and canAdvance flag to decide whether to retry. Source tasks expose their own actions. Follow each resource’s expiresAt, sourceExpiresAt or file expiry rather than treating task retention as permanent storage.

Handle errors and retries

Read the HTTP status together with error.code, error.message and error.requestId. Preserve the request ID when reporting a failure.

StatusWhat to do
400 / 413 / 415Correct the payload, request size, query parameters or content type before retrying.
401Check for a missing, invalid or revoked key, or an expired session.
403Check the required scope, whether the endpoint accepts keys, and same-origin rules for sessions.
404 / 410Check the resource ID, owner and expiry. Missing or expired output cannot be recovered by repeated downloads.
409Read the code: an idempotency conflict needs the original payload or a new key; incomplete, busy or empty tasks need their stated recovery action.
429Key rate limits include Retry-After. Wait for that interval. Resource and queue limits may instead require finishing work or waiting for expiry.
5xxCheck the message and runtime availability. Retry transient failures with bounded backoff; an environment with a disabled capability needs configuration before execution can proceed.

After a connection failure, read a known task before sending another action. Retry idempotent creation with its original key and payload. Keys of 8–128 letters, digits, underscores or hyphens work across the task-creation endpoints.

Fields and responses

Metadata exports share these selectable fields. IDs remain strings, missing values remain unknown, and language editions remain separate records.

FieldTypeMeaning
platformstringOriginal platform: reelshort, dramabox, netshort, shortmax, goodshort or flextv.
platformIdstringOriginal platform’s title ID; preserve it as a string.
titlestringTitle in the record’s metadata language.
metadataLocalestringMetadata language; does not establish audio or subtitle availability.
reportedEpisodeCountnumber | nullReported episode count; does not establish playable or unlocked episodes.
regularEpisodeCountnumber | nullKnown count of regular episodes, when supplied.
trailerCountnumber | nullKnown trailer count, separate from regular episodes.
caststring[] | nullRecorded cast names, when supplied.
sourceUrlstringPublic original-platform title URL.
observedAtstringTimestamp of this record’s observation.

JSON preserves ID strings exactly. CSV prefixes numeric IDs with an apostrophe to prevent spreadsheet rounding.

Input outcomes and task status

Each current export reports successful, duplicate, unsupported, pending and failed inputs. Inspect each input and the task’s progress/action flags. A partial result remains downloadable when resultCount is positive; incomplete inputs do not become fabricated rows.

Response envelopes and files

Standard JSON success{ "data": ..., "requestId": "..." }
Error{ "error": { "code": "...", "message": "...", "requestId": "..." } }

Media management JSON uses { "data": { "job": ... }, "requestId": "..." }, with jobs, files, artifact or deleted as appropriate. For example, deletion returns { "data": { "deleted": true }, "requestId": "..." }. Platform downloads use { download, requestId } or { downloads, requestId }. Manifests have their own document shape. CSV, JSON and ZIP downloads are attachment responses, not JSON envelopes.

Availability and preview limits

Availability belongs to the environment you call. A documented endpoint or a granted scope does not enable its source or processing runtime.

Drama-list inputs
Current exports accept up to 20 supported title links. Discovery returns bounded candidates; metadata enrichment is a separate priced step.
Capability values
local means processing already acquired source data; live means source execution is enabled; unavailable means that operation is disabled in this environment. API processing marked local runs on the service.
Source coverage
Current metadata supports bounded title reads. Keyword/category discovery and episode delivery have narrower platform coverage in the operation reference. None implies an exhaustive catalog or complete playable series.
Access and cost
Every successful new run costs at least 0.1 credit, rounded up once per task. New accounts receive 10 credits once. Website and API share one prepaid balance. Status checks and existing-result downloads add no charge; unavailable rates cannot start a task.
Release status
This reference includes local implementation. The public preview may expose fewer capabilities. Production availability at api.shortdramakit.com has not been announced.
Open tools in the dashboard