将文字打印在背景图片中,背景图素材37张、字体素材5种可供切换,支持自定义换行、透明度、尾部信息、文字起始X轴、文字起始Y轴,返回格式为图片或JSON。
| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| key | string | 是 | 接口调用密钥 | |
| msg | string | 是 | 需要打印的文字内容 | |
| type | string | 否 | 返回格式,可为:json(图片做b64位加密)、img,默认返回JSON | json |
| back | integer | 否 | 背景图编号,当前仅可为:0-36,默认随机切换 | |
| ttf | string | 否 | 字体编号,当前仅可为:1-5,默认随机切换 | |
| tail | string | 否 | 图文下部小尾巴署名 | 慕名API |
| break | string | 否 | 自定义换行符,默认为\n | \n |
| size | string | 否 | 自定义字体大小,默认46 | 46 |
| x | string | 否 | 打印位置起始X轴,默认:85 | 85 |
| y | string | 否 | 打印位置起始Y轴,默认:700 | 700 |
| trans | string | 否 | 透明度,默认为:0,不透明 | 0 |
[
{
"name": "key",
"type": "string",
"required": true,
"description": "接口调用密钥",
"example": ""
},
{
"name": "msg",
"type": "string",
"required": true,
"description": "需要打印的文字内容",
"example": ""
},
{
"name": "type",
"type": "string",
"required": false,
"description": "返回格式,可为:json(图片做b64位加密)、img,默认返回JSON",
"example": "json"
},
{
"name": "back",
"type": "integer",
"required": false,
"description": "背景图编号,当前仅可为:0-36,默认随机切换",
"example": ""
},
{
"name": "ttf",
"type": "string",
"required": false,
"description": "字体编号,当前仅可为:1-5,默认随机切换",
"example": ""
},
{
"name": "tail",
"type": "string",
"required": false,
"description": "图文下部小尾巴署名",
"example": "慕名API"
},
{
"name": "break",
"type": "string",
"required": false,
"description": "自定义换行符,默认为\\n",
"example": "\\n"
},
{
"name": "size",
"type": "string",
"required": false,
"description": "自定义字体大小,默认46",
"example": "46"
},
{
"name": "x",
"type": "string",
"required": false,
"description": "打印位置起始X轴,默认:85",
"example": "85"
},
{
"name": "y",
"type": "string",
"required": false,
"description": "打印位置起始Y轴,默认:700",
"example": "700"
},
{
"name": "trans",
"type": "string",
"required": false,
"description": "透明度,默认为:0,不透明",
"example": "0"
}
]
{
"openapi": "3.1.1",
"info": {
"title": "图文(文字打印在图片上)",
"description": "将文字打印在背景图片中,背景图素材37张、字体素材5种可供切换,支持自定义换行、透明度、尾部信息、文字起始X轴、文字起始Y轴,返回格式为图片或JSON。",
"version": "1.0.0"
},
"paths": {
"/v1/text_img.php": {
"get": {
"summary": "图文(文字打印在图片上)",
"description": "将文字打印在背景图片中,背景图素材37张、字体素材5种可供切换,支持自定义换行、透明度、尾部信息、文字起始X轴、文字起始Y轴,返回格式为图片或JSON。",
"parameters": [
{
"name": "key",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "接口调用密钥"
},
{
"name": "msg",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "需要打印的文字内容"
},
{
"name": "type",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "json"
},
"description": "返回格式,可为:json(图片做b64位加密)、img,默认返回JSON"
},
{
"name": "back",
"in": "query",
"required": false,
"schema": {
"type": "integer"
},
"description": "背景图编号,当前仅可为:0-36,默认随机切换"
},
{
"name": "ttf",
"in": "query",
"required": false,
"schema": {
"type": "string"
},
"description": "字体编号,当前仅可为:1-5,默认随机切换"
},
{
"name": "tail",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "慕名API"
},
"description": "图文下部小尾巴署名"
},
{
"name": "break",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "\\n"
},
"description": "自定义换行符,默认为\\n"
},
{
"name": "size",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "46"
},
"description": "自定义字体大小,默认46"
},
{
"name": "x",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "85"
},
"description": "打印位置起始X轴,默认:85"
},
{
"name": "y",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "700"
},
"description": "打印位置起始Y轴,默认:700"
},
{
"name": "trans",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "0"
},
"description": "透明度,默认为:0,不透明"
}
],
"responses": {
"200": {
"description": "成功",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
},
"post": {
"summary": "图文(文字打印在图片上)",
"description": "将文字打印在背景图片中,背景图素材37张、字体素材5种可供切换,支持自定义换行、透明度、尾部信息、文字起始X轴、文字起始Y轴,返回格式为图片或JSON。",
"parameters": [
{
"name": "key",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "接口调用密钥"
},
{
"name": "msg",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "需要打印的文字内容"
},
{
"name": "type",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "json"
},
"description": "返回格式,可为:json(图片做b64位加密)、img,默认返回JSON"
},
{
"name": "back",
"in": "query",
"required": false,
"schema": {
"type": "integer"
},
"description": "背景图编号,当前仅可为:0-36,默认随机切换"
},
{
"name": "ttf",
"in": "query",
"required": false,
"schema": {
"type": "string"
},
"description": "字体编号,当前仅可为:1-5,默认随机切换"
},
{
"name": "tail",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "慕名API"
},
"description": "图文下部小尾巴署名"
},
{
"name": "break",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "\\n"
},
"description": "自定义换行符,默认为\\n"
},
{
"name": "size",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "46"
},
"description": "自定义字体大小,默认46"
},
{
"name": "x",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "85"
},
"description": "打印位置起始X轴,默认:85"
},
{
"name": "y",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "700"
},
"description": "打印位置起始Y轴,默认:700"
},
{
"name": "trans",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "0"
},
"description": "透明度,默认为:0,不透明"
}
],
"responses": {
"200": {
"description": "成功",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
}
}
},
"servers": [
{
"url": "https://xiaoapi.cn",
"description": "当前访问入口(https)"
}
]
}
{"code":200,"text":"你好!|欢迎使用慕名API|网址:https:xiaoapi.cn","img":"iVBORw0KGgoAAAANSUhEUgAABDgAAAkkCAMAAADODT+dAAADAFBMVEVG4kiT4ZfN382+3ba637qz3b+v4sm64b\/A4t+46Myl57ad4rSl4a6h3qvjjJPBh627WzvNbWryeoP5nKNxNCGrwMmTPyznqbTKh4tKb5TMoLmxeJtagKWctcsCPy1wa10wMj\/8uL7lz8pEJz7WuMyZYYhfP1lljLM4IDJ5fFdSLUiCV1eFj2JzYEy7m4hl......","tips":"慕名API:http:\/\/xiaoapi.cn"}
暂无详细文档
暂无代码示例。管理员可在后台用 AI 生成或手动编写。
// 结果将在此处显示
生效日期:2026年7月22日
欢迎使用 xiaoapi.cn(以下简称"本平台")。在使用本平台提供的 API 服务(以下简称"本服务")前,请务必仔细阅读并充分理解本免责声明。您以任何方式调用、访问或使用本服务,即视为您已阅读、理解并同意接受本声明的全部内容。
本平台作为 API 技术服务的提供方,仅提供技术接口与数据分发服务。本声明的目的在于明确平台与用户之间的责任边界,督促用户合法、合规地使用本服务,防范违法违规行为的发生。
用户在使用本服务时,明确禁止从事以下行为:
在法律法规允许的最大范围内,本平台对以下情形不承担责任:
因用户违反本声明或相关法律法规,导致本平台及其关联方、合作方遭受任何损失(包括但不限于赔偿款、罚款、律师费、诉讼费等),用户同意向本平台及相关方承担全部赔偿责任。
本平台有权根据法律法规变化、业务调整或监管要求,随时修改本声明。修改后的声明将在本页面公布,自公布之日起生效。您继续使用本服务,即视为接受更新后的声明。
如您对本声明有任何疑问,或发现他人存在违规使用本服务的行为,欢迎通过本平台公示的联系方式与我们联系,我们将及时处理。