curl --request POST \
--url https://{controlPlaneURL}/api/llm/images/edits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form 'model=<string>' \
--form 'image=<string>' \
--form 'prompt=<string>' \
--form 'background=<string>' \
--form 'input_fidelity=<string>' \
--form 'mask=<string>' \
--form n=123 \
--form output_compression=123 \
--form 'output_format=<string>' \
--form partial_images=123 \
--form 'quality=<string>' \
--form 'response_format=<string>' \
--form 'size=<string>' \
--form stream=true \
--form 'user=<string>'
{
"created": 123,
"data": [
{
"url": "<string>",
"b64_json": "<string>",
"revised_prompt": "<string>"
}
]
}
Edits an image given the original image and a prompt.
curl --request POST \
--url https://{controlPlaneURL}/api/llm/images/edits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form 'model=<string>' \
--form 'image=<string>' \
--form 'prompt=<string>' \
--form 'background=<string>' \
--form 'input_fidelity=<string>' \
--form 'mask=<string>' \
--form n=123 \
--form output_compression=123 \
--form 'output_format=<string>' \
--form partial_images=123 \
--form 'quality=<string>' \
--form 'response_format=<string>' \
--form 'size=<string>' \
--form stream=true \
--form 'user=<string>'
{
"created": 123,
"data": [
{
"url": "<string>",
"b64_json": "<string>",
"revised_prompt": "<string>"
}
]
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Successfully edited images
The response is of type object
.
Was this page helpful?