Libnup API

Documentation

A REST API for your own software and add-ons: add downloads, follow them, list your files, and get download and streaming links. Everything goes through your account, with the same quotas as on the website.

Getting started

  1. The API is included in every paid plan. The free trial does not include it.
  2. Create a key in My account → API. It is shown once: copy it somewhere safe.
  3. Send it with every request, in the Authorization header:
# Your key, from My account → API
export LIBNUP_KEY="lnu_..."

curl -s https://api.libnup.com/v1/user -H "Authorization: Bearer $LIBNUP_KEY"

Authentication

Send your key as Authorization: Bearer <key>. A client that cannot set a header may put ?apikey=<key> in the URL, on GET requests only. Prefer the header: a URL ends up in logs and histories.

You can hold several keys, one per program, each with a name. My account shows when each one was last used, and from which IP address. Revoking a key stops it at once, without changing your password.

Each key has one of two scopes:

ScopeAllows
fullEverything: add, delete, list, download, stream, check.
readList, download, stream and check. No add, no delete. The one to give an add-on that only plays your files.

Limits

The API applies exactly the same rules as the website. Links from file hosts are counted per plan over a rolling 24 hours:

PlanStorageFile-host links per 24 h
s100100 GB3
s200200 GB3
s500500 GB5
s1t1 TB10
s2t2 TB15
s3t3 TB25
  • Torrents, NZB and YouTube or Dailymotion videos: unlimited on every plan, within your storage.
  • A link that fails does not count, and neither does a direct link that needs no file host.
  • A .torrent can weigh up to 2 MB and a .nzb up to 32 MB.

Endpoints

GET/v1/user

Your plan and its end date, your storage (used and total, in bytes), what is left of each quota for the last 24 hours, the jobs waiting and running, and the key in use.

curl -s https://api.libnup.com/v1/user -H "Authorization: Bearer $LIBNUP_KEY"
Example answer
{"id": "5d2e7c1a-93b4-4f0e-8a61-0c9b2f7e4d38", "email": "you@example.com",
 "plan": {"id": "s500", "expires_at": "2026-12-27T10:00:00.000Z"},
 "email_verified": true,
 "storage": {"used": 128849018880, "total": 536870912000},
 "quotas": {"link": {"unlimited": false, "limit": 5, "used": 2, "remaining": 3,
                     "resets_at": "2026-11-28T09:14:02.000Z"},
            "torrent": {"unlimited": true, "limit": null, "used": 4, "remaining": null, "resets_at": null},
            "nzb": {...}, "video": {...}},
 "jobs": {"queued": 3, "running": 2},
 "streaming": true,
 "key": {"name": "Home server", "scope": "full", "prefix": "lnu_Q2k9xTzA"}}

POST/v1/add

One entry point for every download. Send a link as JSON (or as a form): a magnet, a link to a .torrent or a .nzb, a file-host link, or a YouTube or Dailymotion link. Or upload a .torrent (2 MB at most) or a .nzb (32 MB at most) as multipart/form-data, in the field file.

The type is told from the link; force it with "type": "torrent", "nzb", "link" or "video". For a video, "format": "audio" keeps only the sound, and "playlist": true downloads the whole playlist a video was opened from.

The answer (201) is the new job. Libnup downloads a few jobs of each type at the same time per account; the others wait in the queue in the order they were added. The id of a torrent or NZB job can change once, shortly after the add: the first id keeps answering, with the new one.

# A magnet
curl -s -X POST https://api.libnup.com/v1/add -H "Authorization: Bearer $LIBNUP_KEY" \
  -H "Content-Type: application/json" \
  -d '{"link": "magnet:?xt=urn:btih:dd8255ecdc7ca55fb0bbf81323d87062db1f6d1c&dn=Big+Buck+Bunny"}'

# A file-host link
curl -s -X POST https://api.libnup.com/v1/add -H "Authorization: Bearer $LIBNUP_KEY" \
  -H "Content-Type: application/json" -d '{"link": "https://1fichier.com/?abcdefghij"}'

