ideogram-image-edit

Ideogram Image Edit - Edit an image using inpainting

Edit an image using Ideogram AI's inpainting capabilities. Provide an image and a mask to specify the areas to edit, along with a prompt describing the desired changes.

Key features:

  • Inpainting: Edit specific areas of an image using a mask
  • Multiple rendering speeds: TURBO, DEFAULT, or QUALITY
  • MagicPrompt: Automatically enhance your prompt for better results
  • Style customization: Use style codes, style types, and reference images
  • Character reference: Use reference images to maintain character consistency

Supported formats: JPEG, WebP, PNG (max 10MB each)

post/v1/ai/ideogram-image-edit

Request

  • Base URL: https://api.magnific.com
  • URL: https://api.magnific.com/v1/ai/ideogram-image-edit
  • Auth: API key in header x-magnific-api-key

Request body

promptstring required

The prompt describing the desired changes to the image.

imagestring required

The image to be edited. Supports HTTPS URLs or Base64 encoded string. Supported formats: JPEG, WebP, PNG (max 10MB)

maskstring required

A black and white image of the same size as the image being edited. Black regions indicate where to edit the image. Supports HTTPS URLs or Base64 encoded string. Supported formats: JPEG, WebP, PNG (max 10MB)

seedinteger

Optional seed for reproducibility

rendering_speed'TURBO' | 'DEFAULT' | 'QUALITY'

The rendering speed for image generation.

  • TURBO: Fastest, lower quality
  • DEFAULT: Balanced speed and quality
  • QUALITY: Slower, higher quality
magic_prompt'AUTO' | 'ON' | 'OFF'

Determine if MagicPrompt should be used to enhance the prompt.

  • AUTO: Automatically decide
  • ON: Always use MagicPrompt
  • OFF: Never use MagicPrompt
style_codesstring[]

A list of style codes to use for image generation

style_type'AUTO' | 'GENERAL' | 'REALISTIC' | 'DESIGN'

The type of style to use. Must be specified if character_reference_images is provided.

  • AUTO: Automatically select style
  • GENERAL: General purpose style
  • REALISTIC: Realistic style
  • DESIGN: Design-oriented style
style_reference_imagesstring[]

Images to use as style references. Provide as Base64 strings or URLs. Maximum total size: 10MB across all references. Supported formats: JPEG, PNG, WebP

character_reference_imagesstring[]

Images to use as character references for consistency. Provide as Base64 strings or URLs. Maximum total size: 10MB across all references. Supported formats: JPEG, PNG, WebP

webhook_urlstring uri

Optional callback URL that will receive asynchronous notifications whenever the task changes status. The payload sent to this URL is the same as the corresponding GET endpoint response, but without the data field.

Example request

{
  "prompt": "A beautiful sunset over the ocean",
  "image": "iVBORw0KGgoAAAANSUhEUgAA...",
  "mask": "iVBORw0KGgoAAAANSUhEUgAA...",
  "seed": 12345,
  "rendering_speed": "DEFAULT",
  "magic_prompt": "AUTO",
  "color_palette": {
    "members": [
      {
        "color_hex": "#FF5733",
        "color_weight": 0.5
      }
    ]
  },
  "style_codes": [
    "style_code_1",
    "style_code_2"
  ],
  "style_type": "AUTO",
  "style_reference_images": [
    "https://example.com/style-ref.jpg"
  ],
  "character_reference_images": [
    "https://example.com/character-ref.jpg"
  ],
  "webhook_url": "https://www.example.com/webhook"
}

Response

OK - The task exists and the status is returned

Example response

{
  "data": {
    "generated": [
      "https://openapi-generator.tech",
      "https://openapi-generator.tech"
    ],
    "task_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
    "status": "CREATED"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.