公開 API

釋出其他類資源

POST /api/other-releases/publish —— category 與 title 必填。Idempotency-Key 自首次受理起綁定完整請求。同鍵變更參數回傳 409 CONFLICT;缺少綁定的舊未完成上傳請求回傳 legacy_request_binding_missing,兩者均須使用新鍵。torrentStorageId 指向的種子已被其他資源或他人未逾期的預覽使用時回傳 409 CONFLICT,error.reason 為 TORRENT_IN_USE。回放與 503 重試規則見「介面約定與鑑權」。

POST
/api/other-releases/publish

授權

header授權Bearer <token>

字幕组 API Key。Authorization: Bearer <KEY>。与 X-API-Key 二选一,Bearer 优先。 Key scope:releases:publish、releases:delete、releases:sync:read,至少选一个。

標頭參數

Idempotency-Key?string

同一 API Key 和端点的同一普通发布请求重试复用此值。已提交或已删除的旧命令返回原回执;删除后重新发布使用新值。不提供或为空时按新命令处理;超过 256 字符返回 422 VALIDATION_ERROR。跨站浏览器预检目前不允许此头。

長度1 <= length <= 256

請求主體

  1. body
category*string
值於"manga""music""raw""stage""collection""movie""other"
title?string

省略时使用种子内部名称。

長度1 <= length <= 500
magnetLink?string

可选。须含 v1 infohash(xt=urn:btih 后接 40 位十六进制或 32 位 base32,xt 键不区分大小写,可与 urn:btmh 同用且不论先后);不合法时返回 422 VALIDATION_ERROR。

長度length <= 8192
magnetBase64?string

磁力链接的 UTF-8 Base64,或原始 magnet: 链接;规则与 magnetLink 相同。

長度1 <= length <= 12000
trackers?string

单个表单字段,换行分隔或 JSON 数组字符串;最多 50 项。

fileSize?integer
範圍0 <= value <= 9007199254740991
notes?string
長度length <= 50000
descriptionMarkdown?string
長度length <= 50000
customTags?string

单个表单字段,逗号分隔或 JSON 数组字符串;最多 20 项,每项最多 80 字符。

tags?string

单个表单字段,逗号分隔或 JSON 数组字符串;最多 20 项,每项最多 80 字符。

magnet?string

magnetLink 的别名。

長度length <= 8192
content?string
長度length <= 50000
description?string
長度length <= 50000
intro?string
長度length <= 50000
nyaa?boolean
publishToNyaa?boolean
nyaaCategory?NyaaCategory

Nyaa 分类代码。中文动画字幕常用 1_3。 1_1 Anime - AMV;1_2 English-translated;1_3 Non-English-translated;1_4 Raw; 2_1 Audio Lossless;2_2 Audio Lossy; 3_1 Literature English;3_2 Literature Non-English;3_3 Literature Raw; 4_1 Live Action English;4_2 Idol/PV;4_3 Live Action Non-English;4_4 Live Action Raw; 5_1 Pictures Graphics;5_2 Pictures Photos; 6_1 Software Applications;6_2 Software Games。

值於"1_1""1_2""1_3""1_4""2_1""2_2""3_1""3_2""3_3""4_1""4_2""4_3""4_4""5_1""5_2""6_1""6_2"
nyaaComplete?boolean
nyaaRemake?boolean
nyaaDescription?string

自定义 Nyaa 说明,最多 10240 个字符,与 Nyaa 的上限一致;按字符计,首尾空白不计。超出返回 422 VALIDATION_ERROR。

長度length <= 10240
nyaaInformation?string
長度length <= 500
torrent*file
格式binary

回應主體

主记录已写入

application/json
  1. response
ok*true
值於true
result*
範例請求
curl -X POST 'https://anibt.net/api/other-releases/publish' \  -H 'Content-Type: application/json' \  -d '{  "category": "manga",  "title": "string",  "torrentStorageId": "string"}'
{  "ok": true,  "result": {    "releaseId": "orel_example",    "revision": 1,    "torrentObjectId": "obj_example"  }}