ColaPT 开放 API

契约版本 32.6.0。本页由站点内嵌的接口契约(x-open-api 标记的操作)生成,契约改了这里随之改变。

鉴权

在站点「账号设置 → API Key」新建一把 Key,勾选需要的范围,把它放进请求头 X-API-Key。带 Key 的请求不要同时带 Cookie、Authorization 或 Origin,也不需要 CSRF 令牌;每次请求都按 Key 所属账号当前的状态与权限判断,账号停用或权限被收回立即生效。

凭据位置说明
sessioncookie:reelcore_session
websiteApiKeyheader:X-API-Key账号所有的永久 API Key,放在 X-API-Key 请求头里,与浏览器会话无关;每次请求都现读账号状态与权限。Key 的范围(MachineScope)决定它能调什么:torrent.upload 驱动 /api/v1/automation/*;read、download 驱动契约里带 x-open-api 的开放 API 操作(文档在站点的 /api-docs);seedgroup 只驱动保种组插件的两条操作(/api/v1/plugin/seed-group/*)。带 Key 的请求不带 Cookie、Authorization 与 Origin,也不需要 CSRF。

范围

一把 Key 只能调用它勾选的范围里的操作;没有 x-open-api 标记的站点接口带 Key 一律回 403 api_key_scope_denied。

范围可以调用
readgetTorrent、listConversations、listMedia、listMediaSubtitles、listMySeeding、matchTorrentHashes、personalStats
downloadcreateDownloadLink、downloadSubtitle
seedgroupgetSeedGroupAssignment、reportSeedGroupState

限流

每把 Key(以及每个 URL 凭据)各有两份每分钟预算,当前生效值:读取 60 次/分钟(read 范围的操作;一次哈希反查计一次,不论查多少条),下载 120 次/分钟(download 范围的操作)。窗口按 UTC 整分钟计。每个响应带 X-RateLimit-Limit、X-RateLimit-Remaining、X-RateLimit-Reset;超出回 429 rate_limited 并带 Retry-After: 60。

数字的写法

字节数是十进制整数的字符串(字段名以 _bytes 结尾),瓶盖是 4 位小数的字符串,分享率是 4 位小数的字符串、无穷大时为 null;时间是 RFC 3339。读不到的计数是 null,不是 0。

错误

错误一律是 JSON:{"error":{"code":"…","message":"…","request_id":"…","fields":{…}}},按 code 分支,不要按 HTTP 状态猜。开放 API 会出现的错误码:

状态错误码说明可重试
403api_key_scope_denied这个 API Key 没有所需的权限范围,请在 API Key 设置里勾选后重试。否
401authentication_required请先登录。否
410gone内容已被永久删除。否
401invalid_credentials账号、密码或密钥不正确。否
400invalid_request请求内容不正确,请检查后重新提交。否
404not_found内容不存在,或你无权查看。否
403origin_denied页面已过期,请刷新后重试。否
403password_change_required请先修改密码。否
413payload_too_large内容太大,请缩小后重新提交。否
403permission_denied你没有权限进行这个操作。否
429rate_limited操作太频繁,请稍后再试。是
503service_unavailable服务暂时不可用,请稍后再试。是
409state_conflict当前状态不允许这个操作,请刷新查看最新状态。否
415unsupported_media_type不支持这种文件或内容类型。否

操作

保种组:领取派单(插件) getSeedGroupAssignment

GET /api/v1/plugin/seed-group/assignment

范围 seedgroup;账号需要权限 member.basic;凭据 session、websiteApiKey

The torrents the site assigned to this Seed Group member (docs/features/seed-group.md). The site, not the plugin, decides what to hold: every official torrent targets three copies in the group, the fewest-seeded first. keep and add are the live assignments; remove lists assignments the site released (a swap that makes room for a colder torrent, a lowered capacity, a delisted torrent, or one never seen seeding) until the plugin's state report no longer holds them, at most 14 days. Only assignments appear here: a torrent the member added on their own is never listed, so it is never removed. Rewards come from the site's own 10-minute sampling of the tracker, never from this call; each item carries that sampling's latest observation (last_seeded_at, observed_seeding). Only members of the Seed Group (the staff-seed group) get an assignment: anyone else is 403 permission_denied. The plugin authenticates with the member's API key carrying the seedgroup scope; the member's own browser session works too.

参数位置类型必填说明
X-Plugin-InstanceheaderstringThe plugin instance id (shown to staff for troubleshooting). Required on the state report.

示例:

curl -H 'X-API-Key: <你的 Key>' 'https://www.colapt.com/api/v1/plugin/seed-group/assignment'

响应 application/json:

字段类型总有说明
assigned_bytesstring(十进制整数)是Unsigned decimal integer, serialized as a JSON string; bytes and measured counters are never floating-point.
capacity_gibinteger是The capacity the member declared on the site (0 = not declared).
itemsobject[]是
min_plugin_versionstring是
revisioninteger是Monotonic per member: it grows whenever the site adds or releases one of the member's assignments. A plugin that sees it go backwards must not delete anything that round.
server_timestring(date-time)是
{
  "assigned_bytes": "17179869184",
  "capacity_gib": 2048,
  "items": [
    {
      "action": "keep",
      "download_url": null,
      "info_hash": "4f1c2d3e4a5b6c7d8e9f0a1b2c3d4e5f60718293",
      "last_seeded_at": "2026-11-24T15:50:30+08:00",
      "name": "Example.Show.S01.1080p.WEB-DL.H264-COLA",
      "observed_seeding": true,
      "reason": null,
      "size_bytes": "8589934592",
      "torrent_id": 41
    },
    {
      "action": "add",
      "download_url": "https://colapt.com/downloads/abc/42?exp=1764000000\u0026sig=abc",
      "info_hash": "9270936b0d8c3f2e1a4b5c6d7e8f901234567890",
      "last_seeded_at": null,
      "name": "Example.Movie.2024.1080p.BluRay.x264-COLA",
      "observed_seeding": false,
      "reason": null,
      "size_bytes": "8589934592",
      "torrent_id": 42
    }
  ],
  "min_plugin_version": "0.7.0",
  "revision": 12,
  "server_time": "2026-11-24T08:00:00Z"
}

错误:400 invalid_request;401 authentication_required、invalid_credentials;403 api_key_scope_denied、password_change_required、permission_denied;429 rate_limited;503 service_unavailable

保种组:上报下载器状态(插件) reportSeedGroupState

POST /api/v1/plugin/seed-group/state

范围 seedgroup;账号需要权限 member.basic;凭据 session、websiteApiKey

Facts from the member's downloader: the status and progress of each assignment the plugin manages, the read-only rate limits and the plugin version. Facts only — nothing here is rewarded. A released assignment the report no longer holds is recorded as removed. The X-Plugin-Instance header is required (400 invalid_request without it). A member who has not declared a capacity on the site is 409 state_conflict. Only members of the Seed Group may report. The plugin authenticates with the member's API key carrying the seedgroup scope; the member's own browser session works too.

参数位置类型必填说明
X-Plugin-InstanceheaderstringThe plugin instance id (shown to staff for troubleshooting). Required on the state report.

请求体(JSON):

字段类型必填说明
clientsobject[]是Read-only rate-limit readings, one per downloader. The plugin never changes a limit.
itemsobject[]是One entry per assigned info hash that is present in one of the plugin's downloaders. external = false: the plugin added it and manages it. external = true: the member already had the same torrent in the downloader (added by hand or by another tool); the plugin only reports it and never adds, retags or deletes it. A released (remove) assignment that is reported as external is closed as not_managed; one that is no longer reported is closed as deleted if the plugin last reported it as managed, otherwise as not_managed.
plugin_versionstring是

示例:

curl -X POST -H 'X-API-Key: <你的 Key>' -H 'Content-Type: application/json' -d '{"clients":[{"dl_kib":0,"name":"qb","readable":true,"up_kib":0}],"items":[{"external":false,"info_hash":"9270936b0d8c3f2e1a4b5c6d7e8f901234567890","progress":1,"status":"seeding"}],"plugin_version":"0.7.0"}' 'https://www.colapt.com/api/v1/plugin/seed-group/state'

响应 application/json:

字段类型总有说明
ok是
revisioninteger是
{
  "ok": true,
  "revision": 12
}

错误:400 invalid_request;401 authentication_required、invalid_credentials;403 api_key_scope_denied、origin_denied、password_change_required、permission_denied;409 state_conflict;413 payload_too_large;415 unsupported_media_type;429 rate_limited;503 service_unavailable

站内信(会话列表) listConversations

GET /api/v1/me/conversations

范围 read;账号需要权限 member.basic;凭据 session、websiteApiKey

The caller's conversations of one tab, most recent first. tab is personal (default) or system. q (at most 100 characters) keeps conversations whose title, a message the caller has not deleted (body or subject), or the counterpart's username (case-insensitive) contains it. with=<username> keeps only the personal conversation with that member (the deep link /account/messages/u/<username>; empty when there is none yet). A conversation the caller deleted is listed again once a newer message arrives. Unknown tab or an over-long q is 400 invalid_request with fields naming the parameter. unread=true lists only the conversations with unread messages (the unread-message feed of the open API).

参数位置类型必填说明
pagequeryinteger
page_sizequeryinteger
tabquerystring:personal / system
qquerystring
withquerystring
unreadquerybooleantrue keeps only conversations with a message the caller has not read (sent by someone else or the system); false only the ones without; omitted applies no filter.

示例:

curl -H 'X-API-Key: <你的 Key>' 'https://www.colapt.com/api/v1/me/conversations'

响应 application/json:

字段类型总有说明
itemsobject[]是
pageinteger是
page_sizeinteger是
totalinteger是
total_pagesinteger是
{
  "items": [
    {
      "counterpart": {
        "available": true,
        "avatar_url": null,
        "display_group": null,
        "id": 32,
        "level": null,
        "username": "flowuploader"
      },
      "created_at": "2026-01-02T00:00:00+00:00",
      "id": 7,
      "kind": "personal",
      "last_message": {
        "created_at": "2026-01-02T00:05:00+00:00",
        "excerpt": "**谢谢**,已经补上了。",
        "id": 12,
        "mine": false,
        "sender": {
          "avatar_url": null,
          "id": 32,
          "username": "member"
        },
        "subject": null
      },
      "last_message_at": "2026-01-02T00:05:00+00:00",
      "title": "关于字幕",
      "unread_count": 1
    }
  ],
  "page": 1,
  "page_size": 20,
  "total": 1,
  "total_pages": 1
}

错误:400 invalid_request;401 authentication_required、invalid_credentials;403 api_key_scope_denied、password_change_required、permission_denied;429 rate_limited;503 service_unavailable

我的做种 listMySeeding

GET /api/v1/me/seeding

范围 read;账号需要权限 member.basic;凭据 session、websiteApiKey

The torrents the caller is seeding right now (live peers with nothing left to fetch), each torrent once however many clients seed it, ascending by id, with its size and current seeders. total is the seeding count. It reads live peers, while personalStats.seeding reads the traffic projection first; the two agree up to one projection cycle. 503 when the tracker's peers cannot be read, never an empty list.

参数位置类型必填说明
pagequeryinteger
page_sizequeryinteger

示例:

curl -H 'X-API-Key: <你的 Key>' 'https://www.colapt.com/api/v1/me/seeding'

响应 application/json:

字段类型总有说明
itemsobject[]是
pageinteger是
page_sizeinteger是
totalinteger是
total_pagesinteger是Number of pages at this page_size: ceil(total / page_size), 0 when total is 0. Computed by the server; clients do not derive it.
{
  "items": [
    {
      "id": 42,
      "seeders": 7,
      "size_bytes": "8589934592"
    }
  ],
  "page": 1,
  "page_size": 25,
  "total": 1,
  "total_pages": 1
}

错误:400 invalid_request;401 authentication_required、invalid_credentials;403 api_key_scope_denied、password_change_required、permission_denied;429 rate_limited;503 service_unavailable

会员数据 personalStats

GET /api/v1/me/stats

范围 read;凭据 session、websiteApiKey

Only the current user; no user_id override. One call answers the member's numbers: who the member is (user, the UserRef with the stable numeric id; joined_at), billed and raw traffic (decimal strings), ratio, the points balance, the class name, seeding count and seeding bytes, and the unread message count. Projection timestamps expose freshness; no completed backend worker is implied by a zero account.

示例:

curl -H 'X-API-Key: <你的 Key>' 'https://www.colapt.com/api/v1/me/stats'

响应 application/json:

字段类型总有说明
billed_downloaded_bytesstring(十进制整数)是Unsigned decimal integer, serialized as a JSON string; bytes and measured counters are never floating-point.
billed_uploaded_bytesstring(十进制整数)是Unsigned decimal integer, serialized as a JSON string; bytes and measured counters are never floating-point.
class_namestring | null是等级名(等级阶梯上当前那一级的名字);从未定级时为 null。
completionsinteger是
joined_atstring(date-time)是账号注册(创建)的时间。
leechinginteger是
points_balancestring是瓶盖余额(与 pointsAccount.balance 同一个数,4 位小数字符串)。
projection_updated_atstring | null(date-time)是
ratiostring | null是Billed share ratio (billed_uploaded_bytes ÷ billed_downloaded_bytes) from internal/shareratio, 4 decimals; null (rendered as ∞) when nothing was billed as download, including 0/0 (data-units §2).
raw_downloaded_bytesstring(十进制整数)是Unsigned decimal integer, serialized as a JSON string; bytes and measured counters are never floating-point.
raw_uploaded_bytesstring(十进制整数)是Unsigned decimal integer, serialized as a JSON string; bytes and measured counters are never floating-point.
seedinginteger是
seeding_bytesstring(十进制整数)Total size in bytes of the torrents the caller is seeding right now, each torrent counted once however many clients seed it.
totals_updated_atstring(date-time)是
unread_messagesinteger是未读站内信条数:个人与系统会话里别人(或系统)发来、还没读的消息(与 getMessageSummary 的 personal + system 相同)。
userobject是调用者本人(UserRef:稳定的数字 id、当前用户名、头像)。MoviePilot 等外部程序以 id 认账号,用户名会随改名变化。
{
  "billed_downloaded_bytes": "0",
  "billed_uploaded_bytes": "9007199254740993",
  "class_name": null,
  "completions": 0,
  "joined_at": "2026-01-01T00:00:00Z",
  "leeching": 0,
  "points_balance": "1.0000",
  "projection_updated_at": null,
  "ratio": null,
  "raw_downloaded_bytes": "0",
  "raw_uploaded_bytes": "9007199254740993",
  "seeding": 0,
  "seeding_bytes": "0",
  "totals_updated_at": "2026-09-18T00:00:00Z",
  "unread_messages": 0,
  "user": {
    "avatar_url": null,
    "id": 7,
    "username": "synthetic_member"
  }
}

错误:400 invalid_request;401 authentication_required、invalid_credentials;403 api_key_scope_denied、password_change_required、permission_denied;429 rate_limited;503 service_unavailable

作品的字幕列表 listMediaSubtitles

GET /api/v1/media/{media_id}/subtitles

范围 read;账号需要权限 member.basic;凭据 session、websiteApiKey

外挂字幕 of a film, newest first (at most 200 active ones), with the upload limits, the reward and how much of today's reward the caller has used. Requires member.basic. Website-owned route: the handler enforces the permission.

参数位置类型必填说明
media_idpathstring是

示例:

curl -H 'X-API-Key: <你的 Key>' 'https://www.colapt.com/api/v1/media/rc7/subtitles'

响应 application/json:

字段类型总有说明
configobject是
itemsobject[]是
{
  "config": {
    "daily_bytes": "209715200",
    "daily_files": 20,
    "formats": [
      "srt",
      "ass",
      "ssa",
      "vtt",
      "sup",
      "zip"
    ],
    "max_binary_bytes": "31457280",
    "max_text_bytes": "5242880",
    "mode": "on",
    "owner_delete_hours": 24,
    "reward": 20,
    "reward_currency": "cola",
    "reward_daily_limit": 1,
    "reward_used_today": 0,
    "upload_enabled": true
  },
  "items": [
    {
      "anonymous": false,
      "can_delete": true,
      "created_at": "2026-10-21T04:00:00Z",
      "download_count": 3,
      "encoding": "utf-8",
      "episode_from": 5,
      "episode_to": 5,
      "format": "srt",
      "id": 1,
      "language": "zh_hans",
      "media_id": "rc7",
      "mine": true,
      "name": "Film.2024.chs.srt",
      "note": "校对版",
      "season": 1,
      "sha256": "0000000000000000000000000000000000000000000000000000000000000000",
      "size_bytes": "48213",
      "uploader": {
        "avatar_url": null,
        "id": 11,
        "username": "alice"
      }
    }
  ]
}

错误:400 invalid_request;401 authentication_required、invalid_credentials;403 api_key_scope_denied、password_change_required、permission_denied;404 not_found;429 rate_limited;503 service_unavailable

搜索与最新列表 listMedia

GET /api/v1/media

范围 read;账号需要权限 member.basic;凭据 session、websiteApiKey

Paginate groups, not torrents: default 25 groups and 8 matching versions each. Every version filter must match the same visible torrent. A movie appears only with at least one matching torrent, except under a keyword search (q) whose other filters all read the work (category, year, genre, country, douban_id, imdb_id): the works the keyword matches that have no visible torrent follow, as groups with visible_count 0 and no versions, exact title first. Counts exclude invisible resources. Unassociated torrents retain an independent torrent:<id> group with movie=null. Latest group order uses the newest visible published torrent (not only matching versions); stable group ID resolves ties. Unknown query keys and repeated scalar parameters return 400. Discovery only contains approved, fully published torrents; pending/rejected/withdrawn uploads appear in the owner or moderation queues. Search of release_name applies to associated and unassociated versions, using the same visible-version predicate as the embedded and paginated version lists. JSON response budget is 32 MiB; exceeding it returns 400 invalid_request without a partial JSON body. For lists, reduce page_size/version_limit. douban_id and imdb_id are exact canonical string filters on their direct columns and combine with AND; all version filters still match the same visible version. Series grouping and episode filters are computed over the full matching set. Complete means matching releases cover every episode of a known total; unknown totals remain null and complete remains false. A member may make 30 keyword searches (q) a minute that are not answered from the shared page cache; the next one is 429 rate_limited with Retry-After. Pages without a keyword are not limited. With an API key (x-open-api: read) the list answers as the key's member sees it. view=torrents with sort=latest and since is the incremental pull: each item carries the version's info_hash and promotion, and hit_and_run: whether downloading it now opens an H&R case for the caller.

参数位置类型必填说明
pagequeryinteger
page_sizequeryinteger
version_limitqueryinteger
sortquerystring:latest / title / year / size / seeders / leechers / completions / rating / imdb_rating / popularityrating, imdb_rating and popularity are view=works only. rating / imdb_rating list only works rated by enough people (Douban 1000 votes, IMDb 10000), best first; popularity needs shelf (TMDB popularity). Under view=works latest is the shelf's date, or without a shelf the newest visible release (works without one last).
qquerystringCase-insensitive title, original title, release name or year search; no regex syntax.
yearqueryinteger
genrequerystring[]类型:可多选(重复参数或逗号分隔),作品须同时含有全部所选类型。
resolutionquerystring:2160p / 1080p / 1080i / 720p / 576p / 576i / 480p / 480i
sourcequerystring
video_codecquerystring
hdrquerystring:SDR / 10bit / HDR10 / HDR10+ / HDR Vivid / HLG / Dolby Vision / Dolby Vision + HDR10 / Dolby Vision + HDR10+
audioquerystring
subtitlequerystring:zh / en / ja / otherOne subtitle language code; matches versions whose subtitles contain it. Any other value is 400 invalid_request.
seededquerybooleantrue requires a known seeders count greater than zero; missing observations never match.
version_sortquerystring:resolution / size / latestresolution: numeric resolution descending, then size descending, then stable ID; size: bytes descending then ID; latest: publication time descending then ID.
categoryquerystring:anime / movie / tv / variety / documentary / other[]分类:可多选,逗号分隔(category=movie,tv),作品的分类是所选之一即可;只选一个与以前的单值相同。
douban_idquerystringExact canonical ID match against the direct media column. Does not match legacy metadata_source or URLs. Both external ID filters are ANDed on the same media; unassociated groups do not match.
imdb_idquerystringExact canonical ID match against the direct media column. Does not match legacy metadata_source or URLs. Both external ID filters are ANDed on the same media; unassociated groups do not match.
directionquerystring:asc / descGlobal sort direction. Unknown values remain last. Group ranking uses its best matching torrent in the selected direction.
viewquerystring:media / torrents / series / workstorrents returns one matching torrent per group and paginates torrents globally; no sibling versions are included. works (the 影片 page) lists works rather than releases, with or without a visible release: each group carries the work, visible_count and matched_count (its visible releases) and no versions. Only the work's filters apply (category, year, genre, country) plus shelf, region and has_versions; any release filter, seeded, or a release sort is refused with 400. total is capped at 1000.
sincequerystring(date-time)Only versions published after this instant (RFC 3339, exclusive): the incremental pull of view=torrents. Combines with every other filter.
shelfquerystring:digital / physical / airing / premiere / endedview=works only: one of the TMDB shelves the site refreshes daily. digital 新上流媒体 (a digital release in the US or mainland China in the last 30 days), physical 新出原盘 (a disc release in the US, GB, DE, FR, JP, CA or AU in the last 60 days, or in the next 14 days when the site already has a visible 原盘 / Blu-ray Disc of the work), airing 正在热播, premiere 新剧开播 (the season premiered in the last 30 days), ended 近期完结 (the season's last episode in the last 14 days). Each group then carries shelf.
regionquerystring:CN / US / GB / JP / KRview=works with shelf airing, premiere or ended only: the show's origin country.
has_versionsquerybooleanview=works only: true lists only works with a visible release, false only works without one; absent lists both.
chartquerystring:movie_real_time_hotest / movie_weekly_best / movie_top250 / tv_real_time_hotest / tv_chinese_best_weekly / tv_global_best_weekly / netflix_movie / netflix_tv / tmdb_trending / bangumi_trending / bangumi_season / bangumi_topview=works only, not with shelf or a sort: one of the charts the site refreshes daily, in its own order. Douban's charts by their subject_collection (movie_real_time_hotest 实时热门电影, movie_weekly_best 一周口碑电影榜, movie_top250, tv_real_time_hotest, tv_chinese_best_weekly, tv_global_best_weekly), Netflix's global weekly Top 10 (netflix_movie, netflix_tv, English and non-English lists merged by views), TMDB's titles trending this week (tmdb_trending) and Bangumi's anime (bangumi_trending 近期热门, bangumi_season 本季新番 by how many are watching, bangumi_top the all-time ranking's first 100). An entry the site could not match to a work is left out, so positions can skip. Each group then carries chart. Douban's anime and variety charts were dropped in 17.81.0.
series_idqueryinteger
season_numberqueryinteger
episodequeryintegerVersions that contain this episode (tv and anime, not anime films): a single release of exactly this episode, a multiple release whose ranges cover it ("1-13,20" contains 5 and 20), or a complete season pack - by a stated range, by the work's known episode total, or, for a pack stating no range, also when the total is unknown. Combine with season_number for one season.
countryquerystring国家/地区:作品的 countries 含有该值(与 filter-options 返回的值逐字相同)。
officialquerybooleantrue keeps only releases marked 官方, false only the ones not marked; omitted applies no filter (the home page's 官方发布 shelf); in the work view a work lists only its official versions. Added in 17.73.0.
uploaderquerystringOnly releases published by this member: a username, compared case-insensitively like every username. Anonymous releases match only for a viewer who may see their uploader: the uploader themselves, and the observers who see anonymous releases on the member page (the review work group, an administrator with profile.inspect; never through an API key). Everyone else matches only the releases published under the name, and total, matched_count and facets are counted under the same rule, so they never reveal that hidden releases exist. An unknown or deleted account matches nothing (an empty list, not an error). Not allowed with view=works. Added in 32.2.0.
official_firstquerybooleanfalse turns off the 官方 tier, so works with a recent official release sit at their normal position (the home page's 最新入库, where those works have their own shelf). Paid pins still apply. Added in 17.73.0.

示例:

curl -H 'X-API-Key: <你的 Key>' 'https://www.colapt.com/api/v1/media'

响应 application/json:

字段类型总有说明
itemsobject[]是
pageinteger是
page_sizeinteger是
totalinteger是
total_pagesinteger是Number of pages at this page_size: ceil(total / page_size), 0 when total is 0. Computed by the server; clients do not derive it.
{
  "items": [
    {
      "best_promotion": null,
      "group_id": "media:201",
      "matched_count": 1,
      "media": {
        "actors": null,
        "alternate_titles": null,
        "category": "movie",
        "countries": null,
        "directors": null,
        "douban_id": null,
        "douban_rating": null,
        "douban_votes": null,
        "duration": null,
        "episode_count": null,
        "genres": [
          "drama"
        ],
        "imdb_id": null,
        "imdb_rating": null,
        "imdb_votes": null,
        "languages": null,
        "media_id": "rc201",
        "metadata_source": "douban",
        "metadata_source_id": "synthetic-coast-2026",
        "original_title": "Synthetic Coast",
        "poster_url": null,
        "release_dates": null,
        "revision": 1,
        "synopsis": "Synthetic fixture; no real users or licensed film metadata.",
        "title": "合成海岸",
        "writers": null,
        "year": 2026
      },
      "seeders_total": 2,
      "versions": [
        {
          "audio": [
            "zh",
            "en"
          ],
          "completions": 0,
          "created_at": "2026-09-18T00:00:00Z",
          "download_allowed": true,
          "download_denied_reason": null,
          "hdr": "HDR10",
          "id": 301,
          "leechers": 0,
          "media_id": "rc201",
          "projection_updated_at": "2026-09-18T00:00:00Z",
          "publication_stage": "published",
          "published_at": "2026-09-18T00:00:00Z",
          "release_name": "Synthetic.Coast.2026.2160p.WEB.HEVC",
          "resolution": "2160p",
          "revision": 1,
          "seeders": 2,
          "size_bytes": "9007199254740993",
          "source": "WEB-DL",
          "status": "approved",
          "submitted_at": null,
          "subtitles": [
            "zh"
          ],
          "video_codec": "HEVC"
        }
      ],
      "versions_page": 1,
      "versions_page_size": 8,
      "visible_count": 2
    },
    {
      "best_promotion": null,
      "group_id": "torrent:302",
      "matched_count": 1,
      "media": null,
      "seeders_total": 0,
      "versions": [
        {
          "audio": null,
          "completions": null,
          "created_at": "2026-09-18T00:00:00Z",
          "download_allowed": true,
          "download_denied_reason": null,
          "hdr": null,
          "id": 302,
          "leechers": null,
          "media_id": null,
          "projection_updated_at": null,
          "publication_stage": "published",
          "published_at": "2026-09-18T00:00:00Z",
          "release_name": "Synthetic.Metadata.Pending",
          "resolution": null,
          "revision": 1,
          "seeders": null,
          "size_bytes": "4096",
          "source": null,
          "status": "approved",
          "submitted_at": null,
          "subtitles": null,
          "video_codec": null
        }
      ],
      "versions_page": 1,
      "versions_page_size": 8,
      "visible_count": 1
    }
  ],
  "page": 1,
  "page_size": 25,
  "total": 2,
  "total_pages": 1
}

错误:400 invalid_request;401 authentication_required、invalid_credentials;403 api_key_scope_denied、password_change_required、permission_denied;404 not_found;429 rate_limited;503 service_unavailable

哈希反查(辅种) matchTorrentHashes

POST /api/v1/torrents/hashes

范围 read;账号需要权限 member.basic;凭据 session、websiteApiKey

Cross-seed lookup: client info hashes and content keys in, visible releases out (the browse page's visibility). A looked-up hash equal to a release's info_hash is reported with via=info_hash (the client already holds it); equal to its source_info_hash with via=source_info_hash (the same files from another source; this release is the one to add). A content key matches releases with the same file list. At most 500 of each per call; a malformed key is 400 invalid_request naming the list. One call costs one unit of the read budget (open_api_read_per_minute), however many keys it looks up. The same lookup as the frozen GET /api/v1/plugin/match.

请求体(JSON):

字段类型必填说明
content_keysstring[]Content keys (internal/contentkey: the file list's relative paths and sizes, 40 hex) of torrents the client holds.
info_hashesstring[]Info hashes the client holds (40 hex).

示例:

curl -X POST -H 'X-API-Key: <你的 Key>' -H 'Content-Type: application/json' -d '{"content_keys":[],"info_hashes":["9270936b0d8c3f2e1a4b5c6d7e8f901234567890"]}' 'https://www.colapt.com/api/v1/torrents/hashes'

响应 application/json:

字段类型总有说明
checkedinteger是Distinct info hashes looked up.
contentobject[]是Visible releases with the same files as a looked-up content key; confirm by name and size.
matchedobject[]是One row per (info hash, release) match; a release can answer two looked-up hashes.
unmatchedinteger是How many of them matched no visible release.
{
  "checked": 1,
  "content": [],
  "matched": [
    {
      "client_hash": "9270936b0d8c3f2e1a4b5c6d7e8f901234567890",
      "id": 42,
      "info_hash": "63d0bcd2aa8c3f2e1a4b5c6d7e8f901234567890",
      "published_at": "2026-11-20T08:00:00Z",
      "size_bytes": "8589934592",
      "source_info_hash": "9270936b0d8c3f2e1a4b5c6d7e8f901234567890",
      "via": "source_info_hash"
    }
  ],
  "unmatched": 0
}

错误:400 invalid_request;401 authentication_required、invalid_credentials;403 api_key_scope_denied、origin_denied、password_change_required、permission_denied;413 payload_too_large;415 unsupported_media_type;429 rate_limited;503 service_unavailable

种子详情 getTorrent

GET /api/v1/torrents/{id}

范围 read;凭据 session、websiteApiKey

Version metadata, full release name and original torrent file list. Members see approved published torrents and their own uploads; moderation permission grants review access. Invisible objects return 404. No credentials or storage paths are returned. JSON response budget is 32 MiB; exceeding it returns 400 invalid_request without a partial JSON body. For lists, reduce page_size/version_limit. submitted_at and publication_stage distinguish the owner draft from submitted review work; never infer submission from status=pending alone.

参数位置类型必填说明
idpathinteger是

示例:

curl -H 'X-API-Key: <你的 Key>' 'https://www.colapt.com/api/v1/torrents/42'

响应 application/json:

字段类型总有说明
actionsobject是What the viewer may do with this release right now, computed by the server from the operations' declared rules (keys, x-owner, x-field-permissions, x-machine) and the release's state machine — the same rules the handlers enforce. Per viewer, never cached across viewers; the UI renders it and never re-derives a server rule.
anonymousboolean是
audiostring[] | null是
completionsinteger | null是
created_atstring(date-time)是
descriptionstring | null是
download_allowedboolean是
download_denied_reasonstring | null是
filesobject[]是
gate_error_codestring:native_torrent_missing / native_receipt_unverified / native_gate_rejected / native_outcome_unknown | null
gate_phasestring:confirmed / pendingAuthoritative publication authorization confirmation. Missing is not proof of confirmation.
guard_credit_rationumber发种守护中期间「非发种人辅种」的计费倍率(当前策略值,默认 0.30;0 = 完全不计账,1 = 等同不保护)。徽标提示词从这里读,不写死;该倍率取代(不叠乘)其它上传促销。
hdrstring:SDR / 10bit / HDR10 / HDR10+ / HDR Vivid / HLG / Dolby Vision / Dolby Vision + HDR10 / Dolby Vision + HDR10+ | null是
hfr_fpsinteger | nullHigh frame rate: the video's frame rate rounded to the nearest 5 (59.94 -> 60, 44 -> 45), present only when the stored technical report states more than 40 fps; null/absent means the release is not HFR or no report was read. Persisted from the report when it is parsed, so the version list can render the HFR badge without re-reading the report.
idinteger是
info_hashstring是
leechersinteger | null是
media_idstring | null是
media_infostring | null是
moderation_reasonstring | null是
officialbooleanAdministrator-assigned official publication marker; absent legacy values are false.
precheckobject | null自动预审, present only when a reviewer (torrent.review) reads a pending submission; null when it could not be computed.
projection_updated_atstring(date-time) | null是Freshness of seeders/leechers only; durable completion totals have a separate source and may be known even when this is null.
promotionobject | null
promotion_refresh_atstring | null(date-time)
publication_stagestring:draft / submitted / published / rejected / withdrawn是pending with submitted_at=null is draft; pending with submission time is submitted. approved is published even for historical rows with submitted_at=null; rejected/withdrawn retain their status. File storage completion is separately represented by published_at.
published_atstring(date-time) | null是
publisherobject | object | object是
release_groupstring | null制作组;未知为 null
release_namestring是
release_scopenull | object | object | object | | 是The scope object is always structurally validated. If metadata leaves an associated media_id, scope must match its current Media.category immediately; movie or unknown category requires null. A non-null scope without a media association is allowed only when the locked pre-update resource is already pending and submitted_at=null (draft). A submitted pending or any non-pending resource cannot clear media_id and retain a non-null scope in the same write; this returns 400 invalid_request without mutation. Final submit must match the stored scope to the selected existing or newly created media category in the same transaction. No automatic episode parsing or provider fetch.
release_seasonsstring | nullThe seasons this release covers, for categories that store no publication range (movie, other). A single number, a range (1-3) or comma-separated segments (1,3-5); spaces are removed and an empty value is null. Display and search only: it never participates in release_scope validation, and a movie's release_scope must stay null.
removal_statestring:needs_reconciliation / cache_draining / force_deletable / confirmed | null
resolutionstring:2160p / 1080p / 1080i / 720p / 576p / 576i / 480p / 480i | null是
revisioninteger是
screenshotsstring(uri)[]是Legacy standalone screenshot URLs; optional for publication and no minimum count. Provided URLs retain validation and persistence. Images may instead be embedded in description BBCode.
seed_guardboolean发种守护中:tracker 此刻按 guard_credit_ratio 给非发种人的辅种上传计账(与内核计费同一规则:enforce 模式、发布不足配置的 window_hours、全站累计下载 < 体积 × 配置的 min_ratio、倍率 < 100%;任何一项未知都为 false)。display-only,本身不影响计费。
seed_rewardobject | null
seedersinteger | null是
site_revisioninteger是
site_write_state:idle / metadata_pending / submit_pending是
size_bytesstring(十进制整数)是Unsigned decimal integer, serialized as a JSON string; bytes and measured counters are never floating-point.
sourcestring:Blu-ray Disc / Remux / BDRip / Encode / WEB-DL / WEBRip / HDTV / TVRip / DVD / DVDRip | null是
source_info_hashstring | null是info hash of the bytes as uploaded, when publication rewrote `info` to give the torrent this site's identity; null when nothing was rewritten. The uploader's own file hashes to this value, so it is what an uploader can match an uncertain upload against — `info_hash` is what the site publishes and what the tracker resolves announces by.
statusstring:pending / approved / rejected / withdrawn / deleted是`deleted` was missing from TorrentVersion.status and TorrentDetail.status: the moderation list has always been able to emit it (a soft-deleted release is a row like any other), and with the deletion filter it is emitted on purpose, so the enum is corrected rather than left to describe a set the service does not produce. Nothing else about either schema changes, and no other operation's behaviour does.
submitted_atstring(date-time) | null是
subtitlestring | null种子副标题(选填)
subtitlesstring:zh / en / ja / other[] | null是The release's subtitle languages. null means unknown (nobody said and nothing was detected); [] means the release has no subtitles; otherwise the languages it has, unique. Writes may list them in any order; the server stores and returns them in the order zh, en, ja, other. Anything but these codes is refused with 400 invalid_request on field subtitles.
tagsstring:官方 / 分集 / 完结 / 原盘 / 1080P / 1080i / 4K / HDR / 杜比 / 国语 / 粤语 / 中字 / 英字 / 日字[]Server-derived display tags in canonical order: 官方, 分集, 完结, 原盘, 1080P, 1080i, 4K, HDR, 杜比, 国语, 粤语, 中字, 英字, 日字. 国语 and 粤语 are the audio languages the technical report states: each Audio track's Language and Title count (a BDInfo report's language column is read the same way), both tags are emitted when the report carries a Mandarin and a Cantonese track (or one track naming both), each appears at most once and 国语 comes before 粤语, and audio that states no language gets no tag. 原盘 marks a Blu-ray disc report (BDInfo) pasted into media_info instead of a MediaInfo file report, and its resolution, HDR, audio and subtitle languages are read from that report exactly as MediaInfo's are. The subtitle tags are one per stored subtitle language (zh 中字, en 英字, ja 日字; other has none); when subtitles are unknown (null) they are detected from the MediaInfo Text tracks, or from the BDInfo SUBTITLES section, instead. Never writable; media_info holds the uploader's technical report, either MediaInfo text or a BDInfo disc report. The resolution tag repeats the value the release states (metadata.resolution) whenever it names a tier — 2160 reads 4K, 1080i keeps its scan type, 1080p reads 1080P — because that is the value the upload form shows and the catalogue badge draws; only a release that states none is read from the technical report, where the picture size and the scan type decide (MediaInfo's Scan type, including HDR-adaptive MBAFF/PAFF, its store method and the disc caption in Title, or the BDInfo resolution token). The 720, 576 and 480 tiers draw no resolution tag. 1080P and 1080i are mutually exclusive: one release gets one of them.
video_codecstring | null是
viewer_is_ownerbooleanAuthoritative per-request ownership, including anonymous releases. Absent means false; does not reveal uploader identity or confer permission.
warningsobject[]Findings of the duplicate rules whose precheck setting is warn (see submitTorrent), in rule order. Present only on a write response when a rule found something and did not refuse it; omitted otherwise.
{
  "actions": {
    "can_delete": false,
    "can_edit_metadata": true,
    "can_mark_official": false,
    "can_purge": false,
    "can_remove": false,
    "can_review": false,
    "can_submit": false,
    "review_transitions": []
  },
  "anonymous": false,
  "audio": [
    "zh",
    "en"
  ],
  "completions": 0,
  "created_at": "2026-09-18T00:00:00Z",
  "description": null,
  "download_allowed": true,
  "download_denied_reason": null,
  "files": [
    {
      "ordinal": 0,
      "path": "Synthetic.Coast.mkv",
      "size_bytes": "9007199254740993"
    }
  ],
  "hdr": "HDR10",
  "id": 301,
  "info_hash": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
  "leechers": 0,
  "media_id": "rc201",
  "media_info": null,
  "moderation_reason": null,
  "projection_updated_at": "2026-09-18T00:00:00Z",
  "publication_stage": "published",
  "published_at": "2026-09-18T00:00:00Z",
  "publisher": {
    "state": "known",
    "user": {
      "avatar_url": null,
      "id": 1,
      "username": "synthetic"
    }
  },
  "release_name": "Synthetic.Coast.2026.2160p.WEB.HEVC",
  "release_scope": null,
  "resolution": "2160p",
  "revision": 1,
  "screenshots": [],
  "seeders": 2,
  "site_revision": 0,
  "site_write_state": "idle",
  "size_bytes": "9007199254740993",
  "source": "WEB-DL",
  "source_info_hash": null,
  "status": "approved",
  "submitted_at": null,
  "subtitles": [
    "zh"
  ],
  "video_codec": "HEVC"
}

错误:400 invalid_request;401 authentication_required、invalid_credentials;403 api_key_scope_denied、password_change_required、permission_denied;404 not_found;429 rate_limited;503 service_unavailable

下载字幕 downloadSubtitle

GET /api/v1/subtitles/{id}/download

范围 download;账号需要权限 torrent.download;凭据 session、websiteApiKey

Download a subtitle file. Requires torrent.download; free (no traffic, no 瓶盖). Always Content-Disposition: attachment with the original name in filename*, Content-Type application/octet-stream (application/zip for a pack), Cache-Control private, no-store, nosniff and a sandbox CSP. The download count goes up once per member.

参数位置类型必填说明
idpathinteger是

示例:

curl -H 'X-API-Key: <你的 Key>' 'https://www.colapt.com/api/v1/subtitles/42/download'

响应 application/octet-stream。

错误:400 invalid_request;401 authentication_required、invalid_credentials;403 api_key_scope_denied、password_change_required、permission_denied;404 not_found;410 gone;416 ;429 rate_limited;503 service_unavailable