POST
/
api
/
message
/
edit_image
Edit Image
curl --request POST \
  --url https://api.trieve.ai/api/message/edit_image \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'TR-Dataset: <tr-dataset>' \
  --data '{
  "input_images": [
    {
      "file_name": "<string>",
      "image_src": {
        "base64": "<string>"
      }
    }
  ],
  "mime_type": "<string>",
  "n": 1,
  "prompt": "<string>",
  "quality": "low",
  "size": "1024x1024"
}'
{
  "image_urls": [
    "<string>"
  ]
}

Authorizations

Authorization
string
header
required

Headers

TR-Dataset
string<uuid>
required

The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.

Body

application/json

JSON request payload to edit an image

input_images
object[]
required

The images to edit

prompt
string
required

The prompt describing the desired edit

mime_type
string | null

The mime type of the uploaded image(s)

n
integer | null

The number of images to generate (default: 1)

Required range: x >= 0
quality
enum<string>
Available options:
low,
medium,
high
size
enum<string>
Available options:
1024x1024,
1024x1536,
1536x1024

Response

A list of base64 encoded images

image_urls
string[]
required

The URL of the generated image