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

      查询多个任务

      开发中
      POST
      /api/v2/task/list/
      同时查询最多20个任务的结果。
      注意:
      1、“progress”值为估算值,不准确。
      2、此接口仅作为任务长时间没有回调的辅助接口,及如果单个任务超过5分钟都没有回调,那么可以单独请求一下此接口,看一下进度。
      3、此接口不支持长时间、高频度的调用。
      4、强烈建议给每个任务都配置 notifyHook 地址,减少对此接口的依赖,因为会更实时,用户体验也更好。

      请求参数

      Header 参数
      Authorization
      string 
      管理后台获取的密钥
      必需
      示例值:
      Bearer 1333_zrT4KITp20HcxxxxxxxxxxRD2C513FK40Pvq
      Body 参数application/json
      ids
      array[string]
      多个任务id的数组
      必需
      示例
      {
          "ids": [
              "123",
              "345"
          ]
      }

      示例代码

      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/task/list/' \
      --header 'Authorization: Bearer 1333_zrT4KITp20HcxxxxxxxxxxRD2C513FK40Pvq' \
      --header 'Content-Type: application/json' \
      --data-raw '{
          "ids": [
              "123",
              "345"
          ]
      }'

      返回响应

      🟢200成功
      application/json
      Body
      object {0}
      示例
      [
          {
              "id": 123,
              "action": "FACESTYLE",
              "status": "SUCCESS",
              "cost": 40,
              "description": "Submit success",
              "progress": "100%",
              "imageUrl": "http://xxxx.com/1.png",
              "notifyHook": "http://xxxx.com/webhook"
          },
          {
              "id": 456,
              "action": "FACESTYLE",
              "status": "SUCCESS",
              "cost": 40,
              "description": "Submit success",
              "progress": "100%",
              "imageUrl": "http://xxxx.com/2.png",
              "notifyHook": "http://xxxx.com/webhook"
          }
      ]
      上一页
      查询单个任务
      下一页
      出图后续操作
      Built with