AI绘画API
  1. 线稿互转
AI绘画API
  • 使用前准备
  • 图片处理
    • 无损放大
      POST
    • 自动抠图
      POST
  • 人像处理
    • 人物换风格
      POST
    • 单人换脸
      POST
  • 线稿互转
    • 图片转线稿
      POST
  • Flux模型生图
    • 文生图
      POST
    • 图生图
      POST
  • MDJ模型生图
    • 文生图
      POST
    • 操作图片
      POST
    • 混合图片
      POST
    • 局部重绘
      POST
    • 图生文
      POST
  • 生成视频
    • 文生视频
      POST
    • 图生视频
      POST
  • 查询单个任务
    GET
  • 查询多个任务
    POST
  • 出图后续操作
    POST
  1. 线稿互转

图片转线稿

开发中
POST
/api/v2/line/image2line
把图片转成黑白线稿。

请求参数

Header 参数
Authorization
string 
管理后台获取的密钥
必需
示例值:
Bearer 1333_zrT4KITp20HcxxxxxxxxxxRD2C513FK40Pvq
Body 参数application/json
imgUrl
string 
必需
FAST,只支持快速模式
notifyHook
string 
可选
生成成功后的回调地址
示例
{
    "imgUrl": "https://reserve-clear-1256181000.cos.ap-shanghai.myqcloud.com/img/cdn/clear-20250605/871b0c2ef89ebeba34816e87987e3f62.png",
    "notifyHook": "https://abc.com/webhook/"
}

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.aihuihua.com/api/v2/line/image2line' \
--header 'Authorization: Bearer 1333_zrT4KITp20HcxxxxxxxxxxRD2C513FK40Pvq' \
--header 'Content-Type: application/json' \
--data-raw '{
    "imgUrl": "https://reserve-clear-1256181000.cos.ap-shanghai.myqcloud.com/img/cdn/clear-20250605/871b0c2ef89ebeba34816e87987e3f62.png",
    "notifyHook": "https://abc.com/webhook/"
}'

返回响应

🟢200成功
application/json
Body
code
string 
必需
1(提交成功), 22(排队中), 23(队列已满,请稍后尝试),24(prompt包含敏感词)
description
string 
描述
必需
result
string 
必需
任务ID,后续基于此ID获取、接收最终的生图结果
示例
{
    "code": 1,
    "description": "Submit success",
    "result": "123"
}
上一页
单人换脸
下一页
文生图
Built with