Mikiacg

图片

图片帖的发布、查询和互动操作接口。


获取图片列表

POST/api/trpc/image.list公开
参数类型必填说明
limitnumber每页数量
pagenumber页码
searchstring搜索关键词
tagSlugsstring[]标签 slug 筛选
sortBystring排序:latest / views

获取图片详情

POST/api/trpc/image.getById公开
参数类型必填说明
idstring图片帖 ID

创建图片帖

POST/api/trpc/image.create需登录content:write
参数类型必填说明
titlestring标题(1-200 字符)
imagesstring[]图片 URL 数组(至少一张)
descriptionstring描述(最长 5000 字符)
tagNamesstring[]标签名称数组
curl -X POST 'https://your-domain.com/api/trpc/image.create' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer sk-your-api-key' \
-d '{"json":{"title":"图片标题","images":["https://example.com/img1.jpg","https://example.com/img2.jpg"],"tagNames":["标签1"]}}'

批量创建图片帖

POST/api/trpc/image.batchCreate需登录content:write
参数类型必填说明
postsobject[]图片帖数组,每项同单个创建的字段

更新图片帖

POST/api/trpc/image.update需登录content:write
参数类型必填说明
idstring图片帖 ID
titlestring新标题
descriptionstring新描述
imagesstring[]新图片 URL 数组
tagNamesstring[]新标签

图片互动

POST/api/trpc/image.toggleReaction需登录content:write
参数类型必填说明
imagePostIdstring图片帖 ID
typestringlikedislike
POST/api/trpc/image.toggleFavorite需登录content:write
参数类型必填说明
imagePostIdstring图片帖 ID

命令面板

快速导航和操作