Skip to content

API 使用

端点: /pjsk-sticker

方法: GET

查询参数:

  • character: 角色名称或团队名称(必需)
  • text: 要显示的文本内容(必需)
  • character_index: 角色贴纸索引,未提供时随机选择
  • position: 文本左下角坐标,使用重复参数如 &position=20&position=10
  • text_color: 文本颜色RGB值,使用重复参数如 &text_color=255&text_color=0&text_color=0
  • font_size: 字体大小,默认为 50
  • stroke_color: 文本描边颜色RGB值,默认使用重复参数
  • stroke_width: 文本描边宽度,默认为 4
  • font_path: 字体文件路径,未提供时自动选择,可选 YurukaStdShangShouFangTangTi
  • rotation_angle: 文本旋转角度,默认为 15

响应:

  • 200 OK: 返回生成的 PNG 图片文件
  • 404 Not Found: 找不到指定的角色或团队
  • 500 Internal Server Error: 服务器内部错误