随机返回一张举牌图片的图片链接
| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| key | string | 是 | 接口调用密钥 | |
| type | string | 否 | 输出格式可选json/text,默认json输出 | json |
[
{
"name": "key",
"type": "string",
"required": true,
"description": "接口调用密钥",
"example": ""
},
{
"name": "type",
"type": "string",
"required": false,
"description": "输出格式可选json/text,默认json输出",
"example": "json"
}
]
{
"openapi": "3.1.1",
"info": {
"title": "举牌图片",
"description": "随机返回一张举牌图片的图片链接",
"version": "1.0.0"
},
"paths": {
"/api/tp/jptp/api.php": {
"get": {
"summary": "举牌图片",
"description": "随机返回一张举牌图片的图片链接",
"parameters": [
{
"name": "key",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "接口调用密钥"
},
{
"name": "type",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "json"
},
"description": "输出格式可选json/text,默认json输出"
}
],
"responses": {
"200": {
"description": "成功",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
},
"post": {
"summary": "举牌图片",
"description": "随机返回一张举牌图片的图片链接",
"parameters": [
{
"name": "key",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "接口调用密钥"
},
{
"name": "type",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "json"
},
"description": "输出格式可选json/text,默认json输出"
}
],
"responses": {
"200": {
"description": "成功",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
}
}
},
"servers": [
{
"url": "https://api.317ak.com",
"description": "当前访问入口(https)"
}
]
}
{
"text": "https://i.pixiv.re/img-original/img/2021/12/26/00/30/01/95026177_p0.jpg"
}
随机返回一张举牌图片链接,适用于需要获取随机图片资源的应用场景。
接口提供图片分类调用服务,调用后可获取对应的图片地址。
https://api-v2.317ak.com/api/tp/jptp/api.php
GET、POST
本接口需要密钥鉴权,请通过 Query 参数传递调用密钥:
key=…
调用时需携带有效接口调用密钥。
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| key | string | 是 | 接口调用密钥,通过 Query 参数 key 传递 |
| type | string | 否 | 输出格式,可选 json 或 text,默认输出 json |
{
"text": "https://i.pixiv.re/img-original/img/2021/12/26/00/30/01/95026177_p0.jpg"
}
| 字段 | 类型 | 说明 |
|---|---|---|
| text | string | 返回的举牌图片链接 |
{
"code":0,
"msg":"未提供调用密钥",
"errcode":11001
}
| errcode | 含义 |
|---|---|
| 11001 | 未提供调用密钥 |
| 11002 | 密钥错误 |
| 11003 | 密钥已禁用 |
| 11004 | 积分余额不足 |
| 11005 | 请求过于频繁(QPM 限制) |
| 11006 | 接口维护中 |
| 11007 | 接口已禁用 |
| 11008 | 接口不可用 |
| 11009 | 密钥校验暂不可用 |
| 11010 | 积分系统暂不可用 |
| 11011 | 收费接口须提供有效密钥 |
| 11012 | 鉴权方式错误 |
| 11013 | 接口不存在 |
| 11014 | ***地址无效 |
| 11015 | ***地址不允许 |
| 11016 | ***请求失败 |
| 11017 | 服务暂不可用 |
| 11018 | 请求方式不允许 |
| 11019 | 当前IP不在白名单内 |
| 11020 | 启用出口代理须提供有效密钥 |
| 11021 | 未配置可用出口代理 |
| 11022 | 出口代理不可用 |
| 11023 | 密钥已过期 |
| 11024 | 令牌分配积分不足 |
curl -G "https://api-v2.317ak.com/api/tp/jptp/api.php" \
--data-urlencode "key=YOUR_KEY" \
--data-urlencode "type=json"
// PHP
## 注意事项
- 调用接口时必须提供有效密钥,请妥善保管密钥信息,避免在公开页面、前端代码、客户端源码或公开仓库中直接暴露。
- 建议通过安全的服务端环境发起请求,并使用 HTTPS 进行数据传输,以降低密钥泄露和请求数据被窃取的风险。
- 接口为免费调用,但请合理控制请求频率,避免短时间内大量重复请求影响正常使用。
- `type` 参数用于指定返回格式,可选 `json` 或 `text`,未传入时默认返回 JSON 格式;填写其他值可能导致返回结果不符合预期。
- 返回内容为随机举牌图片链接,每次请求结果可能不同,如需固定展示效果,请在业务侧自行保存已获取的图片链接。
- 请确保请求参数格式正确,`key` 参数不能为空,否则无法完成接口调用。curl -G "https://api-v2.317ak.com/api/tp/jptp/api.php" \
--data-urlencode "key=YOUR_API_KEY" \
--data-urlencode "type=json"