## Basic model info - Model name: ideogram/ideogram ideogram-v4.6 - Model description: Ideogram 4.6 generates typography-rich images from text and edits source images with optional masks, reference images, transparent backgrounds, and automatic or manual high-precision context windows. It supports four quality tiers and custom output sizes up to 4096×4096, with higher prices above 4,194,304 pixels. - Endpoint name: edit ## Model schema The model schema is defined in the OpenAPI schema: [OpenAPI Schema](https://oapi.sunra.ai/main/ideogram/ideogram-v4.6/ddf6cb742904d9f8bc15081a014eb7c7ba010943.json) ### Model input schema The model input schema is: ```json { "additionalProperties": false, "description": "Input schema for Ideogram 4.6 image editing.", "properties": { "prompt": { "description": "Text prompt for image generation.", "maxLength": 10000, "minLength": 1, "title": "Prompt", "type": "string", "x-sr-order": 201 }, "width": { "anyOf": [ { "maximum": 4096, "minimum": 256, "multipleOf": 32, "type": "integer" }, { "type": "null" } ], "description": "Custom output width. Provide together with height; omit both for automatic sizing.", "title": "Width", "x-sr-order": 402 }, "height": { "anyOf": [ { "maximum": 4096, "minimum": 256, "multipleOf": 32, "type": "integer" }, { "type": "null" } ], "description": "Custom output height. Provide together with width; omit both for automatic sizing.", "title": "Height", "x-sr-order": 403 }, "seed": { "anyOf": [ { "minimum": 0, "type": "integer" }, { "type": "null" } ], "description": "Random seed for reproducibility.", "title": "Seed", "x-sr-order": 501 }, "background": { "anyOf": [ { "enum": [ "transparent", "opaque" ], "type": "string" }, { "type": "null" } ], "description": "Optional output background mode.", "title": "Background", "x-sr-order": 404 }, "context_window": { "default": "none", "description": "Automatic edit context selection. Auto requires high precision and a mask.", "enum": [ "none", "auto" ], "title": "Context Window", "type": "string", "x-sr-order": 305 }, "context_window_x_max": { "anyOf": [ { "minimum": 0, "type": "integer" }, { "type": "null" } ], "description": "Manual context box right edge (exclusive).", "title": "Context Window X Max", "x-sr-order": 308 }, "context_window_x_min": { "anyOf": [ { "minimum": 0, "type": "integer" }, { "type": "null" } ], "description": "Manual context box left edge (inclusive).", "title": "Context Window X Min", "x-sr-order": 306 }, "context_window_y_max": { "anyOf": [ { "minimum": 0, "type": "integer" }, { "type": "null" } ], "description": "Manual context box bottom edge (exclusive).", "title": "Context Window Y Max", "x-sr-order": 309 }, "context_window_y_min": { "anyOf": [ { "minimum": 0, "type": "integer" }, { "type": "null" } ], "description": "Manual context box top edge (inclusive).", "title": "Context Window Y Min", "x-sr-order": 307 }, "edit_precision": { "default": "regular", "description": "High precision preserves pixels outside the selected edit context.", "enum": [ "regular", "high" ], "title": "Edit Precision", "type": "string", "x-sr-order": 304 }, "image": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "string" } ], "description": "URL of the source image to edit.", "title": "Image", "x-sr-order": 301 }, "mask_image": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "string" }, { "type": "null" } ], "description": "Optional mask URL: black pixels are edited and white pixels are preserved.", "title": "Mask Image", "x-sr-order": 302 }, "number_of_images": { "default": 1, "description": "Number of images to generate.", "maximum": 8, "minimum": 1, "title": "Number Of Images", "type": "integer", "x-sr-order": 405 }, "quality": { "default": "medium", "description": "Quality tier. Price also depends on whether the output exceeds 4,194,304 pixels.", "enum": [ "very_low", "low", "medium", "high" ], "title": "Quality", "type": "string", "x-sr-order": 401 }, "reference_images": { "anyOf": [ { "items": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "string" } ] }, "maxItems": 4, "type": "array" }, { "type": "null" } ], "description": "Up to four reference images; at most three when a mask is present.", "title": "Reference Images", "x-sr-order": 303 } }, "required": [ "prompt", "image" ], "title": "EditInput", "type": "object" } ``` ### Model output schema The model output schema is: ```json { "description": "Ideogram 4.6 output with authoritative fal spend in USD.", "properties": { "images": { "items": { "properties": { "content_type": { "description": "The mime type of the file.", "title": "Content Type", "type": "string" }, "file_name": { "description": "The name of the file. It will be auto-generated if not provided.", "title": "File Name", "type": "string" }, "file_size": { "description": "The size of the file in bytes.", "title": "File Size", "type": "integer" }, "url": { "description": "The URL where the file can be downloaded from.", "title": "Url", "type": "string" } }, "required": [ "content_type", "file_name", "file_size", "url" ], "title": "SunraFile", "type": "object" }, "title": "Images", "type": "array" }, "units": { "description": "Final billable amount in USD from fal's authoritative result header.", "exclusiveMinimum": 0, "title": "Units", "type": "number" } }, "required": [ "images", "units" ], "title": "ImageGenerationOutput", "type": "object" } ``` ## Example inputs and outputs Use the following example inputs and outputs to understand the model. ### Input example ```json { "prompt": "", "width": null, "height": null, "seed": null, "background": null, "context_window": "none", "context_window_x_max": null, "context_window_x_min": null, "context_window_y_max": null, "context_window_y_min": null, "edit_precision": "regular", "image": "", "mask_image": null, "number_of_images": 1, "quality": "medium", "reference_images": null } ``` ### Output example ```json { } ``` ## Model code examples ### JavaScript ```javascript import { sunra } from "@sunra/client"; const result = await sunra.subscribe("ideogram/ideogram-v4.6/edit", { input: { prompt: '', quality: 'medium', width: null, height: null, background: null, number_of_images: 1, seed: null, image: '', mask_image: null, reference_images: null, edit_precision: 'regular', context_window: 'none', context_window_x_min: null, context_window_y_min: null, context_window_x_max: null, context_window_y_max: null }, logs: true, onQueueUpdate: (update) => { console.log(`Status Update: ${update.status}, Request ID: ${update.request_id}`); }, }); console.log(result.data); console.log(result.requestId); ``` ### Python ```python import sunra_client result = sunra_client.subscribe( "ideogram/ideogram-v4.6/edit", arguments={ "prompt": "", "quality": "medium", "width": None, "height": None, "background": None, "number_of_images": 1, "seed": None, "image": "", "mask_image": None, "reference_images": None, "edit_precision": "regular", "context_window": "none", "context_window_x_min": None, "context_window_y_min": None, "context_window_x_max": None, "context_window_y_max": None }, with_logs=True, on_enqueue=print, on_queue_update=print, ) print(result) ``` ### Java ```java import ai.sunra.client.*; import java.util.Map; import com.google.gson.JsonObject; var client = SunraClient.withEnvCredentials(); var response = client.subscribe( "ideogram/ideogram-v4.6/edit", SubscribeOptions.builder() .input(Map.of( "prompt", "", "quality", "medium", "width", null, "height", null, "background", null, "number_of_images", 1, "seed", null, "image", "", "mask_image", null, "reference_images", null, "edit_precision", "regular", "context_window", "none", "context_window_x_min", null, "context_window_y_min", null, "context_window_x_max", null, "context_window_y_max", null)) .resultType(JsonObject.class) .onQueueUpdate(update -> System.out.printf( "\nStatus Update: %s, Request ID: %s%n", update.getStatus(), update.getRequestId() )) .logs(true) .build() ); System.out.println("Completed!"); System.out.println(response.getData()); ``` ### Kotlin ```kotlin import ai.sunra.client.kt.* import com.google.gson.JsonObject val client = createSunraClient() val response = client.subscribe( endpointId = "ideogram/ideogram-v4.6/edit", input = mapOf( "prompt" to "", "quality" to "medium", "width" to null, "height" to null, "background" to null, "number_of_images" to 1, "seed" to null, "image" to "", "mask_image" to null, "reference_images" to null, "edit_precision" to "regular", "context_window" to "none", "context_window_x_min" to null, "context_window_y_min" to null, "context_window_x_max" to null, "context_window_y_max" to null), options = ai.sunra.client.kt.SubscribeOptions(logs = true), onUpdate = { update -> println("\nStatus Update: ${update.status}, Request ID: ${update.requestId}") } ) println("Completed!") println(response.data) ``` ### Curl ```bash curl --request POST \ --url https://api.sunra.ai/v1/queue/ideogram/ideogram-v4.6/edit \ --header "Authorization: Key $SUNRA_KEY" \ --header "Content-Type: application/json" \ --data '{"prompt":"","quality":"medium","width":null,"height":null,"background":null,"number_of_images":1,"seed":null,"image":"","mask_image":null,"reference_images":null,"edit_precision":"regular","context_window":"none","context_window_x_min":null,"context_window_y_min":null,"context_window_x_max":null,"context_window_y_max":null}' ``` ## Model readme undefined