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.
- Base URL
https://api.libnup.com/v1 - Format JSON, HTTPS
- Authentication
Authorization: Bearer <key> - Specification https://api.libnup.com/openapi.json (OpenAPI 3.1)
Getting started
- The API is included in every paid plan. The free trial does not include it.
- Create a key in My account → API. It is shown once: copy it somewhere safe.
- 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:
| Scope | Allows |
|---|---|
full | Everything: add, delete, list, download, stream, check. |
read | List, 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:
| Plan | Storage | File-host links per 24 h |
|---|---|---|
s100 | 100 GB | 3 |
s200 | 200 GB | 3 |
s500 | 500 GB | 5 |
s1t | 1 TB | 10 |
s2t | 2 TB | 15 |
s3t | 3 TB | 25 |
- 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
queued | Waiting for a free slot. |
downloading | Bytes are coming in: see progress and speed. |
processing | Being resolved, checked, repaired or unpacked. |
completed | The files are ready. |
failed | See 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}}| code | HTTP | Meaning |
|---|---|---|
UNAUTHORIZED | 401 | No key, a key that is not valid or was revoked, or ?apikey= on a request other than GET. |
ACCOUNT_SUSPENDED | 403 | The account is suspended. |
PLAN_REQUIRED | 403 | No active paid plan (the trial does not include the API), or the plan does not include what is asked. |
EMAIL_UNVERIFIED | 403 | Confirm your email address on libnup.com before adding anything. |
SCOPE_INSUFFICIENT | 403 | A read-only key tried to add or delete. |
API_UNAVAILABLE | 403 / 503 | The API is not open to this account yet (403), or it is switched off for now (503). |
INVALID_REQUEST | 400 | A parameter or the body is not valid. |
INVALID_LINK | 400 | The link is not valid. |
INVALID_FILE | 400 | The file is not a valid .torrent or .nzb. |
NOT_FOUND | 404 | No job, file or endpoint with this id or path on your account. |
METHOD_NOT_ALLOWED | 405 | Wrong method for this path (see the Allow header). |
NOT_READY | 409 | The job has not finished yet. |
JOB_FAILED | 409 | The job failed, so it has no files: its error is in GET /v1/jobs/{id}. |
MULTIPLE_FILES | 409 | The item holds several files: use the id of one of them. |
FILE_TOO_LARGE | 413 | A .torrent over 2 MB or a .nzb over 32 MB. |
UNSUPPORTED_MEDIA_TYPE | 415 | The body is not JSON, a form, or a .torrent or .nzb file. |
UNSUPPORTED_HOST | 422 | This file host is not supported. |
HOSTER_DOWN | 422 | This file host is unavailable right now. Try again later. |
FOLDER_LINK | 422 | A folder link: add the links of the files one by one. |
LINK_PROTECTOR | 422 | A protected or shortened link: add the file host's own link. |
LIBNUP_LINK | 422 | The link already points to Libnup. |
NOT_A_FILE | 422 | The link leads to a web page, not to a file. |
DIRECT_UNAVAILABLE | 422 | Direct download links are switched off for now. |
SOURCE_DEAD | 422 | The file host says the file does not exist (404). |
NOT_STREAMABLE | 422 | The file is not a video. |
RATE_LIMITED | 429 | Too many requests: wait for the seconds in Retry-After. |
QUOTA_EXCEEDED | 429 | The plan's links per 24 hours are used up (resets_at says when one is freed). |
QUEUE_FULL | 429 | Too many jobs waiting or running on the account. |
STORAGE_FULL | 507 | The storage is full: delete files to add more. |
SERVICE_UNAVAILABLE | 503 | The storage server did not answer: try again in a moment. |
INTERNAL_ERROR | 500 | Something 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.