{
  "openapi": "3.0.3",
  "info": {
    "title": "AI图片重绘（原局部重绘接口）",
    "description": "一键精准重绘，AI赋能图像内容秒级焕新，打造无痕编辑新体验。",
    "termsOfService": "https://www.showapi.com/helpcenter/view#/4019/2",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://route.showapi.com"
    }
  ],
  "paths": {
    "/3259-3": {
      "x-pointCode": 3,
      "x-mode": "mapping",
      "x-read-timeout": 10,
      "x-connect-timeout": 5,
      "post": {
        "summary": "查询历史任务结果",
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ShowapiResEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showapi_res_body": {
                          "type": "object",
                          "properties": {
                            "allPages": {
                              "type": "number",
                              "description": "总页码数"
                            },
                            "ret_code": {
                              "type": "number",
                              "description": "-1表示查询失败"
                            },
                            "contentlist": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "result": {
                                    "type": "string",
                                    "description": "任务结果图，该链接我们只保留一天，请您及时下载保存"
                                  },
                                  "status": {
                                    "type": "string",
                                    "description": "任务状态，有目前有done,wait,fail"
                                  },
                                  "taskOrder": {
                                    "type": "string",
                                    "description": "任务id"
                                  },
                                  "ct": {
                                    "type": "string",
                                    "description": "任务创建的时间"
                                  },
                                  "callback": {
                                    "type": "string",
                                    "description": "任务回调地址"
                                  }
                                }
                              },
                              "description": "重绘记录数组，可能为空数组"
                            },
                            "ret_msg": {
                              "type": "string",
                              "description": "调用错误信息"
                            },
                            "currentPage": {
                              "type": "number",
                              "description": "当前数据的页码数"
                            },
                            "allNum": {
                              "type": "number",
                              "description": "总任务数"
                            },
                            "maxResult": {
                              "type": "number",
                              "description": "最大任务数"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "3259_3_POST",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "查询历史的页码",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "每页最大返回记录条数",
            "required": false,
            "schema": {
              "type": "number"
            }
          }
        ]
      }
    },
    "/3259-2": {
      "x-pointCode": 2,
      "x-mode": "mapping",
      "x-read-timeout": 5,
      "x-connect-timeout": 5,
      "post": {
        "summary": "查询任务结果",
        "description": "结果图片我们只保留一天，请您及时下载保存该图片",
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ShowapiResEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showapi_res_body": {
                          "type": "object",
                          "properties": {
                            "result": {
                              "type": "string",
                              "description": "任务结果图，我们只保留一天，请您及时下载保存该图片"
                            },
                            "status": {
                              "type": "string",
                              "description": "任务状态，目前有done,wait,fail"
                            },
                            "taskOrder": {
                              "type": "string",
                              "description": "任务id"
                            },
                            "ct": {
                              "type": "string",
                              "description": "任务创建时间"
                            },
                            "ret_code": {
                              "type": "number",
                              "description": "0表示找到任务，-1表示没有"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "3259_2_POST",
        "parameters": [
          {
            "name": "task_id",
            "in": "query",
            "description": "您要查询的任务id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/3259-1": {
      "x-pointCode": 1,
      "x-mode": "mapping",
      "x-read-timeout": 10,
      "x-connect-timeout": 5,
      "post": {
        "summary": "提交重绘任务",
        "description": "通过此接入提交重绘任务",
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ShowapiResEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showapi_res_body": {
                          "type": "object",
                          "properties": {
                            "ret_code": {
                              "type": "number"
                            },
                            "remark": {
                              "type": "string"
                            },
                            "taskOrder": {
                              "type": "string"
                            },
                            "prompt": {
                              "type": "string"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "3259_1_POST",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "orgin_img_base64": {
                    "type": "string",
                    "description": "重绘前原图的base64字符串，orgin_img_base64和orgin_img_url二选一入参，支持png，jpg，webp图片，建议图片最大不要超过3.5M"
                  },
                  "orgin_img_url": {
                    "type": "string",
                    "description": "重绘前原图的URL地址，orgin_img_base64和orgin_img_url二选一入参，支持png，jpg，webp图片，建议图片最大不要超过5M"
                  },
                  "prompt": {
                    "type": "string",
                    "description": "重绘画面描述，请尽量写的简单明确，比如只是想将图中窗外的景色由秋天改为冬天，可以写：窗外的是冬天的景色"
                  },
                  "callback_url": {
                    "type": "string",
                    "description": "任务完成时的回调地址，建议使用https协议，我们采用POST palyload格式为application/json，示例数据：{\n  task_id: 'rHwnjJNvYisvUznIDREIMDs',\n  result: 'https://hj2.co/ai_img/1day_del/20250226/CQUtHGMIzQArvxiWgQdcgZ.png',\n  status: 'done'\n}其中结果图片我们只保留一天，请您及时保存哦！"
                  }
                },
                "required": [
                  "prompt"
                ]
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "AppKeyAuth": {
        "type": "apiKey",
        "in": "query",
        "name": "appKey",
        "description": "从 ShowAPI 控制台获取的 appKey，管理地址：https://www.showapi.com/console#/myApp"
      }
    },
    "schemas": {
      "ShowapiResEnvelope": {
        "type": "object",
        "description": "ShowAPI 统一返回包裹（业务数据位于 showapi_res_body）",
        "properties": {
          "showapi_res_code": {
            "type": "integer",
            "description": "API 返回的状态码"
          },
          "showapi_res_error": {
            "type": "string",
            "description": "API 返回的错误信息"
          },
          "showapi_res_id": {
            "type": "string",
            "description": "API 请求的唯一标识"
          },
          "showapi_fee_num": {
            "type": "integer",
            "description": "API 调用计费次数"
          }
        }
      }
    }
  },
  "security": [
    {
      "AppKeyAuth": []
    }
  ],
  "externalDocs": {
    "url": "https://www.showapi.com/apiGateway/view/3259?tab=book"
  },
  "x-apiCode": "3259",
  "x-is-own": true,
  "x-is-op": true
}