帮助文档 - API Center

帮助文档

快速上手与常见问题,未完待续,敬请期待。

🌐
GET /
描述:返回客户端 IP 与地理位置。

示例:
    curl api.cloudcpp.com

返回(JSON):
    {"ip":"...","location":"...","xad":"..."}
    
🌐
GET /ip
描述:返回客户端 IP 与地理位置。

示例:
    curl api.cloudcpp.com/ip

返回(JSON):
    {"ip":"...","location":"...","xad":"..."}
📍
GET /ip/1.1.1.1
描述:查询指定 IP/域名 的地理信息。
要求:当查询“域名”时,必须使用 HTTPS(HTTP 将返回 426 Upgrade Required)。

示例(查询 IP):
    curl api.cloudcpp.com/ip/1.1.1.1
示例(查询域名,需 HTTPS):
    curl https://api.cloudcpp.com/ip/example.com

返回(JSON,IP 示例):
    {"ip":"1.1.1.1","location":"...","xad":"..."}
📝
GET /ips
描述:查询当前客户端 IP 的详细归属信息。

示例:
    curl api.cloudcpp.com/ips

返回(JSON):
    {"ip":"...","country":"...","region":"...","city":"...","asn":"...","timezone":"...","xad":"..."}
🕵️
GET /ua
描述:返回客户端 User-Agent。

示例:
    curl api.cloudcpp.com/ua

返回(JSON):
    {"ua":"curl/8.0.1","xad":"..."}
📦
GET /header
描述:回显客户端请求头部字段。

示例:
    curl -H 'X-FOO: bar' api.cloudcpp.com/header

返回(JSON):
    {"XFOO":"bar","User-Agent":"curl/8.0.1","xad":"..."}
📂
POST /image
描述:上传文件至中转站,成功后返回公开下载链接。

鉴权:资源被滥用,需有效口令

购买:https://my.cloudcpp.com/buy/21

示例:
    curl -H "X-PASSCODE: <口令>" -F "f=@1.png" api.cloudcpp.com/image

返回(JSON):
    {"1.png":"https://<绑定域>/cache/.png", "xad":"..."}
🔥
POST /burn
描述:创建一次性链接,内容首次查看即销毁。
要求:必须使用 HTTPS(HTTP 将返回 426 Upgrade Required)。

请求(表单):
    content=文本内容
    ttl=过期秒数(可选,默认 24 小时)

示例:
    curl -X POST api.cloudcpp.com/burn \
        -d 'content=一次性内容' \
        -d 'ttl=600'

 返回(JSON 触发条件:?format=json 或 Accept: application/json 或 curl/wget UA):
    {"id":"...","link":"api.cloudcpp.com/burn/...","xad":"..."}