# A .nzb or .torrent file
curl -s -X POST https://api.libnup.com/v1/add -H "Authorization: Bearer $LIBNUP_KEY" -F "file=@release.nzb"
Example answer
{"job": {"id": "0b8f3a9e-6c1d-4a52-9f0e-2d7b5c4e8a11", "type": "torrent",
         "name": "Big Buck Bunny", "size": null, "status": "queued",
         "progress": 0, "speed": null, "eta": null, "error": null,
         "streamable": false, "host": null,
         "created_at": "2026-11-27T15:02:11.000Z", "finished_at": null}}

GET/v1/jobs

Every add, newest first. Filters: status (active, queued, completed, failed), type (torrent, link, nzb, video, upload), q (part of the name), sort (recent, oldest, name_asc, name_desc, size_desc, size_asc), limit (1 to 100) and offset. Keep going while has_more is true: a filtered page can hold fewer items than limit.

curl -s "https://api.libnup.com/v1/jobs?status=active" -H "Authorization: Bearer $LIBNUP_KEY"

GET/v1/jobs/{id}

One job: status, progress in percent, speed in bytes per second, time left when known, the error when it failed, and its files once completed.

curl -s https://api.libnup.com/v1/jobs/JOB_ID -H "Authorization: Bearer $LIBNUP_KEY"

DELETE/v1/jobs/{id}

Cancels a job that is still waiting or downloading, or deletes what a finished job downloaded. The same as DELETE /v1/files/{id}. The item's share links stop working. A torrent or NZB job that joined an item you already had answers 404 and leaves that item in place.

curl -s -X DELETE https://api.libnup.com/v1/jobs/JOB_ID -H "Authorization: Bearer $LIBNUP_KEY"

GET/v1/files

Your finished items, newest first: one file, or a folder of files (a torrent, an NZB, a playlist). An item has the same id as the job that made it. Filters: type, q, sort, limit, offset.

curl -s "https://api.libnup.com/v1/files?type=torrent&limit=20" -H "Authorization: Bearer $LIBNUP_KEY"

GET/v1/files/{id}

One item and the files it holds, each with its own id, its path inside the item, its size and a MIME type guessed from its name. DELETE /v1/files/{id} deletes the item and its files.

curl -s https://api.libnup.com/v1/files/ITEM_ID -H "Authorization: Bearer $LIBNUP_KEY"
Example answer
{"file": {"id": "0b8f3a9e-6c1d-4a52-9f0e-2d7b5c4e8a11", "type": "torrent",
          "name": "Big.Buck.Bunny.2008.1080p", "size": 928670754, "streamable": true,
          "host": null, "created_at": "...", "finished_at": "...",
          "files": [{"id": "0b8f3a9e-6c1d-4a52-9f0e-2d7b5c4e8a11_3f9c0a1b2d4e5f60",
                     "name": "Big.Buck.Bunny.2008.1080p.mkv",
                     "path": "Big.Buck.Bunny.2008.1080p.mkv", "size": 928670754,
                     "mime_type": "video/x-matroska", "streamable": true}]}}

GET/v1/dl/{file_id}

A signed HTTPS link to one file. It works for 24 hours without a key and serves Range requests, so a download can resume. An item id works too when the item holds a single file. With ?redirect=true the answer is a 302 to the link, which download managers can follow.

# -L follows the redirect, -C - resumes an interrupted download
curl -L -C - -o Big.Buck.Bunny.mkv "https://api.libnup.com/v1/dl/FILE_ID?redirect=true" -H "Authorization: Bearer $LIBNUP_KEY"

GET/v1/stream/{file_id}

The best link to play a video now: a browser-ready MP4 when one was made (format mp4), else an HLS playlist (hls), else the file itself (original), which players such as VLC, mpv or the Stremio desktop app play. Subtitles come as WebVTT links. ?redirect=true answers a 302, for players that only take a URL.

With original, prepare says whether a browser-ready copy can be made. POST /v1/stream/{file_id} asks for one (a repackaging, without re-encoding); then call GET again until format is no longer original.

