EZLINK AI API
  1. 图像(Images)
EZLINK AI API
  • LLMs
    • 介绍
    • 项目说明
    • 导言
    • 身份验证
    • 发出请求
    • 参数详情
    • 音频(Audio)
      • 创建语音
      • 创建转录
      • 创建翻译
    • 聊天(Chat)
      • 聊天完成对象
      • 聊天完成块对象
      • 创建聊天补全
    • 自动补全(Completions)
      • 完成对象
      • 创建完成
    • 嵌入(Embeddings)
      • 嵌入对象
      • 创建嵌入
    • 图像(Images)
      • README
      • 图像对象
      • 创建图像
        POST
      • 创建图片编辑
        POST
      • 创建图像变体
        POST
    • 模型(Models)
      • 模型对象
      • 列出模型
      • 检索模型
    • 审查(Moderations)
      • 调节对象
      • 创建内容审核
  • Stability
    • Image-to-Video
      • Start generation
      • Fetch generation result
    • Upscale
      • Conservative
      • Start Creative Upscale
      • Fetch Creative Upscale result
    • Edit
      • Erase
      • Inpaint
      • Outpaint
      • Search and Replace
      • Remove Background
    • Generate
      • Stable Image Ultra
      • Stable Image Core
      • Stable Diffusion 3
    • Control
      • Sketch
      • Structure
      • Style
  • Midjourney
    • InsightFace任务提交
      • 提交swap_face任务
    • 任务提交
      • 执行动作
      • 提交Blend任务
      • 提交Describe任务
      • 提交Imagine任务
      • 提交Modal
      • 提交Shorten任务
    • 任务查询
      • 指定ID获取任务
      • 获取任务图片的seed(需设置mj或niji的私信ID)
  • File
  • Flux
    • 创建图像 Copy
  • video
    • 视频生成
    • 生成查询
  1. 图像(Images)

创建图片编辑

POST
https://api.ezlinkai.com/v1/images/edits
在给定原始图像和提示的情况下创建编辑或扩展图像。

Request

Header Params
Authorization
string 
optional
Example:
Bearer {{YOUR_API_KEY}}
Body Params multipart/form-data
image
file 
required
要编辑的图像。必须是有效的 PNG 文件,小于 4MB,并且是方形的。如果未提供遮罩,图像必须具有透明度,将用作遮罩。
Example:
cmMtdXBsb2FkLTE2ODc4MzMzNDc3NTEtMjA=/31225951_59371037e9_small.png
mask
file 
optional
附加图像,其完全透明区域(例如,alpha 为零的区域)指示image应编辑的位置。必须是有效的 PNG 文件,小于 4MB,并且尺寸与原始image相同。
Example:
[]
prompt
string 
required
所需图像的文本描述。最大长度为 1000 个字符。
Example:
A cute baby sea otter wearing a beret.
n
string 
optional
要生成的图像数。必须介于 1 和 10 之间。
Example:
2
size
string 
optional
生成图像的大小。必须是256x256、512x512或 1024x1024之一。
Example:
1024x1024
response_format
string 
optional
生成的图像返回的格式。必须是url或b64_json。
Example:
url
user
string 
optional
代表您的最终用户的唯一标识符,可以帮助 OpenAI 监控和检测滥用行为。了解更多。

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.ezlinkai.com/v1/images/edits' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--form 'image=@"cmMtdXBsb2FkLTE2ODc4MzMzNDc3NTEtMjA=/31225951_59371037e9_small.png"' \
--form 'prompt="A cute baby sea otter wearing a beret."' \
--form 'n="2"' \
--form 'size="1024x1024"' \
--form 'response_format="url"' \
--form 'user=""'

Responses

🟢200成功
application/json
Body
created
integer 
required
data
array [object {1}] 
required
url
string 
required
Example
{
    "created": 1589478378,
    "data": [
        {
            "url": "https://..."
        },
        {
            "url": "https://..."
        }
    ]
}
Modified at 2024-08-18 02:35:43
Previous
创建图像
Next
创建图像变体
Built with