POST
/
v1
/
images
/
edits
curl --request POST \
  --url https://api.galadriel.com/v1/images/edits \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'prompt=<string>' \
  --form 'model=<string>' \
  --form n=1 \
  --form response_format=url \
  --form size=1024x1024 \
  --form 'user=<string>'
{
    "created": 1,
    "data": [
        {
            "b64_json": null,
            "revised_prompt": null,
            "url": "https://example.com/image"
        }
    ]
}
{
    "created": 1,
    "data": [
        {
            "b64_json": null,
            "revised_prompt": null,
            "url": "https://example.com/image"
        }
    ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header.

example value: Bearer Galadriel-API-key

Get API key from Galadriel dashboard.

Body

multipart/form-data
image
file
required

The image to be edited.

prompt
string
required

A text description of the desired image(s).

model
string
required

The model to use for image editing.

n
integer
default:1

The number of images to generate. Must be between 1 and 10.

Required range: 1 <= x <= 10
response_format
enum<string>
default:url

The format in which the generated images are returned.

Available options:
url,
b64_json
size
enum<string>
default:1024x1024

The size of the generated images.

Available options:
256x256,
512x512,
1024x1024
user
string | null

A unique identifier representing your end-user

Response

200
application/json
Returns a list of image objects.
created
integer
required
data
object[]
required