For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Manage API keysIdeogram
  • Ideogram API
    • API Overview
    • API Setup
    • Account API Page
    • Custom Model Training
    • API Pricing
    • API Status
  • API Reference
    • POSTGenerate with Ideogram 3.0
    • POSTGenerate with Ideogram 3.0 (Transparent Background)
    • POSTInpaint with Ideogram 3.0
    • POSTRemix with Ideogram 3.0
    • POSTReframe with Ideogram 3.0
    • POSTReplace Background with Ideogram 3.0
    • POSTRemove Background
    • POSTLayerize Text
    • POSTEdit images with a prompt
    • POSTUpscale
    • POSTDescribe
    • POSTGenerate (legacy)
    • POSTEdit with Ideogram 3.0 (legacy)
    • POSTEdit (legacy)
    • POSTRemix (legacy)
    • POSTReframe (legacy)
  • Custom Model Training
    • GETList datasets
    • POSTCreate a new dataset
    • GETGet a dataset
    • POSTUpload assets to a dataset
    • POSTTrain a custom Ideogram v3 model
    • GETList models
    • GETGet model details
LogoLogo
LogoLogo
Manage API keysIdeogram
API Reference

Edit (legacy)

POST
https://api.ideogram.ai/edit
POST
/edit
$curl -X POST https://api.ideogram.ai/edit \
> -H "Api-Key: <apiKey>" \
> -H "Content-Type: multipart/form-data" \
> -F image_file=@string \
> -F mask=@string \
> -F prompt="A serene tropical beach scene. Dominating the foreground are tall palm trees with lush green leaves, standing tall against a backdrop of a sandy beach. The beach leads to the azure waters of the sea, which gently kisses the shoreline. In the distance, there is an island or landmass with a silhouette of what appears to be a lighthouse or tower. The sky above is painted with fluffy white clouds, some of which are tinged with hues of pink and orange, suggesting either a sunrise or sunset." \
> -F model="V_2_TURBO"
1{
2 "created": "2000-01-23 04:56:07+00:00",
3 "data": [
4 {
5 "prompt": "A serene tropical beach scene. Dominating the foreground are tall palm trees with lush green leaves, standing tall against a backdrop of a sandy beach. The beach leads to the azure waters of the sea, which gently kisses the shoreline. In the distance, there's an island or landmass with a silhouette of what appears to be a lighthouse or tower. The sky above is painted with fluffy white clouds, some of which are tinged with hues of pink and orange, suggesting either a sunrise or sunset.",
6 "resolution": "1024x1024",
7 "is_image_safe": true,
8 "seed": 12345,
9 "url": "https://ideogram.ai/api/images/direct/8YEpFzHuS-S6xXEGmCsf7g",
10 "upscaled_resolution": "4096x4096",
11 "style_type": "REALISTIC"
12 }
13 ]
14}

Edit a given image synchronously using the provided mask. The mask indicates which part of the image should be edited, while the prompt and chosen style type can further guide the edit.

Supported image formats include JPEG, PNG, and WebP.

Images links are available for a limited period of time; if you would like to keep the image, you must download it.

Was this page helpful?
Previous

Remix (legacy)

Next
Built with

Authentication

Api-Keystring

API key for access control. Use in the header with the name “Api-Key”

Request

A request to edit an image with Ideogram.
image_filefileRequired

An image binary (max size 10MB); only JPEG, WebP and PNG formats are supported at this time.

maskfileRequired

A black and white image of the same size as the image being edited (max size 10MB). Black regions in the mask should match up with the regions of the image that you would like to edit; only JPEG, WebP and PNG formats are supported at this time.

promptstringRequired
The prompt used to describe the edited result.
modelenumRequiredDefaults to V_2

The model used to generate an image or edit one. /generate and /remix supports all model types, however, /edit is only supported for V_2 and V_2_TURBO.

magic_prompt_optionenumOptional
Determine if MagicPrompt should be used in generating the request or not.
Allowed values:
num_imagesintegerOptional1-8Defaults to 1
The number of images to generate.
seedintegerOptional0-2147483647
Random seed. Set for reproducible generation.
style_typeenumOptional

The style type to generate with; this is only applicable for models V_2 and above and should not be specified for model versions V_1.

Response

Image edits generated successfully.
createddatetime
The time the request was created.
datalist of objects

A list of ImageObjects that contain the generated image(s).

Errors

400
Bad Request Error
401
Unauthorized Error
422
Unprocessable Entity Error
429
Too Many Requests Error