Edit image
Creates an edited image from one or more source images and a prompt.
Creates an edited image from one or more source images and a prompt.
Authorization
bearerAuth Bearer token authentication using API keys
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/v1/images/edits" \ -H "Content-Type: application/json" \ -d '{ "images": [ { "image_url": "https://example.com/source-image.png" } ], "prompt": "Add a watercolor effect to this image" }'{
"created": 0,
"data": [
{
"b64_json": "string",
"revised_prompt": "string"
}
],
"background": "transparent",
"output_format": "png",
"quality": "low",
"size": "string",
"usage": {
"input_tokens": 0,
"input_tokens_details": {
"image_tokens": 0,
"text_tokens": 0
},
"output_tokens": 0,
"total_tokens": 0,
"output_tokens_details": {
"image_tokens": 0,
"text_tokens": 0
}
}
}How is this guide?
Last updated on