统一响应格式Unified response format
请同时检查 HTTP 状态码与响应 JSON 中的 code。业务成功时 code 为 0。Check both the HTTP status and JSON code. A code of 0 means success.
{
"code": 0,
"message": "success",
"data": {}
}一键带入兑换码Prefilled recharge links
代理商可在订单完成页生成带 code 参数的充值链接。用户打开后,网站会自动填入并验证兑换码。Partners can generate a recharge URL with a code query parameter. The site fills and verifies the CDK automatically.
https://plus.getaiai.com/?code=PLUS-1X-J1N5FX2T验证 CDKVerify CDK
在充值前检查兑换码是否存在、是否可用。Check whether a CDK exists and can be used before recharge.
/api/v1/verify-cardkey请求体Request body
{
"cardKey": "PLUS-VM3DNSJ3"
}cURL
curl "https://plus.getaiai.com/api/v1/verify-cardkey?cardKey=PLUS-VM3DNSJ3"成功响应Success response
{
"code": 0,
"message": "success",
"data": {
"valid": true,
"status": 0,
"statusDesc": "未使用",
"message": "卡密有效"
}
}提交充值Submit recharge
提交兑换码和用户 Session。收到 60804 后,经用户确认再将 confirmOverride 设为 true。Submit a CDK and user Session. After a 60804 response, get user confirmation and retry with confirmOverride set to true.
/api/v1/redeem请求体Request body
{
"cardKey": "PLUS-VM3DNSJ3",
"accountSession": "{\"user\":{\"email\":\"user@example.com\"},\"account\":{\"id\":\"account-id\"}}",
"confirmOverride": false
}cURL
curl -X POST "https://plus.getaiai.com/api/v1/redeem" \
-H "Content-Type: application/json" \
-d '{ "cardKey": "PLUS-VM3DNSJ3", "accountSession": "{\"user\":{\"email\":\"user@example.com\"},\"account\":{\"id\":\"account-id\"}}", "confirmOverride": false}'成功响应Success response
{
"code": 0,
"message": "success",
"data": {
"success": true,
"message": "充值成功",
"recordId": 123,
"expiresDate": "2026-08-17T00:00:00Z"
}
}批量查询状态Batch status lookup
一次查询 1 至 100 个 CDK 的状态、使用时间及绑定账号。Query status, usage time and linked account for 1–100 CDKs.
/api/v1/cardkey/batch-status请求体Request body
{
"cardKeys": [
"PLUS-VM3DNSJ3",
"GO-ABCDEFGH"
]
}cURL
curl -X POST "https://plus.getaiai.com/api/v1/cardkey/batch-status" \
-H "Content-Type: application/json" \
-d '{ "cardKeys": [ "PLUS-VM3DNSJ3", "GO-ABCDEFGH" ]}'成功响应Success response
{
"code": 0,
"message": "success",
"data": [
{
"cardKey": "PLUS-VM3DNSJ3",
"valid": true,
"status": 0,
"statusDesc": "未使用"
}
]
}常见业务错误码Common business errors
40001参数校验失败42900请求过于频繁60601CDK 不存在60602CDK 已使用或锁定60802产品库存不足60803Session 无效60804已有套餐,需确认覆盖60805上游充值失败