> For the complete documentation index, see [llms.txt](https://scx.gitbook.io/sc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://scx.gitbook.io/sc/scp-docs/api-wen-dang/models.md).

# Models

## The APIResponse object

```json
{"openapi":"3.0.3","info":{"title":"SpeedCentre+ 用户 API","version":"1.0"},"components":{"schemas":{"APIResponse":{"properties":{"code":{"description":"0 表示成功；其他值表示业务错误码。","type":"integer"},"data":{"description":"返回载荷；成功时存在，部分错误会包含结构化详情。"},"message":{"type":"string"}},"type":"object"}}}}
```

## The InsufficientCreditData object

```json
{"openapi":"3.0.3","info":{"title":"SpeedCentre+ 用户 API","version":"1.0"},"components":{"schemas":{"InsufficientCreditData":{"description":"提交任务返回业务错误码 50001 时，若计费信息可用则返回该数据。","properties":{"remaining_credit":{"description":"当前套餐剩余积分。","format":"int64","type":"integer"},"required_credit":{"description":"本次任务需要的积分。","format":"int64","type":"integer"}},"required":["required_credit","remaining_credit"],"type":"object"}}}}
```

## The Backend object

```json
{"openapi":"3.0.3","info":{"title":"SpeedCentre+ 用户 API","version":"1.0"},"components":{"schemas":{"Backend":{"properties":{"allow_public_access":{"description":"该后端是否允许从 SpeedCentre+ Copilot 调用。","type":"boolean"},"client_id":{"description":"后端 ID。","type":"string"},"display_name":{"description":"后端显示名称。","type":"string"},"is_online":{"description":"后端是否在线。","type":"boolean"},"conn_pending":{"description":"连接任务队列中的任务数量。","format":"int32","type":"integer"},"speed_pending":{"description":"速度测试任务队列中的任务数量。","format":"int32","type":"integer"},"last_seen_ms":{"format":"int64","type":"integer"},"version":{"type":"string"}},"type":"object"}}}}
```

## The TaskRequestMatrixResponse object

```json
{"openapi":"3.0.3","info":{"title":"SpeedCentre+ 用户 API","version":"1.0"},"components":{"schemas":{"TaskRequestMatrixResponse":{"description":"单个测试矩阵结果，同 Miaospeed 的 MatrixResponse，Payload 类型根据 Type 字段而定。请参阅 Payload 字段的描述。\n","properties":{"Payload":{"description":"JSON 编码的指标结果。请按 `Type` 进行解析：\n- **SPEED_AVERAGE** → `{\"Value\": <bytes/s uint64>}`\n- **SPEED_MAX**     → `{\"Value\": <bytes/s uint64>}`\n- **SPEED_PER_SECOND** → `{\"Max\": <uint64>, \"Average\": <uint64>, \"Speeds\": [<uint64>, ...]}`\n- **UDP_TYPE**      → `{\"Value\": \"<string>\"}`  (e.g. `\"Full Cone\"`, `\"Unknown\"`)\n- **TEST_PING_CONN** → `{\"Value\": <ms uint16>}`  (HTTP connect ping)\n- **TEST_PING_RTT**  → `{\"Value\": <ms uint16>}`  (round-trip time)\n- **TEST_PING_MAX_RTT** → `{\"Value\": <ms uint16>}`  (max RTT across all probes)\n- **TEST_PING_TOTAL_CONN** → `{\"Value\": <ms uint16>}`  (total HTTP connect ping sum)\n- **TEST_PING_TOTAL_RTT** → `{\"Value\": <ms uint16>}`  (total RTT sum)\n- **TEST_PING_SD_RTT** → `{\"Value\": <float64>}`  (RTT standard deviation in ms)\n- **TEST_PING_SD_CONN** → `{\"Value\": <float64>}`  (HTTP connect standard deviation in ms)\n- **TEST_HTTP_CODE** → `{\"Values\": [<int>, ...]}`  (HTTP status codes observed)\n- **TEST_PING_PACKET_LOSS** → `{\"Value\": <float64>}`  (packet loss ratio 0.00 - 100.00)\n- **TEST_HIJACK_DETECTION** → `{\"SpeedIP\": \"<ip>\", \"RealIP\": \"<ip>\"}`  (SpeedIP == RealIP means no hijack)\n- **TEST_SCRIPT**   → `{\"Key\": \"<id>\", \"Text\": \"<result>\", \"Color\": \"<hex>\", \"Background\": \"<hex>\", \"TimeElapsed\": <ms>}` \n- **GEOIP_INBOUND** → See `MultiStacks` schema (inbound/client-side IP geo)\n- **GEOIP_OUTBOUND** → See `MultiStacks` schema (outbound/exit-node IP geo)\n- **TRACEROUTE** → See `TraceRouteDS` schema\n- **LONGCONN** → See `LongConnDS` schema\n","type":"string"},"Type":{"description":"矩阵类型标识。","$ref":"#/components/schemas/TaskRequestMatrixType"}},"type":"object"},"TaskRequestMatrixType":{"description":"矩阵类型标识。","enum":["SPEED_AVERAGE","SPEED_MAX","SPEED_PER_SECOND","UDP_TYPE","GEOIP_INBOUND","GEOIP_OUTBOUND","TEST_SCRIPT","TEST_PING_CONN","TEST_PING_RTT","TRACEROUTE","LONGCONN","TEST_PING_MAX_RTT","TEST_PING_TOTAL_CONN","TEST_PING_TOTAL_RTT","TEST_PING_SD_RTT","TEST_PING_SD_CONN","TEST_HTTP_CODE","TEST_PING_PACKET_LOSS","TEST_HIJACK_DETECTION","INVALID"],"type":"string"}}}}
```

## The TaskRequestMatrixType object

```json
{"openapi":"3.0.3","info":{"title":"SpeedCentre+ 用户 API","version":"1.0"},"components":{"schemas":{"TaskRequestMatrixType":{"description":"矩阵类型标识。","enum":["SPEED_AVERAGE","SPEED_MAX","SPEED_PER_SECOND","UDP_TYPE","GEOIP_INBOUND","GEOIP_OUTBOUND","TEST_SCRIPT","TEST_PING_CONN","TEST_PING_RTT","TRACEROUTE","LONGCONN","TEST_PING_MAX_RTT","TEST_PING_TOTAL_CONN","TEST_PING_TOTAL_RTT","TEST_PING_SD_RTT","TEST_PING_SD_CONN","TEST_HTTP_CODE","TEST_PING_PACKET_LOSS","TEST_HIJACK_DETECTION","INVALID"],"type":"string"}}}}
```

## The MultiStacks object

```json
{"openapi":"3.0.3","info":{"title":"SpeedCentre+ 用户 API","version":"1.0"},"components":{"schemas":{"MultiStacks":{"type":"object","description":"多重 IP 堆栈的 GeoIP 信息。用于表示一个节点可能具有多个出口 IP 的情况（例如双栈 IPv4 + IPv6）。\n","properties":{"Domain":{"type":"string","description":"域名组，GEOIP_INBOUND 中显示为入口的域名（如果可用）或者 IP，GEOIP_OUTBOUND 中显示为节点名称。"},"MainStack":{"allOf":[{"$ref":"#/components/schemas/GeoInfo"}],"nullable":true,"description":"主 IP 堆栈，在有 IPv4 时优先显示 IPv4。"},"IPv4Stack":{"type":"array","items":{"$ref":"#/components/schemas/GeoInfo"},"description":"IPv4 的 GeoInfo 列表。"},"IPv6Stack":{"type":"array","items":{"$ref":"#/components/schemas/GeoInfo"},"description":"IPv6 的 GeoInfo 列表。"}}},"GeoInfo":{"type":"object","description":"单个 IP 地址的地理位置信息记录，信息格式可能会因使用的 IP 脚本而异。","properties":{"organization":{"type":"string"},"longitude":{"type":"number","format":"float"},"latitude":{"type":"number","format":"float"},"timezone":{"type":"string"},"isp":{"type":"string"},"asn":{"type":"integer"},"asn_organization":{"type":"string"},"country":{"type":"string"},"ip":{"type":"string"},"continent_code":{"type":"string"},"country_code":{"type":"string"},"country_name_zh":{"type":"string"},"stackType":{"type":"string"}}}}}}
```

## The GeoInfo object

```json
{"openapi":"3.0.3","info":{"title":"SpeedCentre+ 用户 API","version":"1.0"},"components":{"schemas":{"GeoInfo":{"type":"object","description":"单个 IP 地址的地理位置信息记录，信息格式可能会因使用的 IP 脚本而异。","properties":{"organization":{"type":"string"},"longitude":{"type":"number","format":"float"},"latitude":{"type":"number","format":"float"},"timezone":{"type":"string"},"isp":{"type":"string"},"asn":{"type":"integer"},"asn_organization":{"type":"string"},"country":{"type":"string"},"ip":{"type":"string"},"continent_code":{"type":"string"},"country_code":{"type":"string"},"country_name_zh":{"type":"string"},"stackType":{"type":"string"}}}}}}
```

## The LongConnDS object

```json
{"openapi":"3.0.3","info":{"title":"SpeedCentre+ 用户 API","version":"1.0"},"components":{"schemas":{"LongConnDS":{"type":"object","description":"长连接测试结果数据结构。","properties":{"RTTs":{"type":"array","items":{"type":"number","format":"float"},"description":"每次成功请求的 RTT 列表，单位毫秒。"},"RTTAvg":{"type":"number","format":"float","description":"平均 RTT，单位毫秒。"},"RTTJitter":{"type":"number","format":"float","description":"RTT 的平均绝对偏差，单位毫秒。"},"ReconnectCount":{"type":"integer","format":"uint32","description":"新建立的 TCP 连接数量。"},"ReconnectAvgMs":{"type":"number","format":"float","description":"建立新连接的平均时间，单位毫秒。"},"ConnAvgAliveMs":{"type":"number","format":"float","description":"每个连接的平均存活时间，单位毫秒。"},"TotalRequests":{"type":"integer","format":"uint32","description":"总请求数量。"},"FailedRequests":{"type":"integer","format":"uint32","description":"失败请求数量。"}}}}}}
```

## The TraceRouteHop object

```json
{"openapi":"3.0.3","info":{"title":"SpeedCentre+ 用户 API","version":"1.0"},"components":{"schemas":{"TraceRouteHop":{"type":"object","description":"单个 TTL 级别的 traceroute 运行结果。","properties":{"ttl":{"type":"integer","description":"TTL 级别 (从 1 开始)。"},"ip":{"type":"string","description":"响应跳点的 IP 地址（超时时为空）。"},"rtts":{"type":"array","items":{"type":"number","format":"float"},"description":"每个探测的往返时间，单位毫秒。-1 表示超时。"},"loss":{"type":"number","format":"float","description":"该跳点的丢包率 (0.0–1.0)。"},"geo":{"$ref":"#/components/schemas/GeoInfo","description":"该跳点的 GeoIP 数据。私有/超时跳点为 null。"},"flags":{"type":"array","items":{"type":"string","enum":["destination","net-unreachable","host-unreachable","admin-prohibited","unreachable"]},"description":"条件标志列表。"}}},"GeoInfo":{"type":"object","description":"单个 IP 地址的地理位置信息记录，信息格式可能会因使用的 IP 脚本而异。","properties":{"organization":{"type":"string"},"longitude":{"type":"number","format":"float"},"latitude":{"type":"number","format":"float"},"timezone":{"type":"string"},"isp":{"type":"string"},"asn":{"type":"integer"},"asn_organization":{"type":"string"},"country":{"type":"string"},"ip":{"type":"string"},"continent_code":{"type":"string"},"country_code":{"type":"string"},"country_name_zh":{"type":"string"},"stackType":{"type":"string"}}}}}}
```

## The TraceRouteDS object

```json
{"openapi":"3.0.3","info":{"title":"SpeedCentre+ 用户 API","version":"1.0"},"components":{"schemas":{"TraceRouteDS":{"type":"object","description":"完整的 traceroute 结果。TRACEROUTE 矩阵的解码负载。","properties":{"target":{"type":"string","description":"代理节点的解析入口地址 (IPv4)。"},"hops":{"type":"array","items":{"$ref":"#/components/schemas/TraceRouteHop"},"description":"从从属节点到目标节点的有序跳点列表。"},"completed":{"type":"boolean","description":"如果到达目标节点，则为 True。"},"max_hops":{"type":"integer","description":"此运行使用的最大跳数限制。"}}},"TraceRouteHop":{"type":"object","description":"单个 TTL 级别的 traceroute 运行结果。","properties":{"ttl":{"type":"integer","description":"TTL 级别 (从 1 开始)。"},"ip":{"type":"string","description":"响应跳点的 IP 地址（超时时为空）。"},"rtts":{"type":"array","items":{"type":"number","format":"float"},"description":"每个探测的往返时间，单位毫秒。-1 表示超时。"},"loss":{"type":"number","format":"float","description":"该跳点的丢包率 (0.0–1.0)。"},"geo":{"$ref":"#/components/schemas/GeoInfo","description":"该跳点的 GeoIP 数据。私有/超时跳点为 null。"},"flags":{"type":"array","items":{"type":"string","enum":["destination","net-unreachable","host-unreachable","admin-prohibited","unreachable"]},"description":"条件标志列表。"}}},"GeoInfo":{"type":"object","description":"单个 IP 地址的地理位置信息记录，信息格式可能会因使用的 IP 脚本而异。","properties":{"organization":{"type":"string"},"longitude":{"type":"number","format":"float"},"latitude":{"type":"number","format":"float"},"timezone":{"type":"string"},"isp":{"type":"string"},"asn":{"type":"integer"},"asn_organization":{"type":"string"},"country":{"type":"string"},"ip":{"type":"string"},"continent_code":{"type":"string"},"country_code":{"type":"string"},"country_name_zh":{"type":"string"},"stackType":{"type":"string"}}}}}}
```

## The PagedTaskResponse object

```json
{"openapi":"3.0.3","info":{"title":"SpeedCentre+ 用户 API","version":"1.0"},"components":{"schemas":{"PagedTaskResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TaskStatus"},"type":"array"},"page":{"format":"int32","type":"integer"},"page_size":{"format":"int32","type":"integer"},"total":{"format":"int64","type":"integer"}},"type":"object"},"TaskStatus":{"properties":{"completed_at":{"description":"任务完成时间。未完成的任务该字段为 null。","format":"date-time","type":"string"},"completed_nodes":{"description":"当前已完成测试的节点数量。","format":"int32","type":"integer"},"created_at":{"description":"任务创建时间。","format":"date-time","type":"string"},"credit_cost":{"description":"任务消耗的积分数量。","format":"int64","type":"integer"},"duration_ms":{"description":"任务持续时间，单位毫秒。","format":"int64","type":"integer"},"error_msg":{"description":"任务失败时的错误信息。","type":"string"},"macros":{"description":"任务使用的测试宏列表，详情请查看任务定义。","items":{"type":"string","enum":["SPEED","PING","UDP","SCRIPT","GEO","TRACEROUTE","LONGCONN","HIJACK","INVALID"]},"type":"array"},"name":{"description":"人类可读的任务名称。","type":"string"},"node_count":{"description":"任务包含的节点数量。","format":"int32","type":"integer"},"runner_completed_at_ms":{"description":"任务完成时间，Unix 时间戳，单位毫秒。","format":"int64","type":"integer"},"runner_created_at_ms":{"description":"任务创建时间，Unix 时间戳，单位毫秒。","format":"int64","type":"integer"},"runner_started_at_ms":{"description":"任务开始时间，Unix 时间戳，单位毫秒。","format":"int64","type":"integer"},"service_type":{"description":"调用任务的套餐类型。","type":"string"},"slave_id":{"description":"执行该任务的后端 ID。","type":"string"},"slave_name":{"description":"执行该任务的后端显示名称。","type":"string"},"started_at":{"description":"任务开始时间。","format":"date-time","type":"string"},"status":{"enum":["pending","running","completed","failed","canceled","unspecified"],"type":"string"},"task_id":{"format":"uuid","type":"string"},"type":{"type":"string"},"user_id":{"format":"int64","type":"integer"}},"type":"object"}}}}
```

## The Profile object

```json
{"openapi":"3.0.3","info":{"title":"SpeedCentre+ 用户 API","version":"1.0"},"components":{"schemas":{"Profile":{"properties":{"created_at":{"format":"date-time","type":"string"},"is_active":{"type":"boolean"},"name":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"url":{"type":"string"},"user_id":{"format":"int64","type":"integer"},"uuid":{"format":"uuid","type":"string"}},"type":"object"}}}}
```

## The ProfileConfigQuotaDTO object

```json
{"openapi":"3.0.3","info":{"title":"SpeedCentre+ 用户 API","version":"1.0"},"components":{"schemas":{"ProfileConfigQuotaDTO":{"description":"当前用户的节点订阅配置容量。","properties":{"current_count":{"description":"当前用户拥有的未删除订阅配置数量，包括已停用配置。","format":"int64","minimum":0,"type":"integer"},"max_count":{"description":"最大订阅数量。无限额或未启用订阅管理时为 0。","format":"int64","minimum":0,"type":"integer"},"profile_management_enabled":{"description":"订阅管理功能是否可用。","type":"boolean"},"remaining_count":{"description":"还可添加的配置数量。无限额或未启用订阅管理时为 0。","format":"int64","minimum":0,"type":"integer"},"unlimited":{"description":"是否已启用订阅管理且有效配置限额为无限。","type":"boolean"}},"required":["max_count","current_count","remaining_count","unlimited","profile_management_enabled"],"type":"object"}}}}
```

## The TaskRequestProxyInfo object

```json
{"openapi":"3.0.3","info":{"title":"SpeedCentre+ 用户 API","version":"1.0"},"components":{"schemas":{"TaskRequestProxyInfo":{"description":"节点信息，同 Miaospeed 的 ProxyInfo。","properties":{"Address":{"description":"节点地址，格式 host:port。","type":"string"},"Name":{"description":"节点名称。","type":"string"},"Type":{"description":"代理协议类型。以下是 SpeedCentre+ 目前支持测试的节点协议。","enum":["Shadowsocks","ShadowsocksR","Snell","Socks5","Http","Vmess","Trojan","Vless","Hysteria","Hysteria2","Tuic","Wireguard","AnyTLS","Mieru"],"type":"string"}},"type":"object"}}}}
```

## The TaskRequestEntrySlot object

```json
{"openapi":"3.0.3","info":{"title":"SpeedCentre+ 用户 API","version":"1.0"},"components":{"schemas":{"TaskRequestEntrySlot":{"description":"单个代理节点的测试结果，同 Miaospeed 的 SlaveEntrySlot。","properties":{"Grouping":{"description":"可选的节点分组标签。","type":"string"},"InvokeDuration":{"description":"该节点测试总耗时，单位毫秒。","format":"int64","type":"integer"},"Matrices":{"description":"与原始请求顺序一致的矩阵结果列表，同 Miaospeed 的 []MatrixResponse。","items":{"$ref":"#/components/schemas/TaskRequestMatrixResponse"},"type":"array"},"ProxyInfo":{"$ref":"#/components/schemas/TaskRequestProxyInfo"}},"type":"object"},"TaskRequestMatrixResponse":{"description":"单个测试矩阵结果，同 Miaospeed 的 MatrixResponse，Payload 类型根据 Type 字段而定。请参阅 Payload 字段的描述。\n","properties":{"Payload":{"description":"JSON 编码的指标结果。请按 `Type` 进行解析：\n- **SPEED_AVERAGE** → `{\"Value\": <bytes/s uint64>}`\n- **SPEED_MAX**     → `{\"Value\": <bytes/s uint64>}`\n- **SPEED_PER_SECOND** → `{\"Max\": <uint64>, \"Average\": <uint64>, \"Speeds\": [<uint64>, ...]}`\n- **UDP_TYPE**      → `{\"Value\": \"<string>\"}`  (e.g. `\"Full Cone\"`, `\"Unknown\"`)\n- **TEST_PING_CONN** → `{\"Value\": <ms uint16>}`  (HTTP connect ping)\n- **TEST_PING_RTT**  → `{\"Value\": <ms uint16>}`  (round-trip time)\n- **TEST_PING_MAX_RTT** → `{\"Value\": <ms uint16>}`  (max RTT across all probes)\n- **TEST_PING_TOTAL_CONN** → `{\"Value\": <ms uint16>}`  (total HTTP connect ping sum)\n- **TEST_PING_TOTAL_RTT** → `{\"Value\": <ms uint16>}`  (total RTT sum)\n- **TEST_PING_SD_RTT** → `{\"Value\": <float64>}`  (RTT standard deviation in ms)\n- **TEST_PING_SD_CONN** → `{\"Value\": <float64>}`  (HTTP connect standard deviation in ms)\n- **TEST_HTTP_CODE** → `{\"Values\": [<int>, ...]}`  (HTTP status codes observed)\n- **TEST_PING_PACKET_LOSS** → `{\"Value\": <float64>}`  (packet loss ratio 0.00 - 100.00)\n- **TEST_HIJACK_DETECTION** → `{\"SpeedIP\": \"<ip>\", \"RealIP\": \"<ip>\"}`  (SpeedIP == RealIP means no hijack)\n- **TEST_SCRIPT**   → `{\"Key\": \"<id>\", \"Text\": \"<result>\", \"Color\": \"<hex>\", \"Background\": \"<hex>\", \"TimeElapsed\": <ms>}` \n- **GEOIP_INBOUND** → See `MultiStacks` schema (inbound/client-side IP geo)\n- **GEOIP_OUTBOUND** → See `MultiStacks` schema (outbound/exit-node IP geo)\n- **TRACEROUTE** → See `TraceRouteDS` schema\n- **LONGCONN** → See `LongConnDS` schema\n","type":"string"},"Type":{"description":"矩阵类型标识。","$ref":"#/components/schemas/TaskRequestMatrixType"}},"type":"object"},"TaskRequestMatrixType":{"description":"矩阵类型标识。","enum":["SPEED_AVERAGE","SPEED_MAX","SPEED_PER_SECOND","UDP_TYPE","GEOIP_INBOUND","GEOIP_OUTBOUND","TEST_SCRIPT","TEST_PING_CONN","TEST_PING_RTT","TRACEROUTE","LONGCONN","TEST_PING_MAX_RTT","TEST_PING_TOTAL_CONN","TEST_PING_TOTAL_RTT","TEST_PING_SD_RTT","TEST_PING_SD_CONN","TEST_HTTP_CODE","TEST_PING_PACKET_LOSS","TEST_HIJACK_DETECTION","INVALID"],"type":"string"},"TaskRequestProxyInfo":{"description":"节点信息，同 Miaospeed 的 ProxyInfo。","properties":{"Address":{"description":"节点地址，格式 host:port。","type":"string"},"Name":{"description":"节点名称。","type":"string"},"Type":{"description":"代理协议类型。以下是 SpeedCentre+ 目前支持测试的节点协议。","enum":["Shadowsocks","ShadowsocksR","Snell","Socks5","Http","Vmess","Trojan","Vless","Hysteria","Hysteria2","Tuic","Wireguard","AnyTLS","Mieru"],"type":"string"}},"type":"object"}}}}
```

## The TaskRequest object

```json
{"openapi":"3.0.3","info":{"title":"SpeedCentre+ 用户 API","version":"1.0"},"components":{"schemas":{"TaskRequest":{"description":"任务请求，同 Miaospeed 的 SlaveRequest。\n","properties":{"Basics":{"$ref":"#/components/schemas/TaskRequestBasics"},"Configs":{"$ref":"#/components/schemas/TaskRequestConfigs"},"Nodes":{"items":{"$ref":"#/components/schemas/Node"},"type":"array"},"Options":{"$ref":"#/components/schemas/TaskRequestOptions"},"Vendor":{"type":"string"}},"type":"object"},"TaskRequestBasics":{"description":"任务基本信息，同 Miaospeed 的 SlaveRequestBasics","properties":{"ID":{"type":"string"},"Invoker":{"type":"string"},"Slave":{"type":"string"},"SlaveName":{"type":"string"},"Version":{"type":"string"},"Weight":{"description":"任务优先级，由您发起任务的套餐决定，优先级越高的任务在后端繁忙时运行的更快。","type":"integer"}},"type":"object"},"TaskRequestConfigs":{"description":"测试配置项。兼容 Miaospeed 的 SlaveRequestConfigs。","properties":{"Scripts":{"description":"脚本库，可在 TEST_SCRIPT Matrix 中或者在 GeoIP 测试中调用。","items":{"properties":{"ID":{"description":"脚本唯一标识。在脚本类型为 media 时须与矩阵项中的 Params 对应。","type":"string"},"content":{"description":"在引擎内执行的 JavaScript 源码。详情请查看脚本教程。","type":"string"},"timeout":{"description":"执行超时时间，单位毫秒。","format":"int64","type":"integer"},"type":{"description":"脚本类型：media（流媒体解锁）或 ip（IP 信息查询），详情请查看脚本教程。","enum":["media","ip"],"type":"string"}},"type":"object"},"type":"array"},"dnsServers":{"items":{"type":"string"},"type":"array"},"downloadDuration":{"description":"测速时长，单位秒。","format":"int64","type":"integer"},"downloadThreading":{"description":"测速线程数。","type":"integer"},"downloadURL":{"type":"string"},"pingAddress":{"type":"string"},"pingAverageOver":{"description":"参与均值计算的 Ping 次数。","type":"integer"},"stunURL":{"type":"string"},"taskRetry":{"type":"integer"},"tracerouteMaxHops":{"description":"Traceroute 最大跳数。默认值：30。","type":"integer"},"tracerouteProbesPerHop":{"description":"每一跳的探测次数。默认值：3。","type":"integer"},"tracerouteTimeout":{"description":"每一跳探测超时，单位秒。0 表示使用全局任务超时。","type":"integer"}},"type":"object"},"Node":{"description":"测试请求中提交的节点。","properties":{"Name":{"type":"string"},"Payload":{"description":"Clash YAML 类型的代理信息","type":"string"}},"type":"object"},"TaskRequestOptions":{"description":"请求中包含的矩阵选择与过滤选项。","properties":{"Filter":{"description":"节点名称过滤正则。API 不负责对节点进行过滤操作","type":"string"},"Matrices":{"description":"测试矩阵列表。","items":{"$ref":"#/components/schemas/TaskRequestMatrixEntry"},"type":"array"}},"type":"object"},"TaskRequestMatrixEntry":{"description":"单个请求的测试矩阵项。","properties":{"Params":{"description":"矩阵参数，在 TEST_SCRIPT 类型的 Matrix 中代表要使用的脚本 ID。","type":"string"},"Type":{"description":"矩阵类型。","$ref":"#/components/schemas/TaskRequestMatrixType","type":"string"}},"type":"object"},"TaskRequestMatrixType":{"description":"矩阵类型标识。","enum":["SPEED_AVERAGE","SPEED_MAX","SPEED_PER_SECOND","UDP_TYPE","GEOIP_INBOUND","GEOIP_OUTBOUND","TEST_SCRIPT","TEST_PING_CONN","TEST_PING_RTT","TRACEROUTE","LONGCONN","TEST_PING_MAX_RTT","TEST_PING_TOTAL_CONN","TEST_PING_TOTAL_RTT","TEST_PING_SD_RTT","TEST_PING_SD_CONN","TEST_HTTP_CODE","TEST_PING_PACKET_LOSS","TEST_HIJACK_DETECTION","INVALID"],"type":"string"}}}}
```

## The TaskRequestBasics object

```json
{"openapi":"3.0.3","info":{"title":"SpeedCentre+ 用户 API","version":"1.0"},"components":{"schemas":{"TaskRequestBasics":{"description":"任务基本信息，同 Miaospeed 的 SlaveRequestBasics","properties":{"ID":{"type":"string"},"Invoker":{"type":"string"},"Slave":{"type":"string"},"SlaveName":{"type":"string"},"Version":{"type":"string"},"Weight":{"description":"任务优先级，由您发起任务的套餐决定，优先级越高的任务在后端繁忙时运行的更快。","type":"integer"}},"type":"object"}}}}
```

## The TaskRequestConfigs object

```json
{"openapi":"3.0.3","info":{"title":"SpeedCentre+ 用户 API","version":"1.0"},"components":{"schemas":{"TaskRequestConfigs":{"description":"测试配置项。兼容 Miaospeed 的 SlaveRequestConfigs。","properties":{"Scripts":{"description":"脚本库，可在 TEST_SCRIPT Matrix 中或者在 GeoIP 测试中调用。","items":{"properties":{"ID":{"description":"脚本唯一标识。在脚本类型为 media 时须与矩阵项中的 Params 对应。","type":"string"},"content":{"description":"在引擎内执行的 JavaScript 源码。详情请查看脚本教程。","type":"string"},"timeout":{"description":"执行超时时间，单位毫秒。","format":"int64","type":"integer"},"type":{"description":"脚本类型：media（流媒体解锁）或 ip（IP 信息查询），详情请查看脚本教程。","enum":["media","ip"],"type":"string"}},"type":"object"},"type":"array"},"dnsServers":{"items":{"type":"string"},"type":"array"},"downloadDuration":{"description":"测速时长，单位秒。","format":"int64","type":"integer"},"downloadThreading":{"description":"测速线程数。","type":"integer"},"downloadURL":{"type":"string"},"pingAddress":{"type":"string"},"pingAverageOver":{"description":"参与均值计算的 Ping 次数。","type":"integer"},"stunURL":{"type":"string"},"taskRetry":{"type":"integer"},"tracerouteMaxHops":{"description":"Traceroute 最大跳数。默认值：30。","type":"integer"},"tracerouteProbesPerHop":{"description":"每一跳的探测次数。默认值：3。","type":"integer"},"tracerouteTimeout":{"description":"每一跳探测超时，单位秒。0 表示使用全局任务超时。","type":"integer"}},"type":"object"}}}}
```

## The TaskRequestMatrixEntry object

```json
{"openapi":"3.0.3","info":{"title":"SpeedCentre+ 用户 API","version":"1.0"},"components":{"schemas":{"TaskRequestMatrixEntry":{"description":"单个请求的测试矩阵项。","properties":{"Params":{"description":"矩阵参数，在 TEST_SCRIPT 类型的 Matrix 中代表要使用的脚本 ID。","type":"string"},"Type":{"description":"矩阵类型。","$ref":"#/components/schemas/TaskRequestMatrixType","type":"string"}},"type":"object"},"TaskRequestMatrixType":{"description":"矩阵类型标识。","enum":["SPEED_AVERAGE","SPEED_MAX","SPEED_PER_SECOND","UDP_TYPE","GEOIP_INBOUND","GEOIP_OUTBOUND","TEST_SCRIPT","TEST_PING_CONN","TEST_PING_RTT","TRACEROUTE","LONGCONN","TEST_PING_MAX_RTT","TEST_PING_TOTAL_CONN","TEST_PING_TOTAL_RTT","TEST_PING_SD_RTT","TEST_PING_SD_CONN","TEST_HTTP_CODE","TEST_PING_PACKET_LOSS","TEST_HIJACK_DETECTION","INVALID"],"type":"string"}}}}
```

## The Node object

```json
{"openapi":"3.0.3","info":{"title":"SpeedCentre+ 用户 API","version":"1.0"},"components":{"schemas":{"Node":{"description":"测试请求中提交的节点。","properties":{"Name":{"type":"string"},"Payload":{"description":"Clash YAML 类型的代理信息","type":"string"}},"type":"object"}}}}
```

## The TaskRequestOptions object

```json
{"openapi":"3.0.3","info":{"title":"SpeedCentre+ 用户 API","version":"1.0"},"components":{"schemas":{"TaskRequestOptions":{"description":"请求中包含的矩阵选择与过滤选项。","properties":{"Filter":{"description":"节点名称过滤正则。API 不负责对节点进行过滤操作","type":"string"},"Matrices":{"description":"测试矩阵列表。","items":{"$ref":"#/components/schemas/TaskRequestMatrixEntry"},"type":"array"}},"type":"object"},"TaskRequestMatrixEntry":{"description":"单个请求的测试矩阵项。","properties":{"Params":{"description":"矩阵参数，在 TEST_SCRIPT 类型的 Matrix 中代表要使用的脚本 ID。","type":"string"},"Type":{"description":"矩阵类型。","$ref":"#/components/schemas/TaskRequestMatrixType","type":"string"}},"type":"object"},"TaskRequestMatrixType":{"description":"矩阵类型标识。","enum":["SPEED_AVERAGE","SPEED_MAX","SPEED_PER_SECOND","UDP_TYPE","GEOIP_INBOUND","GEOIP_OUTBOUND","TEST_SCRIPT","TEST_PING_CONN","TEST_PING_RTT","TRACEROUTE","LONGCONN","TEST_PING_MAX_RTT","TEST_PING_TOTAL_CONN","TEST_PING_TOTAL_RTT","TEST_PING_SD_RTT","TEST_PING_SD_CONN","TEST_HTTP_CODE","TEST_PING_PACKET_LOSS","TEST_HIJACK_DETECTION","INVALID"],"type":"string"}}}}
```

## The Task object

```json
{"openapi":"3.0.3","info":{"title":"SpeedCentre+ 用户 API","version":"1.0"},"components":{"schemas":{"Task":{"description":"完整的测试结果数据结构。同 Miaospeed 的 SlaveTask。\n","properties":{"Request":{"$ref":"#/components/schemas/TaskRequest","description":"原始测试请求。"},"Results":{"description":"节点测试结果。","items":{"$ref":"#/components/schemas/TaskRequestEntrySlot"},"type":"array"}},"type":"object"},"TaskRequest":{"description":"任务请求，同 Miaospeed 的 SlaveRequest。\n","properties":{"Basics":{"$ref":"#/components/schemas/TaskRequestBasics"},"Configs":{"$ref":"#/components/schemas/TaskRequestConfigs"},"Nodes":{"items":{"$ref":"#/components/schemas/Node"},"type":"array"},"Options":{"$ref":"#/components/schemas/TaskRequestOptions"},"Vendor":{"type":"string"}},"type":"object"},"TaskRequestBasics":{"description":"任务基本信息，同 Miaospeed 的 SlaveRequestBasics","properties":{"ID":{"type":"string"},"Invoker":{"type":"string"},"Slave":{"type":"string"},"SlaveName":{"type":"string"},"Version":{"type":"string"},"Weight":{"description":"任务优先级，由您发起任务的套餐决定，优先级越高的任务在后端繁忙时运行的更快。","type":"integer"}},"type":"object"},"TaskRequestConfigs":{"description":"测试配置项。兼容 Miaospeed 的 SlaveRequestConfigs。","properties":{"Scripts":{"description":"脚本库，可在 TEST_SCRIPT Matrix 中或者在 GeoIP 测试中调用。","items":{"properties":{"ID":{"description":"脚本唯一标识。在脚本类型为 media 时须与矩阵项中的 Params 对应。","type":"string"},"content":{"description":"在引擎内执行的 JavaScript 源码。详情请查看脚本教程。","type":"string"},"timeout":{"description":"执行超时时间，单位毫秒。","format":"int64","type":"integer"},"type":{"description":"脚本类型：media（流媒体解锁）或 ip（IP 信息查询），详情请查看脚本教程。","enum":["media","ip"],"type":"string"}},"type":"object"},"type":"array"},"dnsServers":{"items":{"type":"string"},"type":"array"},"downloadDuration":{"description":"测速时长，单位秒。","format":"int64","type":"integer"},"downloadThreading":{"description":"测速线程数。","type":"integer"},"downloadURL":{"type":"string"},"pingAddress":{"type":"string"},"pingAverageOver":{"description":"参与均值计算的 Ping 次数。","type":"integer"},"stunURL":{"type":"string"},"taskRetry":{"type":"integer"},"tracerouteMaxHops":{"description":"Traceroute 最大跳数。默认值：30。","type":"integer"},"tracerouteProbesPerHop":{"description":"每一跳的探测次数。默认值：3。","type":"integer"},"tracerouteTimeout":{"description":"每一跳探测超时，单位秒。0 表示使用全局任务超时。","type":"integer"}},"type":"object"},"Node":{"description":"测试请求中提交的节点。","properties":{"Name":{"type":"string"},"Payload":{"description":"Clash YAML 类型的代理信息","type":"string"}},"type":"object"},"TaskRequestOptions":{"description":"请求中包含的矩阵选择与过滤选项。","properties":{"Filter":{"description":"节点名称过滤正则。API 不负责对节点进行过滤操作","type":"string"},"Matrices":{"description":"测试矩阵列表。","items":{"$ref":"#/components/schemas/TaskRequestMatrixEntry"},"type":"array"}},"type":"object"},"TaskRequestMatrixEntry":{"description":"单个请求的测试矩阵项。","properties":{"Params":{"description":"矩阵参数，在 TEST_SCRIPT 类型的 Matrix 中代表要使用的脚本 ID。","type":"string"},"Type":{"description":"矩阵类型。","$ref":"#/components/schemas/TaskRequestMatrixType","type":"string"}},"type":"object"},"TaskRequestMatrixType":{"description":"矩阵类型标识。","enum":["SPEED_AVERAGE","SPEED_MAX","SPEED_PER_SECOND","UDP_TYPE","GEOIP_INBOUND","GEOIP_OUTBOUND","TEST_SCRIPT","TEST_PING_CONN","TEST_PING_RTT","TRACEROUTE","LONGCONN","TEST_PING_MAX_RTT","TEST_PING_TOTAL_CONN","TEST_PING_TOTAL_RTT","TEST_PING_SD_RTT","TEST_PING_SD_CONN","TEST_HTTP_CODE","TEST_PING_PACKET_LOSS","TEST_HIJACK_DETECTION","INVALID"],"type":"string"},"TaskRequestEntrySlot":{"description":"单个代理节点的测试结果，同 Miaospeed 的 SlaveEntrySlot。","properties":{"Grouping":{"description":"可选的节点分组标签。","type":"string"},"InvokeDuration":{"description":"该节点测试总耗时，单位毫秒。","format":"int64","type":"integer"},"Matrices":{"description":"与原始请求顺序一致的矩阵结果列表，同 Miaospeed 的 []MatrixResponse。","items":{"$ref":"#/components/schemas/TaskRequestMatrixResponse"},"type":"array"},"ProxyInfo":{"$ref":"#/components/schemas/TaskRequestProxyInfo"}},"type":"object"},"TaskRequestMatrixResponse":{"description":"单个测试矩阵结果，同 Miaospeed 的 MatrixResponse，Payload 类型根据 Type 字段而定。请参阅 Payload 字段的描述。\n","properties":{"Payload":{"description":"JSON 编码的指标结果。请按 `Type` 进行解析：\n- **SPEED_AVERAGE** → `{\"Value\": <bytes/s uint64>}`\n- **SPEED_MAX**     → `{\"Value\": <bytes/s uint64>}`\n- **SPEED_PER_SECOND** → `{\"Max\": <uint64>, \"Average\": <uint64>, \"Speeds\": [<uint64>, ...]}`\n- **UDP_TYPE**      → `{\"Value\": \"<string>\"}`  (e.g. `\"Full Cone\"`, `\"Unknown\"`)\n- **TEST_PING_CONN** → `{\"Value\": <ms uint16>}`  (HTTP connect ping)\n- **TEST_PING_RTT**  → `{\"Value\": <ms uint16>}`  (round-trip time)\n- **TEST_PING_MAX_RTT** → `{\"Value\": <ms uint16>}`  (max RTT across all probes)\n- **TEST_PING_TOTAL_CONN** → `{\"Value\": <ms uint16>}`  (total HTTP connect ping sum)\n- **TEST_PING_TOTAL_RTT** → `{\"Value\": <ms uint16>}`  (total RTT sum)\n- **TEST_PING_SD_RTT** → `{\"Value\": <float64>}`  (RTT standard deviation in ms)\n- **TEST_PING_SD_CONN** → `{\"Value\": <float64>}`  (HTTP connect standard deviation in ms)\n- **TEST_HTTP_CODE** → `{\"Values\": [<int>, ...]}`  (HTTP status codes observed)\n- **TEST_PING_PACKET_LOSS** → `{\"Value\": <float64>}`  (packet loss ratio 0.00 - 100.00)\n- **TEST_HIJACK_DETECTION** → `{\"SpeedIP\": \"<ip>\", \"RealIP\": \"<ip>\"}`  (SpeedIP == RealIP means no hijack)\n- **TEST_SCRIPT**   → `{\"Key\": \"<id>\", \"Text\": \"<result>\", \"Color\": \"<hex>\", \"Background\": \"<hex>\", \"TimeElapsed\": <ms>}` \n- **GEOIP_INBOUND** → See `MultiStacks` schema (inbound/client-side IP geo)\n- **GEOIP_OUTBOUND** → See `MultiStacks` schema (outbound/exit-node IP geo)\n- **TRACEROUTE** → See `TraceRouteDS` schema\n- **LONGCONN** → See `LongConnDS` schema\n","type":"string"},"Type":{"description":"矩阵类型标识。","$ref":"#/components/schemas/TaskRequestMatrixType"}},"type":"object"},"TaskRequestProxyInfo":{"description":"节点信息，同 Miaospeed 的 ProxyInfo。","properties":{"Address":{"description":"节点地址，格式 host:port。","type":"string"},"Name":{"description":"节点名称。","type":"string"},"Type":{"description":"代理协议类型。以下是 SpeedCentre+ 目前支持测试的节点协议。","enum":["Shadowsocks","ShadowsocksR","Snell","Socks5","Http","Vmess","Trojan","Vless","Hysteria","Hysteria2","Tuic","Wireguard","AnyTLS","Mieru"],"type":"string"}},"type":"object"}}}}
```

## The TaskStatus object

```json
{"openapi":"3.0.3","info":{"title":"SpeedCentre+ 用户 API","version":"1.0"},"components":{"schemas":{"TaskStatus":{"properties":{"completed_at":{"description":"任务完成时间。未完成的任务该字段为 null。","format":"date-time","type":"string"},"completed_nodes":{"description":"当前已完成测试的节点数量。","format":"int32","type":"integer"},"created_at":{"description":"任务创建时间。","format":"date-time","type":"string"},"credit_cost":{"description":"任务消耗的积分数量。","format":"int64","type":"integer"},"duration_ms":{"description":"任务持续时间，单位毫秒。","format":"int64","type":"integer"},"error_msg":{"description":"任务失败时的错误信息。","type":"string"},"macros":{"description":"任务使用的测试宏列表，详情请查看任务定义。","items":{"type":"string","enum":["SPEED","PING","UDP","SCRIPT","GEO","TRACEROUTE","LONGCONN","HIJACK","INVALID"]},"type":"array"},"name":{"description":"人类可读的任务名称。","type":"string"},"node_count":{"description":"任务包含的节点数量。","format":"int32","type":"integer"},"runner_completed_at_ms":{"description":"任务完成时间，Unix 时间戳，单位毫秒。","format":"int64","type":"integer"},"runner_created_at_ms":{"description":"任务创建时间，Unix 时间戳，单位毫秒。","format":"int64","type":"integer"},"runner_started_at_ms":{"description":"任务开始时间，Unix 时间戳，单位毫秒。","format":"int64","type":"integer"},"service_type":{"description":"调用任务的套餐类型。","type":"string"},"slave_id":{"description":"执行该任务的后端 ID。","type":"string"},"slave_name":{"description":"执行该任务的后端显示名称。","type":"string"},"started_at":{"description":"任务开始时间。","format":"date-time","type":"string"},"status":{"enum":["pending","running","completed","failed","canceled","unspecified"],"type":"string"},"task_id":{"format":"uuid","type":"string"},"type":{"type":"string"},"user_id":{"format":"int64","type":"integer"}},"type":"object"}}}}
```

## The TaskProgress object

```json
{"openapi":"3.0.3","info":{"title":"SpeedCentre+ 用户 API","version":"1.0"},"components":{"schemas":{"TaskProgress":{"description":"任务进度。包含当前完成测试的节点信息。","properties":{"completed_count":{"description":"当前已完成测试的节点数量。","format":"int32","type":"integer"},"entries":{"description":"按结果产生顺序排列的逐节点结果项，同 Miaospeed 的 []SlaveEntrySlot。","items":{"$ref":"#/components/schemas/TaskRequestEntrySlot"},"type":"array"},"task_id":{"description":"任务 UUID。","format":"uuid","type":"string"},"total_count":{"description":"该任务的总节点数。","format":"int32","type":"integer"}},"type":"object"},"TaskRequestEntrySlot":{"description":"单个代理节点的测试结果，同 Miaospeed 的 SlaveEntrySlot。","properties":{"Grouping":{"description":"可选的节点分组标签。","type":"string"},"InvokeDuration":{"description":"该节点测试总耗时，单位毫秒。","format":"int64","type":"integer"},"Matrices":{"description":"与原始请求顺序一致的矩阵结果列表，同 Miaospeed 的 []MatrixResponse。","items":{"$ref":"#/components/schemas/TaskRequestMatrixResponse"},"type":"array"},"ProxyInfo":{"$ref":"#/components/schemas/TaskRequestProxyInfo"}},"type":"object"},"TaskRequestMatrixResponse":{"description":"单个测试矩阵结果，同 Miaospeed 的 MatrixResponse，Payload 类型根据 Type 字段而定。请参阅 Payload 字段的描述。\n","properties":{"Payload":{"description":"JSON 编码的指标结果。请按 `Type` 进行解析：\n- **SPEED_AVERAGE** → `{\"Value\": <bytes/s uint64>}`\n- **SPEED_MAX**     → `{\"Value\": <bytes/s uint64>}`\n- **SPEED_PER_SECOND** → `{\"Max\": <uint64>, \"Average\": <uint64>, \"Speeds\": [<uint64>, ...]}`\n- **UDP_TYPE**      → `{\"Value\": \"<string>\"}`  (e.g. `\"Full Cone\"`, `\"Unknown\"`)\n- **TEST_PING_CONN** → `{\"Value\": <ms uint16>}`  (HTTP connect ping)\n- **TEST_PING_RTT**  → `{\"Value\": <ms uint16>}`  (round-trip time)\n- **TEST_PING_MAX_RTT** → `{\"Value\": <ms uint16>}`  (max RTT across all probes)\n- **TEST_PING_TOTAL_CONN** → `{\"Value\": <ms uint16>}`  (total HTTP connect ping sum)\n- **TEST_PING_TOTAL_RTT** → `{\"Value\": <ms uint16>}`  (total RTT sum)\n- **TEST_PING_SD_RTT** → `{\"Value\": <float64>}`  (RTT standard deviation in ms)\n- **TEST_PING_SD_CONN** → `{\"Value\": <float64>}`  (HTTP connect standard deviation in ms)\n- **TEST_HTTP_CODE** → `{\"Values\": [<int>, ...]}`  (HTTP status codes observed)\n- **TEST_PING_PACKET_LOSS** → `{\"Value\": <float64>}`  (packet loss ratio 0.00 - 100.00)\n- **TEST_HIJACK_DETECTION** → `{\"SpeedIP\": \"<ip>\", \"RealIP\": \"<ip>\"}`  (SpeedIP == RealIP means no hijack)\n- **TEST_SCRIPT**   → `{\"Key\": \"<id>\", \"Text\": \"<result>\", \"Color\": \"<hex>\", \"Background\": \"<hex>\", \"TimeElapsed\": <ms>}` \n- **GEOIP_INBOUND** → See `MultiStacks` schema (inbound/client-side IP geo)\n- **GEOIP_OUTBOUND** → See `MultiStacks` schema (outbound/exit-node IP geo)\n- **TRACEROUTE** → See `TraceRouteDS` schema\n- **LONGCONN** → See `LongConnDS` schema\n","type":"string"},"Type":{"description":"矩阵类型标识。","$ref":"#/components/schemas/TaskRequestMatrixType"}},"type":"object"},"TaskRequestMatrixType":{"description":"矩阵类型标识。","enum":["SPEED_AVERAGE","SPEED_MAX","SPEED_PER_SECOND","UDP_TYPE","GEOIP_INBOUND","GEOIP_OUTBOUND","TEST_SCRIPT","TEST_PING_CONN","TEST_PING_RTT","TRACEROUTE","LONGCONN","TEST_PING_MAX_RTT","TEST_PING_TOTAL_CONN","TEST_PING_TOTAL_RTT","TEST_PING_SD_RTT","TEST_PING_SD_CONN","TEST_HTTP_CODE","TEST_PING_PACKET_LOSS","TEST_HIJACK_DETECTION","INVALID"],"type":"string"},"TaskRequestProxyInfo":{"description":"节点信息，同 Miaospeed 的 ProxyInfo。","properties":{"Address":{"description":"节点地址，格式 host:port。","type":"string"},"Name":{"description":"节点名称。","type":"string"},"Type":{"description":"代理协议类型。以下是 SpeedCentre+ 目前支持测试的节点协议。","enum":["Shadowsocks","ShadowsocksR","Snell","Socks5","Http","Vmess","Trojan","Vless","Hysteria","Hysteria2","Tuic","Wireguard","AnyTLS","Mieru"],"type":"string"}},"type":"object"}}}}
```

## The TaskResult object

```json
{"openapi":"3.0.3","info":{"title":"SpeedCentre+ 用户 API","version":"1.0"},"components":{"schemas":{"TaskResult":{"description":"任务结果。同 Miaospeed 的 SlaveTask。","properties":{"result":{"$ref":"#/components/schemas/Task","description":"完整的 miaospeed 测试结果。结果不可用时返回空的 SlaveTask。"},"task":{"$ref":"#/components/schemas/TaskStatus","description":"供前端任务详情页使用的任务元数据。"},"task_id":{"description":"任务 UUID。","format":"uuid","type":"string"}},"type":"object"},"Task":{"description":"完整的测试结果数据结构。同 Miaospeed 的 SlaveTask。\n","properties":{"Request":{"$ref":"#/components/schemas/TaskRequest","description":"原始测试请求。"},"Results":{"description":"节点测试结果。","items":{"$ref":"#/components/schemas/TaskRequestEntrySlot"},"type":"array"}},"type":"object"},"TaskRequest":{"description":"任务请求，同 Miaospeed 的 SlaveRequest。\n","properties":{"Basics":{"$ref":"#/components/schemas/TaskRequestBasics"},"Configs":{"$ref":"#/components/schemas/TaskRequestConfigs"},"Nodes":{"items":{"$ref":"#/components/schemas/Node"},"type":"array"},"Options":{"$ref":"#/components/schemas/TaskRequestOptions"},"Vendor":{"type":"string"}},"type":"object"},"TaskRequestBasics":{"description":"任务基本信息，同 Miaospeed 的 SlaveRequestBasics","properties":{"ID":{"type":"string"},"Invoker":{"type":"string"},"Slave":{"type":"string"},"SlaveName":{"type":"string"},"Version":{"type":"string"},"Weight":{"description":"任务优先级，由您发起任务的套餐决定，优先级越高的任务在后端繁忙时运行的更快。","type":"integer"}},"type":"object"},"TaskRequestConfigs":{"description":"测试配置项。兼容 Miaospeed 的 SlaveRequestConfigs。","properties":{"Scripts":{"description":"脚本库，可在 TEST_SCRIPT Matrix 中或者在 GeoIP 测试中调用。","items":{"properties":{"ID":{"description":"脚本唯一标识。在脚本类型为 media 时须与矩阵项中的 Params 对应。","type":"string"},"content":{"description":"在引擎内执行的 JavaScript 源码。详情请查看脚本教程。","type":"string"},"timeout":{"description":"执行超时时间，单位毫秒。","format":"int64","type":"integer"},"type":{"description":"脚本类型：media（流媒体解锁）或 ip（IP 信息查询），详情请查看脚本教程。","enum":["media","ip"],"type":"string"}},"type":"object"},"type":"array"},"dnsServers":{"items":{"type":"string"},"type":"array"},"downloadDuration":{"description":"测速时长，单位秒。","format":"int64","type":"integer"},"downloadThreading":{"description":"测速线程数。","type":"integer"},"downloadURL":{"type":"string"},"pingAddress":{"type":"string"},"pingAverageOver":{"description":"参与均值计算的 Ping 次数。","type":"integer"},"stunURL":{"type":"string"},"taskRetry":{"type":"integer"},"tracerouteMaxHops":{"description":"Traceroute 最大跳数。默认值：30。","type":"integer"},"tracerouteProbesPerHop":{"description":"每一跳的探测次数。默认值：3。","type":"integer"},"tracerouteTimeout":{"description":"每一跳探测超时，单位秒。0 表示使用全局任务超时。","type":"integer"}},"type":"object"},"Node":{"description":"测试请求中提交的节点。","properties":{"Name":{"type":"string"},"Payload":{"description":"Clash YAML 类型的代理信息","type":"string"}},"type":"object"},"TaskRequestOptions":{"description":"请求中包含的矩阵选择与过滤选项。","properties":{"Filter":{"description":"节点名称过滤正则。API 不负责对节点进行过滤操作","type":"string"},"Matrices":{"description":"测试矩阵列表。","items":{"$ref":"#/components/schemas/TaskRequestMatrixEntry"},"type":"array"}},"type":"object"},"TaskRequestMatrixEntry":{"description":"单个请求的测试矩阵项。","properties":{"Params":{"description":"矩阵参数，在 TEST_SCRIPT 类型的 Matrix 中代表要使用的脚本 ID。","type":"string"},"Type":{"description":"矩阵类型。","$ref":"#/components/schemas/TaskRequestMatrixType","type":"string"}},"type":"object"},"TaskRequestMatrixType":{"description":"矩阵类型标识。","enum":["SPEED_AVERAGE","SPEED_MAX","SPEED_PER_SECOND","UDP_TYPE","GEOIP_INBOUND","GEOIP_OUTBOUND","TEST_SCRIPT","TEST_PING_CONN","TEST_PING_RTT","TRACEROUTE","LONGCONN","TEST_PING_MAX_RTT","TEST_PING_TOTAL_CONN","TEST_PING_TOTAL_RTT","TEST_PING_SD_RTT","TEST_PING_SD_CONN","TEST_HTTP_CODE","TEST_PING_PACKET_LOSS","TEST_HIJACK_DETECTION","INVALID"],"type":"string"},"TaskRequestEntrySlot":{"description":"单个代理节点的测试结果，同 Miaospeed 的 SlaveEntrySlot。","properties":{"Grouping":{"description":"可选的节点分组标签。","type":"string"},"InvokeDuration":{"description":"该节点测试总耗时，单位毫秒。","format":"int64","type":"integer"},"Matrices":{"description":"与原始请求顺序一致的矩阵结果列表，同 Miaospeed 的 []MatrixResponse。","items":{"$ref":"#/components/schemas/TaskRequestMatrixResponse"},"type":"array"},"ProxyInfo":{"$ref":"#/components/schemas/TaskRequestProxyInfo"}},"type":"object"},"TaskRequestMatrixResponse":{"description":"单个测试矩阵结果，同 Miaospeed 的 MatrixResponse，Payload 类型根据 Type 字段而定。请参阅 Payload 字段的描述。\n","properties":{"Payload":{"description":"JSON 编码的指标结果。请按 `Type` 进行解析：\n- **SPEED_AVERAGE** → `{\"Value\": <bytes/s uint64>}`\n- **SPEED_MAX**     → `{\"Value\": <bytes/s uint64>}`\n- **SPEED_PER_SECOND** → `{\"Max\": <uint64>, \"Average\": <uint64>, \"Speeds\": [<uint64>, ...]}`\n- **UDP_TYPE**      → `{\"Value\": \"<string>\"}`  (e.g. `\"Full Cone\"`, `\"Unknown\"`)\n- **TEST_PING_CONN** → `{\"Value\": <ms uint16>}`  (HTTP connect ping)\n- **TEST_PING_RTT**  → `{\"Value\": <ms uint16>}`  (round-trip time)\n- **TEST_PING_MAX_RTT** → `{\"Value\": <ms uint16>}`  (max RTT across all probes)\n- **TEST_PING_TOTAL_CONN** → `{\"Value\": <ms uint16>}`  (total HTTP connect ping sum)\n- **TEST_PING_TOTAL_RTT** → `{\"Value\": <ms uint16>}`  (total RTT sum)\n- **TEST_PING_SD_RTT** → `{\"Value\": <float64>}`  (RTT standard deviation in ms)\n- **TEST_PING_SD_CONN** → `{\"Value\": <float64>}`  (HTTP connect standard deviation in ms)\n- **TEST_HTTP_CODE** → `{\"Values\": [<int>, ...]}`  (HTTP status codes observed)\n- **TEST_PING_PACKET_LOSS** → `{\"Value\": <float64>}`  (packet loss ratio 0.00 - 100.00)\n- **TEST_HIJACK_DETECTION** → `{\"SpeedIP\": \"<ip>\", \"RealIP\": \"<ip>\"}`  (SpeedIP == RealIP means no hijack)\n- **TEST_SCRIPT**   → `{\"Key\": \"<id>\", \"Text\": \"<result>\", \"Color\": \"<hex>\", \"Background\": \"<hex>\", \"TimeElapsed\": <ms>}` \n- **GEOIP_INBOUND** → See `MultiStacks` schema (inbound/client-side IP geo)\n- **GEOIP_OUTBOUND** → See `MultiStacks` schema (outbound/exit-node IP geo)\n- **TRACEROUTE** → See `TraceRouteDS` schema\n- **LONGCONN** → See `LongConnDS` schema\n","type":"string"},"Type":{"description":"矩阵类型标识。","$ref":"#/components/schemas/TaskRequestMatrixType"}},"type":"object"},"TaskRequestProxyInfo":{"description":"节点信息，同 Miaospeed 的 ProxyInfo。","properties":{"Address":{"description":"节点地址，格式 host:port。","type":"string"},"Name":{"description":"节点名称。","type":"string"},"Type":{"description":"代理协议类型。以下是 SpeedCentre+ 目前支持测试的节点协议。","enum":["Shadowsocks","ShadowsocksR","Snell","Socks5","Http","Vmess","Trojan","Vless","Hysteria","Hysteria2","Tuic","Wireguard","AnyTLS","Mieru"],"type":"string"}},"type":"object"},"TaskStatus":{"properties":{"completed_at":{"description":"任务完成时间。未完成的任务该字段为 null。","format":"date-time","type":"string"},"completed_nodes":{"description":"当前已完成测试的节点数量。","format":"int32","type":"integer"},"created_at":{"description":"任务创建时间。","format":"date-time","type":"string"},"credit_cost":{"description":"任务消耗的积分数量。","format":"int64","type":"integer"},"duration_ms":{"description":"任务持续时间，单位毫秒。","format":"int64","type":"integer"},"error_msg":{"description":"任务失败时的错误信息。","type":"string"},"macros":{"description":"任务使用的测试宏列表，详情请查看任务定义。","items":{"type":"string","enum":["SPEED","PING","UDP","SCRIPT","GEO","TRACEROUTE","LONGCONN","HIJACK","INVALID"]},"type":"array"},"name":{"description":"人类可读的任务名称。","type":"string"},"node_count":{"description":"任务包含的节点数量。","format":"int32","type":"integer"},"runner_completed_at_ms":{"description":"任务完成时间，Unix 时间戳，单位毫秒。","format":"int64","type":"integer"},"runner_created_at_ms":{"description":"任务创建时间，Unix 时间戳，单位毫秒。","format":"int64","type":"integer"},"runner_started_at_ms":{"description":"任务开始时间，Unix 时间戳，单位毫秒。","format":"int64","type":"integer"},"service_type":{"description":"调用任务的套餐类型。","type":"string"},"slave_id":{"description":"执行该任务的后端 ID。","type":"string"},"slave_name":{"description":"执行该任务的后端显示名称。","type":"string"},"started_at":{"description":"任务开始时间。","format":"date-time","type":"string"},"status":{"enum":["pending","running","completed","failed","canceled","unspecified"],"type":"string"},"task_id":{"format":"uuid","type":"string"},"type":{"type":"string"},"user_id":{"format":"int64","type":"integer"}},"type":"object"}}}}
```

## The TaskShare object

```json
{"openapi":"3.0.3","info":{"title":"SpeedCentre+ 用户 API","version":"1.0"},"components":{"schemas":{"TaskShare":{"properties":{"created_at":{"format":"date-time","type":"string"},"expires_at":{"format":"date-time","type":"string"},"hide_private_info":{"type":"boolean"},"is_active":{"type":"boolean"},"task_id":{"format":"uuid","type":"string"},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"user_id":{"format":"int64","type":"integer"},"uuid":{"format":"uuid","type":"string"}},"type":"object"}}}}
```
