Edits(DALL·E 2)
POST
/images/editsOpenAI Guide
OpenAI API Reference
Create edited versions of images by having the model replace certain areas of a pre-existing image according to a new text prompt (DALL·E 2 only)
Price List:https://302.ai/pricing_api/
请求参数
Header Params
Authorization
string
optional
Example:
Bearer {{YOUR_API_KEY}}
Body Params application/json
prompt
string
required
Text description of the target image. Maximum length is 1000 characters.
n
integer
optional
The number of images to generate. Must be between 1 and 10.
size
string
optional
The size of the generated image. Must be one of 256x256, 512x512, or 1024x1024.
Example
{
"prompt": "A colorful sunset over the mountains",
"n": 1,
"model": "dall-e-3",
"size": "1024x1024"
}
示例代码
Responses
Create image(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
Data Schema
created
integer
required
data
array [object {1}]
required
url
string
required
ExampleCreate image
{
"created": 1589478378,
"data": [
{
"url": "https://..."
},
{
"url": "https://..."
}
]
}
Last modified: 2 个月前