Flux 创建(OpenAI dall-e-3格式)
OpenAPI Specification
yaml
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/v1/images/generations:
post:
summary: Flux 创建(OpenAI dall-e-3格式)
deprecated: false
description: |+
[图片](https://platform.openai.com/docs/api-reference/images)
给定提示和/或输入图像,模型将生成新图像。
相关指南:[图像生成](https://platform.openai.com/docs/guides/images)
根据提示创建图像。
tags:
- 绘画模型/FLUX 系列/gpt 兼容格式
parameters:
- name: Authorization
in: header
description: ''
required: false
example: Bearer {{YOUR_API_KEY}}
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
properties:
model:
type: string
description: 用于图像生成的模型。
prompt:
type: string
description: 所需图像的文本描述。最大长度为 1000 个字符。
'n':
type: integer
description: 要生成的图像数。必须介于 1 和 10 之间。
size:
type: string
description: 生成图像的大小。必须是256x256、512x512或 1024x1024之一。
quality:
type: string
description: 将生成的图像的质量。`hd`创建具有更精细细节和更高一致性的图像。此参数仅支持`dall-e-3`.
response_format:
type: string
description: 返回生成的图像的格式。必须是 或url之一b64_json。
style:
type: string
description: 风格
user:
type: string
description: >-
生成图像的风格。必须是
或`vivid`之一`natural`。生动使模型倾向于生成超真实和戏剧性的图像。自然使模型生成更自然、不太真实的图像。此参数仅支持`dall-e-3`.
aspect_ratio:
type: string
description: >-
图片比例: 枚举值Possible enum values: 21:9, 16:9, 4:3, 3:2, 1:1,
2:3, 3:4, 9:16, 9:21
x-apifox-mock: '1:1'
required:
- prompt
- aspect_ratio
x-apifox-orders:
- prompt
- model
- 'n'
- quality
- response_format
- style
- user
- size
- aspect_ratio
example: |-
{
"model": "flux-kontext-pro",
"prompt": "a beautiful landscape with a river and mountains",
// "size": "1024x1524",
"n": 1,
"aspect_ratio": "21:9"
}
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
created:
type: integer
data:
type: array
items:
type: object
properties:
url:
type: string
required:
- url
x-apifox-orders:
- url
required:
- created
- data
x-apifox-orders:
- created
- data
headers: {}
x-apifox-name: Create image
security: []
x-apifox-folder: 绘画模型/FLUX 系列/gpt 兼容格式
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/5443236/apis/api-232421932-run
components:
schemas: {}
securitySchemes:
bearer:
type: http
scheme: bearer
servers:
- url: https://www.anyapi.vip
description: 正式环境
security:
- bearer: []