ai-gateway
  1. Stable Diffusion
ai-gateway
  • Suno
    • Suno Generate
      POST
    • Suno Feed
      GET
    • Suno Concat
      POST
    • Suno Generate (Extend)
      POST
  • Stable Diffusion
    • Stable Diffusion 文生图
      POST
    • Stable Diffusion 图生图
      POST
    • ReActor image
      POST
  • Create chat completion
    POST
  • Create chat completion with stream
    POST
  • Create image
    POST
  • Create speech
    POST
  • Create transcription
    POST
  • asr
    POST
  • asr Copy
    POST
  • Create transcription Copy
    POST
  1. Stable Diffusion

ReActor image

POST
/v1/sd/reactor/image
Stable Diffusion - ReActor /reactor/image API 接口的实现。

请求参数

Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
Body 参数application/json
object {0}
示例
{
    "source_image": "data:image/jpeg;base64,...",
    "target_image": "data:image/jpeg;base64,...",
    "source_faces_index": [
        0
    ],
    "face_index": [
        0
    ],
    "upscaler": "None",
    "scale": 1,
    "upscale_visibility": 1,
    "face_restorer": "CodeFormer",
    "restorer_visibility": 1,
    "restore_first": 1,
    "model": "inswapper_128.onnx",
    "gender_source": 0,
    "gender_target": 0,
    "save_to_file": 0,
    "result_file_path": ""
}

示例代码

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.aigateway.work/v1/sd/reactor/image' \
--header 'Content-Type: application/json' \
--data-raw '{
    "source_image": "data:image/jpeg;base64,...",
    "target_image": "data:image/jpeg;base64,...",
    "source_faces_index": [
        0
    ],
    "face_index": [
        0
    ],
    "upscaler": "None",
    "scale": 1,
    "upscale_visibility": 1,
    "face_restorer": "CodeFormer",
    "restorer_visibility": 1,
    "restore_first": 1,
    "model": "inswapper_128.onnx",
    "gender_source": 0,
    "gender_target": 0,
    "save_to_file": 0,
    "result_file_path": ""
}'

返回响应

🟢200成功
application/json
Body
object {0}
示例
{}
修改于 2024-04-23 10:58:44
上一页
Stable Diffusion 图生图
下一页
Create chat completion
Built with