Build with ideogram character edit
Make your first request
Use your Sorceress API key on your server. The playground uses your signed-in account; your application uses the same model with an API key.
curl -X POST 'https://sorceress.games/api/v1/jobs' \
-H 'Authorization: Bearer $SORCERESS_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"model": "ideogram-character-edit",
"input": {
"style": "AUTO",
"num_images": "1",
"rendering_speed": "BALANCED",
"prompt": "<prompt>",
"image_url": "<image_url>",
"mask_url": "<mask_url>",
"reference_image_urls": "<reference_image_urls>"
}
}'Inputs & settings
seedintegerSeed for the random number generator
stylestringThe style type to generate with. Default value: "AUTO"
Options: AUTO, REALISTIC, FICTION
promptstringRequiredThe prompt to fill the masked part of the image. (Max length: 5000 characters)
mask_urlstringRequiredThe mask URL to inpaint the image. Should have the same aspect ratio as the input image. (Accepted types: image/jpeg, image/png, image/webp; Max size: 10.0MB)
image_urlstringRequiredThe image URL to generate an image from. Should have the same aspect ratio as the mask. (Accepted types: image/jpeg, image/png, image/webp; Max size: 10.0MB)
num_imagesstringNumber of images to generate.
Options: 1, 2, 3, 4
expand_promptbooleanDetermine if MagicPrompt should be used in generating the request or not. Default value: true (Boolean value (true/false))
rendering_speedstringThe rendering speed to use. Default value: "BALANCED"
Options: TURBO, BALANCED, QUALITY
reference_image_urlsarrayRequiredA set of images to use as character references. Currently only 1 image is supported, rest will be ignored. (maximum total size 10MB across all character references). The images should be in JPEG, PNG or WebP format (Accepted types: image/jpeg, image/png, image/webp; Max size: 10.0MB)
Full input schema
{
"type": "object",
"required": [
"prompt",
"image_url",
"mask_url",
"reference_image_urls"
],
"properties": {
"seed": {
"type": "integer",
"title": "Seed",
"description": "Seed for the random number generator"
},
"style": {
"enum": [
"AUTO",
"REALISTIC",
"FICTION"
],
"type": "string",
"title": "Style",
"default": "AUTO",
"description": "The style type to generate with. Default value: \"AUTO\""
},
"prompt": {
"type": "string",
"title": "Prompt",
"maxLength": 5000,
"description": "The prompt to fill the masked part of the image. (Max length: 5000 characters)"
},
"mask_url": {
"type": "string",
"title": "Mask URL",
"format": "uri",
"x-media": "image",
"description": "The mask URL to inpaint the image. Should have the same aspect ratio as the input image. (Accepted types: image/jpeg, image/png, image/webp; Max size: 10.0MB)"
},
"image_url": {
"type": "string",
"title": "Image URL",
"format": "uri",
"x-media": "image",
"description": "The image URL to generate an image from. Should have the same aspect ratio as the mask. (Accepted types: image/jpeg, image/png, image/webp; Max size: 10.0MB)"
},
"num_images": {
"enum": [
"1",
"2",
"3",
"4"
],
"type": "string",
"title": "Num images",
"default": "1",
"description": "Number of images to generate."
},
"expand_prompt": {
"type": "boolean",
"title": "Expand prompt",
"description": "Determine if MagicPrompt should be used in generating the request or not. Default value: true (Boolean value (true/false))"
},
"rendering_speed": {
"enum": [
"TURBO",
"BALANCED",
"QUALITY"
],
"type": "string",
"title": "Rendering speed",
"default": "BALANCED",
"description": "The rendering speed to use. Default value: \"BALANCED\""
},
"reference_image_urls": {
"type": "array",
"items": {
"type": "string",
"format": "uri"
},
"title": "Reference image URLs",
"x-media": "image",
"maxItems": 1,
"description": "A set of images to use as character references. Currently only 1 image is supported, rest will be ignored. (maximum total size 10MB across all character references). The images should be in JPEG, PNG or WebP format (Accepted types: image/jpeg, image/png, image/webp; Max size: 10.0MB)"
}
}
}Results, saved runs & billing
Media requests return a job ID. Poll GET /api/v1/jobs/:id until it succeeds or fails; keep the same ID while it is processing. Long chat requests can also return a saved job to poll. Completed outputs are stored in your account, and successful work is billed using your model's current rates.
A multi-step workflow may include separately billed successful actions. If a connection drops, check your saved run before submitting it again.






