随机返回一张动漫横图
| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| key | string | 是 | 接口调用密钥 |
[
{
"name": "key",
"type": "string",
"required": true,
"description": "接口调用密钥",
"example": ""
}
]
{
"openapi": "3.1.1",
"info": {
"title": "动漫横图",
"description": "随机返回一张动漫横图",
"version": "1.0.0"
},
"paths": {
"/api/tp/dmdntp/api.php": {
"get": {
"summary": "动漫横图",
"description": "随机返回一张动漫横图",
"parameters": [
{
"name": "key",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "接口调用密钥"
}
],
"responses": {
"200": {
"description": "成功",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
},
"post": {
"summary": "动漫横图",
"description": "随机返回一张动漫横图",
"parameters": [
{
"name": "key",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "接口调用密钥"
}
],
"responses": {
"200": {
"description": "成功",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
}
}
},
"servers": [
{
"url": "https://api-v2.317ak.com",
"description": "当前访问入口(https)"
}
]
}
随机返回一张动漫横图,适用于需要获取动漫图片资源的应用场景。
该接口面向开发者提供图片分类调用服务,接口调用需进行密钥验证。
https://api-v2.317ak.com/api/tp/dmdntp/api.php
GET, POST
接口调用需要提供密钥。
首选鉴权方式:Query 参数。
请求时在调用地址后添加 key 参数,例如通过 key=… 传递接口调用密钥。
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| key | string | 是 | 接口调用密钥,需通过 Query 参数传递。 |
key:填写有效的接口调用密钥,用于接口访问验证。接口调用成功后,将随机返回一张动漫横图资源。
{
"url": "https://example.com/anime-image.jpg"
}
| 字段 | 类型 | 说明 |
|---|---|---|
url |
string | 返回的动漫横图地址 |
请求失败时,接口返回 JSON 格式错误信息,示例如下:
{
"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 -X GET "https://api-v2.317ak.com/api/tp/dmdntp/api.php?key=YOUR_KEY"
/* PHP */
key 参数为必填项,请确认传入的密钥有效;缺少该参数或参数值错误时可能导致请求失败。curl \
-X GET \
"https://api-v2.317ak.com/api/tp/dmdntp/api.php?key=YOUR_API_KEY"