Skip to main content
POST
/
images
/
edits
Edit Images
curl --request POST \
  --url https://{gatewayBaseURL}/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>"
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://www.truefoundry.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

multipart/form-data

Source image(s), optional mask, prompt, and edit options.

model
string
required

The model to use for image generation.

image
required

The image(s) to edit. Must be a supported image file or an array of images.

prompt
string
required

A text description of the desired image(s).

background
string | null

Allows to set transparency for the background of the generated image(s).

input_fidelity
string | null

Control how much effort the model will exert to match the style and features of input images.

mask
string | null

An additional image whose fully transparent areas indicate where image should be edited.

n
integer | null

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

output_compression
integer | null

The compression level (0-100%) for the generated images.

output_format
string | null

The format in which the generated images are returned.

partial_images
integer | null

The number of partial images to generate. Used for streaming responses.

quality
string | null

The quality of the image that will be generated.

response_format
string | null

The format in which generated images are returned. Must be one of url or b64_json.

size
string | null

The size of the generated images.

stream
boolean | null

Edit the image in streaming mode.

user
string | null

A unique identifier representing your end-user.

Response

Edited images.

created
number
required

Unix timestamp when the image was generated.

data
object[]
required

Generated images.