## Basic model info - Model name: ideogram/ideogram ideogram-v4.5 - Model description: Ideogram 4.5 generates posters, logos and designs with accurate typography and text rendering, in low, medium or high quality at sizes up to 2K. The edit endpoint edits a source image from a prompt with up to four reference images, an optional mask, and a high-precision mode that keeps unchanged pixels intact. - Endpoint name: edit ## Model schema The model schema is defined in the OpenAPI schema: [OpenAPI Schema](https://oapi.sunra.ai/main/ideogram/ideogram-v4.5/latest.json) ### Model input schema The model input schema is: ```json { "description": "Input schema for Ideogram 4.5 image editing.", "properties": { "prompt": { "description": "Text prompt describing the edit.", "maxLength": 10000, "minLength": 1, "title": "Prompt", "type": "string", "x-sr-order": 201 }, "aspect_ratio": { "anyOf": [ { "enum": [ "1:1", "4:3", "3:4", "16:9", "9:16" ], "type": "string" }, { "type": "null" } ], "description": "Optional output aspect ratio, allowed only for unmasked regular edits; omit it to keep the source size.", "title": "Aspect Ratio", "x-sr-order": 403 }, "seed": { "anyOf": [ { "minimum": 0, "type": "integer" }, { "type": "null" } ], "description": "Random seed for reproducibility.", "title": "Seed", "x-sr-order": 501 }, "edit_precision": { "default": "regular", "description": "Edit precision; high precision keeps unchanged pixels intact.", "enum": [ "regular", "high" ], "title": "Edit Precision", "type": "string", "x-sr-order": 401 }, "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": 404 }, "quality": { "default": "medium", "description": "Quality tier. Price is per returned image and does not depend on size, precision, or reference-image count.", "enum": [ "very_low", "low", "medium", "high" ], "title": "Quality", "type": "string", "x-sr-order": 402 }, "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 image URLs; at most three when mask_image is set.", "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.5 output with the final USD amount for per-image billing.", "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 (quality rate x returned image count).", "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": "", "aspect_ratio": null, "seed": 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.5/edit", { input: { prompt: '', image: '', mask_image: null, reference_images: null, edit_precision: 'regular', quality: 'medium', aspect_ratio: null, number_of_images: 1, seed: 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.5/edit", arguments={ "prompt": "", "image": "", "mask_image": None, "reference_images": None, "edit_precision": "regular", "quality": "medium", "aspect_ratio": None, "number_of_images": 1, "seed": 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.5/edit", SubscribeOptions.builder() .input(Map.of( "prompt", "", "image", "", "mask_image", null, "reference_images", null, "edit_precision", "regular", "quality", "medium", "aspect_ratio", null, "number_of_images", 1, "seed", 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.5/edit", input = mapOf( "prompt" to "", "image" to "", "mask_image" to null, "reference_images" to null, "edit_precision" to "regular", "quality" to "medium", "aspect_ratio" to null, "number_of_images" to 1, "seed" 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.5/edit \ --header "Authorization: Key $SUNRA_KEY" \ --header "Content-Type: application/json" \ --data '{"prompt":"","image":"","mask_image":null,"reference_images":null,"edit_precision":"regular","quality":"medium","aspect_ratio":null,"number_of_images":1,"seed":null}' ``` ## Model readme undefined