curl -s https://api.libnup.com/v1/stream/FILE_ID -H "Authorization: Bearer $LIBNUP_KEY"
curl -s -X POST https://api.libnup.com/v1/stream/FILE_ID -H "Authorization: Bearer $LIBNUP_KEY"

# Play it right away
mpv "$(curl -s https://api.libnup.com/v1/stream/FILE_ID -H "Authorization: Bearer $LIBNUP_KEY" | jq -r .url)"

POST/v1/check

Tells which torrents (by info hash or magnet), file-host links and YouTube or Dailymotion links are already in your own files or jobs, up to 100 at a time. It only looks at your account.

curl -s -X POST https://api.libnup.com/v1/check -H "Authorization: Bearer $LIBNUP_KEY" -H "Content-Type: application/json" \
  -d '{"hashes": ["dd8255ecdc7ca55fb0bbf81323d87062db1f6d1c"], "links": ["https://1fichier.com/?abcdefghij"]}'

Job statuses

queuedWaiting for a free slot.
downloadingBytes are coming in: see progress and speed.
processingBeing resolved, checked, repaired or unpacked.
completedThe files are ready.
failedSee error.code and error.message.

Errors

Errors are JSON, with an HTTP status that fits. code is stable and meant for programs; message is for people and may change. Some codes carry more fields.

HTTP/1.1 429 Too Many Requests
Retry-After: 3120

{"error": {"code": "QUOTA_EXCEEDED",
           "message": "Your plan's quota of links per 24 hours is used up.",
           "resets_at": "2026-11-28T09:14:02.000Z", "limit": 5}}
codeHTTPMeaning
UNAUTHORIZED401No key, a key that is not valid or was revoked, or ?apikey= on a request other than GET.
ACCOUNT_SUSPENDED403The account is suspended.
PLAN_REQUIRED403No active paid plan (the trial does not include the API), or the plan does not include what is asked.
EMAIL_UNVERIFIED403Confirm your email address on libnup.com before adding anything.
SCOPE_INSUFFICIENT403A read-only key tried to add or delete.
API_UNAVAILABLE403 / 503The API is not open to this account yet (403), or it is switched off for now (503).
INVALID_REQUEST400A parameter or the body is not valid.
INVALID_LINK400The link is not valid.
INVALID_FILE400The file is not a valid .torrent or .nzb.
NOT_FOUND404No job, file or endpoint with this id or path on your account.
METHOD_NOT_ALLOWED405Wrong method for this path (see the Allow header).
NOT_READY409The job has not finished yet.
JOB_FAILED409The job failed, so it has no files: its error is in GET /v1/jobs/{id}.
MULTIPLE_FILES409The item holds several files: use the id of one of them.
FILE_TOO_LARGE413A .torrent over 2 MB or a .nzb over 32 MB.
UNSUPPORTED_MEDIA_TYPE415The body is not JSON, a form, or a .torrent or .nzb file.
UNSUPPORTED_HOST422This file host is not supported.
HOSTER_DOWN422This file host is unavailable right now. Try again later.
FOLDER_LINK422A folder link: add the links of the files one by one.
LINK_PROTECTOR422A protected or shortened link: add the file host's own link.
LIBNUP_LINK422The link already points to Libnup.
NOT_A_FILE422The link leads to a web page, not to a file.
DIRECT_UNAVAILABLE422Direct download links are switched off for now.
SOURCE_DEAD422The file host says the file does not exist (404).
NOT_STREAMABLE422The file is not a video.
RATE_LIMITED429Too many requests: wait for the seconds in Retry-After.
QUOTA_EXCEEDED429The plan's links per 24 hours are used up (resets_at says when one is freed).
QUEUE_FULL429Too many jobs waiting or running on the account.
STORAGE_FULL507The storage is full: delete files to add more.
SERVICE_UNAVAILABLE503The storage server did not answer: try again in a moment.
INTERNAL_ERROR500Something went wrong on our side.

Changelog

/v1 stays compatible: fields may be added, never removed or changed. A breaking change would go to /v2 and be announced here first.

  • v1.0 (November 2026) · First version.