## 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: text-to-image ## 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 text-to-image generation.", "properties": { "prompt": { "description": "Text prompt for image generation.", "maxLength": 10000, "minLength": 1, "title": "Prompt", "type": "string", "x-sr-order": 201 }, "aspect_ratio": { "default": "1:1", "description": "Output aspect ratio. Price is per image by quality and does not depend on size.", "enum": [ "1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3", "5:4", "4:5", "2:1", "1:2", "16:10", "10:16" ], "title": "Aspect Ratio", "type": "string", "x-sr-order": 401 }, "prompt_enhancer": { "default": true, "description": "Whether to expand the prompt automatically.", "title": "Prompt Enhancer", "type": "boolean", "x-sr-order": 202 }, "seed": { "anyOf": [ { "minimum": 0, "type": "integer" }, { "type": "null" } ], "description": "Random seed for reproducibility.", "title": "Seed", "x-sr-order": 501 }, "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 charged per returned image at this tier.", "enum": [ "low", "medium", "high" ], "title": "Quality", "type": "string", "x-sr-order": 403 }, "resolution": { "default": "1K", "description": "Output resolution tier. Price is per image by quality and does not depend on size.", "enum": [ "1K", "2K" ], "title": "Resolution", "type": "string", "x-sr-order": 402 } }, "required": [ "prompt" ], "title": "TextToImageInput", "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": "1:1", "prompt_enhancer": true, "seed": null, "number_of_images": 1, "quality": "medium", "resolution": "1K" } ``` ### Output example ```json { } ``` ## Model code examples ### JavaScript ```javascript import { sunra } from "@sunra/client"; const result = await sunra.subscribe("ideogram/ideogram-v4.5/text-to-image", { input: { prompt: '', prompt_enhancer: true, aspect_ratio: '1:1', resolution: '1K', quality: 'medium', 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/text-to-image", arguments={ "prompt": "", "prompt_enhancer": True, "aspect_ratio": "1:1", "resolution": "1K", "quality": "medium", "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/text-to-image", SubscribeOptions.builder() .input(Map.of( "prompt", "", "prompt_enhancer", true, "aspect_ratio", "1:1", "resolution", "1K", "quality", "medium", "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/text-to-image", input = mapOf( "prompt" to "", "prompt_enhancer" to true, "aspect_ratio" to "1:1", "resolution" to "1K", "quality" to "medium", "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/text-to-image \ --header "Authorization: Key $SUNRA_KEY" \ --header "Content-Type: application/json" \ --data '{"prompt":"","prompt_enhancer":true,"aspect_ratio":"1:1","resolution":"1K","quality":"medium","number_of_images":1,"seed":null}' ``` ## Model readme undefined