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/generations
图片
给定提示和/或输入图像,模型将生成新图像。
相关指南:图像生成
根据提示创建图像。

Request

Header Params
Authorization
string 
optional
Example:
Bearer {{YOUR_API_KEY}}
Body Params application/json
prompt
string 
required
所需图像的文本描述。最大长度为 1000 个字符。
model
string 
optional
用于图像生成的模型。
n
integer 
optional
要生成的图像数。必须介于 1 和 10 之间。
quality
string 
optional
将生成的图像的质量。hd创建具有更精细细节和更高一致性的图像。此参数仅支持dall-e-3.
response_format
string 
optional
返回生成的图像的格式。必须是 或url之一b64_json。
style
string 
optional
生成图像的大小。必须是256x256、512x512或1024x1024for之一dall-e-2。对于模型来说,必须是1024x1024、1792x1024、 或之一。1024x1792``dall-e-3
user
string 
optional
生成图像的风格。必须是 或vivid之一natural。生动使模型倾向于生成超真实和戏剧性的图像。自然使模型生成更自然、不太真实的图像。此参数仅支持dall-e-3.
size
string 
optional
生成图像的大小。必须是256x256、512x512或 1024x1024之一。
Example
{
    "model": "dall-e-3",
    "prompt": "A cute baby sea otter",
    "n": 1,
    "size": "1024x1024"
  }

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/generations' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "dall-e-3",
    "prompt": "A cute baby sea otter",
    "n": 1,
    "size": "1024x1024"
  }'

Responses

🟢200Create image
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:39
Previous
图像对象
Next
创建图片编辑
Built with