nexus_download_mod_file
Download a Nexus Mods file to your local disk with MD5 and SHA-256 checksum verification. Resolves the CDN link and streams the file, supporting premium and non-premium access via .nxm key/expires.
Instructions
Resolve a mod file's CDN link and stream it to a local file.
Downloads the actual file behind nexus_get_download_link, saving it to disk with MD5 + SHA-256 checksums (verify MD5 against nexus_get_file_info). Premium accounts can omit key/expires; non-premium accounts MUST pass the key/expires pair from a .nxm download link generated on the Nexus website.
Returns: JSON {file, bytes, md5, sha256, mirror, _rl} or an error string.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | No | 'key' from a .nxm download link. REQUIRED for non-premium accounts (403 otherwise). | |
| mod_id | Yes | Numeric mod ID. | |
| expires | No | 'expires' (unix epoch seconds) from a .nxm download link. REQUIRED for non-premium accounts. | |
| file_id | Yes | Numeric file ID. | |
| max_bytes | No | Safety cap on download size in bytes; the transfer aborts past this (default 10 GiB). | |
| destination | No | Directory to save the file into (created if missing). Defaults to the current working directory. | |
| domain_name | Yes | Nexus Mods game domain (lowercase URL slug), e.g. 'forzahorizon6', 'skyrimse'. NOT the display name. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |