diff --git a/dev/rest-api/endpoints/index.html b/dev/rest-api/endpoints/index.html index aad6aa63..aef0a2ae 100644 --- a/dev/rest-api/endpoints/index.html +++ b/dev/rest-api/endpoints/index.html @@ -2067,34 +2067,6 @@ - - -
  • - - - - Error responses - - - - - -
  • @@ -2826,34 +2798,6 @@ -
  • - -
  • - - - - Error responses - - - - - -
  • @@ -2906,11 +2850,8 @@
  • Compression. JSON responses of 256 bytes or more are gzip-compressed when the client sends Accept-Encoding: gzip. A slow response is not compressed.
  • Service allowlist. The effective allowlist for your API key filters the service-facing endpoints (the intersection of the global serve.services list and your per-key list). The server treats services you cannot use as unknown.
  • Remote services. A full-mode server can run a service through one of its own remote_services servers. See Remote services relay.
  • +
  • Errors. Error Responses gives the standard error shape and the authentication error of the API-key middleware.
  • -
    -

    Error responses have two shapes

    -

    Structured application errors (raised inside a handler) return {"status": "error", "error_code": "...", "message": "...", "timestamp": "..."}. The authentication middleware, however, returns a different shape: {"status": 401, "message": "..."} with an integer status and no error_code. The same middleware answers 429 in that shape when an API key goes over its rate limit. Clients must accept both shapes. The Error responses section at the bottom of this page gives the full error model.

    -

    General endpoints

    These endpoints report server state and enumerate what is available. GET /api/health, GET /api/services, and POST /api/search are also exposed in --remote-only mode.

    @@ -4171,7 +4112,7 @@ ignore it safely. See Split e -

    Validation. Invalid values return 400 INVALID_PARAMETERS. vcodec, acodec and sub_format take the same spellings as the CLI options of the same name (unshackle dl --help prints each list). The API and the CLI read one list, so they cannot disagree. range must be one of SDR/HDR10/HDR10P/VIVID/DV/HLG/HYBRID, and HDR10+ and HDR Vivid are also valid. The bitrate, download worker, and download counts must be positive integers. You cannot combine no_subs with subs_only, or no_audio with audio_only. The server runs the same option checks as unshackle dl, so a request that dl would refuse returns 400 when you submit it, and the message names the dl option. The language fields (lang, v_lang, a_lang, s_lang, forced_s_lang and the require_* fields) must be arrays of strings: a single string such as "en" returns 400. The server checks every other field with the type of its dl option. A null or an empty string gets the default from the table.

    +

    Validation. Invalid values return 400 INVALID_PARAMETERS. vcodec, acodec and sub_format take the same spellings as the CLI options of the same name (unshackle dl --help prints each list). The API and the CLI read one list, so they cannot disagree. You cannot combine no_subs with subs_only, or no_audio with audio_only. The server runs the same option checks as unshackle dl, so a request that dl would refuse returns 400 when you submit it, and the message names the dl option. The language fields (lang, v_lang, a_lang, s_lang, forced_s_lang and the require_* fields) must be arrays of strings: a single string such as "en" returns 400. The server checks every other field with the type of its dl option. A null or an empty string gets the default from the table.

    Service options. A service's own CLI options travel in the same body. Send them in a nested service_params object, or as flat top-level keys. When the body has service_params, the server reads service options only from it, and every flat key is a dl value. A name in service_params @@ -5039,31 +4980,6 @@ key.


    -

    Error responses

    -

    The server serialises every structured error raised inside a handler to the same JSON envelope:

    -
    {
    -  "status": "error",
    -  "error_code": "INVALID_PARAMETERS",
    -  "message": "Invalid video codec: XYZ",
    -  "timestamp": "2026-07-03T12:00:00+00:00",
    -  "details": { "field": "vcodec" },
    -  "retryable": true,
    -  "debug_info": { "exception_type": "APIError", "traceback": "..." }
    -}
    -
    - -
    -

    Authentication errors differ

    -

    Errors raised by the API-key middleware use a distinct shape ({"status": 401, "message": "Secret Key is Empty."}, {"status": 401, "message": "Secret Key is Invalid."}, or {"status": 429, "message": "Rate limit exceeded."} with a Retry-After header) with an integer status and no error_code, timestamp, or details. A 429 from the middleware therefore carries no error_code, unlike the RATE_LIMITED code below, which a handler raises for a rate limit the service imposed. A malformed JSON body on any POST, by contrast, returns the standard envelope with error_code: "INVALID_INPUT".

    -
    -

    Error codes and default status

    -

    The error code catalogue gives the default HTTP status of each error code.

    -

    When a generic (uncategorised) exception reaches a handler, unshackle inspects its message and type to pick a code. For example, messages mentioning "connection" or "timeout" become NETWORK_ERROR (424, retryable), "rate limit" or "429" become RATE_LIMITED (429, retryable), and anything unrecognised collapses to INTERNAL_ERROR (422).

    -

    See also

    You normally do not need to think about any of this. It gives a clean file.

    Selecting and filtering subtitles

    -

    Subtitle selection happens through dl flags. The most important is language selection.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FlagPurpose
    -sl, --s-langLanguage(s) wanted for subtitles. Defaults to all. A - prefix excludes, e.g. all,-es.
    --require-subsRequire these languages to exist. The title fails if one is missing. --s-lang still decides what to keep.
    -fs, --forced-subsInclude forced subtitle tracks (excluded by default).
    -fso, --forced-subs-onlyKeep only forced subtitle tracks and drop the other subtitles; implies -fs.
    -fsl, --forced-s-langLanguage(s) wanted for forced subtitles; implies -fs. A - prefix excludes.
    --exact-langA tag without a region never falls back to another variant: es does not match es-419.
    -S, --subs-onlyDownload only subtitle tracks.
    -ns, --no-subsDo not download subtitle tracks at all.
    --sub-formatOutput subtitle format / conversion target (see conversion).
    --sub-fontFont for subtitles converted to ASS; implies --sub-format ass (see custom font and style).
    --skip-subtitle-errorsSkip a subtitle that fails to download instead of aborting the whole title.
    +

    Subtitle selection happens through dl flags. The most important is language selection. +The language and subtitle flags give the meaning and +default of each one. --subs-only, --no-subs and --skip-subtitle-errors are with the +track-type flags.

    Choosing languages

    By default (--s-lang all) unshackle keeps every subtitle language the service offers. To narrow it down, pass a comma-separated list of language tags:

    diff --git a/reference/configuration/index.html b/reference/configuration/index.html index 54bfb8b0..5c3d44b1 100644 --- a/reference/configuration/index.html +++ b/reference/configuration/index.html @@ -2071,7 +2071,7 @@ default.

    dl, continue_downloads, merge_segments, subtitle, audio, muxing, language_tags, dual_multi_mode, generate_dv_mode, hdr10plus_probe -Output & naming +Output & naming options output_template, tag, tag_rules, codec_names, tag_group_name, tag_imdb_tmdb, chapter_fallback_name, unicode_filenames, filename_replacements @@ -2083,7 +2083,7 @@ default.

    network, headers, proxy_providers -Key vaults +Key vault options key_vaults, vault_timeout diff --git a/reference/configuration/network/index.html b/reference/configuration/network/index.html index 752211f6..1e924cbb 100644 --- a/reference/configuration/network/index.html +++ b/reference/configuration/network/index.html @@ -2336,6 +2336,8 @@

    Network & Proxy

    +

    Keys that control the HTTP client, the headers that it sends and the proxy providers. For how +--proxy picks a proxy, see the Proxies & VPN guide.

    network