用于生成情侣姓氏头像
| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| key | string | 是 | 接口调用密钥 | |
| xl | string | 是 | 模版名称 | 情侣背影一 |
| msg1 | string | 是 | 姓氏一 | 唐 |
| msg2 | string | 是 | 姓氏二 | 坤 |
| type | string | 否 | 返回格式(json/text/img)=lb则输出图片列表 | json |
[
{
"name": "key",
"type": "string",
"required": true,
"description": "接口调用密钥",
"example": ""
},
{
"name": "xl",
"type": "string",
"required": true,
"description": "模版名称",
"example": "情侣背影一"
},
{
"name": "msg1",
"type": "string",
"required": true,
"description": "姓氏一",
"example": "唐"
},
{
"name": "msg2",
"type": "string",
"required": true,
"description": "姓氏二",
"example": "坤"
},
{
"name": "type",
"type": "string",
"required": false,
"description": "返回格式(json/text/img)=lb则输出图片列表",
"example": "json"
}
]
{
"openapi": "3.1.1",
"info": {
"title": "情侣头像",
"description": "用于生成情侣姓氏头像",
"version": "1.0.0"
},
"paths": {
"/api/yljk/ysqm/qntx/api.php": {
"get": {
"summary": "情侣头像",
"description": "用于生成情侣姓氏头像",
"parameters": [
{
"name": "key",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "接口调用密钥"
},
{
"name": "xl",
"in": "query",
"required": true,
"schema": {
"type": "string",
"example": "情侣背影一"
},
"description": "模版名称"
},
{
"name": "msg1",
"in": "query",
"required": true,
"schema": {
"type": "string",
"example": "唐"
},
"description": "姓氏一"
},
{
"name": "msg2",
"in": "query",
"required": true,
"schema": {
"type": "string",
"example": "坤"
},
"description": "姓氏二"
},
{
"name": "type",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "json"
},
"description": "返回格式(json/text/img)=lb则输出图片列表"
}
],
"responses": {
"200": {
"description": "成功",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
},
"post": {
"summary": "情侣头像",
"description": "用于生成情侣姓氏头像",
"parameters": [
{
"name": "key",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "接口调用密钥"
},
{
"name": "xl",
"in": "query",
"required": true,
"schema": {
"type": "string",
"example": "情侣背影一"
},
"description": "模版名称"
},
{
"name": "msg1",
"in": "query",
"required": true,
"schema": {
"type": "string",
"example": "唐"
},
"description": "姓氏一"
},
{
"name": "msg2",
"in": "query",
"required": true,
"schema": {
"type": "string",
"example": "坤"
},
"description": "姓氏二"
},
{
"name": "type",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "json"
},
"description": "返回格式(json/text/img)=lb则输出图片列表"
}
],
"responses": {
"200": {
"description": "成功",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
}
}
},
"servers": [
{
"url": "https://api.317ak.com",
"description": "当前访问入口(https)"
}
]
}
{
"status": "success",
"message": "请求成功",
"params": {
"msg1": "唐",
"msg2": "城",
"font": "41250"
},
"image_url": "http://21.jiqie.cn/103/111.170.18.164_0930034908.jpg",
"timestamp": 1790711348
}
用于生成情侣姓氏头像,适用于需要制作情侣头像效果的应用场景。
用户可通过接口生成对应的情侣头像图片结果。
该接口属于娱乐类接口,提供免费调用服务。
https://api-v2.317ak.com/api/yljk/ysqm/qntx/api.php
GET、POST
接口调用需要提供密钥。
采用 Query 方式鉴权,请在请求参数中传递 key=…。
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| key | string | 是 | 接口调用密钥 |
| xl | string | 是 | 模板名称,例如:情侣背影一 |
| msg1 | string | 是 | 姓氏一,例如:唐 |
| msg2 | string | 是 | 姓氏二,例如:坤 |
| type | string | 否 | 返回格式,可选值:json、text、img;填写 lb 时输出图片列表 |
补充说明:
type 参数未填写时按默认格式返回。xl 用于指定生成头像所使用的模板名称。{
"status": "success",
"message": "请求成功",
"params": {
"msg1": "唐",
"msg2": "城",
"font": "41250"
},
"image_url": "https://example.com/image.jpg",
"timestamp": 1790711348
}
| 字段 | 类型 | 说明 |
|---|---|---|
| status | string | 请求状态,成功时返回 success |
| message | string | 请求处理结果说明 |
| params | object | 本次生成使用的参数信息 |
| params.msg1 | string | 姓氏一 |
| params.msg2 | string | 姓氏二 |
| params.font | string | 生成图片使用的字体标识 |
| image_url | string | 生成后的头像图片地址 |
| timestamp | number | 请求处理时间戳 |
{
"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/yljk/ysqm/qntx/api.php" \
--data-urlencode "key=你的接口密钥" \
--data-urlencode "xl=情侣背影一" \
--data-urlencode "msg1=唐" \
--data-urlencode "msg2=坤" \
--data-urlencode "type=json"
## 注意事项
- 调用接口时必须提供有效密钥,密钥请妥善保管,避免公开发布、提交到前端代码或分享给无关人员,以防接口被他人使用。
- 本接口为娱乐类免费接口,请合理控制调用频率,避免短时间内大量重复请求影响正常使用。
- 接口支持生成情侣姓氏头像,`xl` 参数需填写有效的模板名称,建议根据实际可用模板进行选择。
- `msg1` 与 `msg2` 用于填写两个姓氏内容,建议传入单个有效姓氏字符,以保证生成效果符合预期。
- `type` 参数用于指定返回格式,可根据业务需求选择对应格式;未特殊指定时请按照接口默认行为处理。
- 请求过程中请使用 HTTPS 进行数据传输,确保密钥及请求参数传输安全。
- 接口返回的图片地址仅用于获取生成结果,请根据业务场景合理处理和展示。curl "https://api-v2.317ak.com/api/yljk/ysqm/qntx/api.php?key=YOUR_API_KEY&xl=%E6%83%85%E4%BE%A3%E8%83%8C%E5%BD%B1%E4%B8%80&msg1=%E5%94%90&msg2=%E5%9D%A4&type=json" \
-X GET
# 请求情侣头像
# 使用query参数鉴权
# 返回json格式