输入内容返回小人举牌图片。
| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| key | string | 是 | 接口调用密钥 | |
| msg | string | 是 | 需要举牌的内容 | 倾梦API,YYDS |
[
{
"name": "key",
"type": "string",
"required": true,
"description": "接口调用密钥",
"example": ""
},
{
"name": "msg",
"type": "string",
"required": true,
"description": "需要举牌的内容",
"example": "倾梦API,YYDS"
}
]
{
"openapi": "3.1.1",
"info": {
"title": "小人举牌",
"description": "输入内容返回小人举牌图片。",
"version": "1.0.0"
},
"paths": {
"/api/yljk/xrjp/api.php": {
"get": {
"summary": "小人举牌",
"description": "输入内容返回小人举牌图片。",
"parameters": [
{
"name": "key",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "接口调用密钥"
},
{
"name": "msg",
"in": "query",
"required": true,
"schema": {
"type": "string",
"example": "倾梦API,YYDS"
},
"description": "需要举牌的内容"
}
],
"responses": {
"200": {
"description": "成功",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
},
"post": {
"summary": "小人举牌",
"description": "输入内容返回小人举牌图片。",
"parameters": [
{
"name": "key",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "接口调用密钥"
},
{
"name": "msg",
"in": "query",
"required": true,
"schema": {
"type": "string",
"example": "倾梦API,YYDS"
},
"description": "需要举牌的内容"
}
],
"responses": {
"200": {
"description": "成功",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
}
}
},
"servers": [
{
"url": "https://api.317ak.com",
"description": "当前访问入口(https)"
}
]
}
输入指定内容生成对应的小人举牌图片,适用于娱乐类图片生成场景。
用户可通过接口提交文字内容,获取小人举牌效果图片。
https://api-v2.317ak.com/api/yljk/xrjp/api.php
GET、POST
接口调用需要提供密钥。
首选鉴权方式:Query 参数。
请求时在调用地址后添加 key 参数传递接口调用密钥。
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| key | string | 是 | 接口调用密钥 |
| msg | string | 是 | 需要举牌的内容,例如:倾梦API,YYDS |
参数取值说明:
msg 用于设置图片中展示的小人举牌文字内容。接口调用成功后,将返回生成的小人举牌图片资源。
由于返回内容为图片数据,暂无固定 JSON 示例。
本接口成功响应为图片内容,不返回结构化字段。调用成功后即可获取对应的小人举牌图片。
接口发生异常时,返回统一 JSON 格式:
{
"code": 0,
"msg": "密钥错误",
"errcode": 11002
}
| 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/yljk/xrjp/api.php' \
--data-urlencode 'key=你的接口密钥' \
--data-urlencode 'msg=倾梦API,YYDS'
// PHP
$url = 'https://api-v2.317ak.com/api/yljk/xrjp/api.php?key='. urlencode('你的接口密钥'). '&msg='. urlencode('倾梦API,YYDS');
$response = file_get_contents($url);
echo $response;
key 参数内容,避免泄露或被他人滥用。key 参数完成身份校验。msg 参数为必填内容,用于生成举牌图片文字,请避免传入过长内容或不适合展示的文本,以免影响生成效果。curl "https://api-v2.317ak.com/api/yljk/xrjp/api.php?key=YOUR_API_KEY&msg=倾梦API,YYDS"