Skip to content

Ideogram - Character Edit ​

Endpoint ​

POST /images/generations

Full URL: https://modelfold.ai/v1/images/generations

Authentication: every request must include the Authorization: Bearer <API_KEY> header.

Send model parameters directly in the JSON body. Do not wrap them in input. This request waits for generation to finish and returns data[].url; supported media models also offer async jobs, polling and callbacks. Replace example media URLs with your own publicly accessible files. See API gateway for billing and errors.

Input parameters for the generation task

Request Parameters ​

Body (application/json) ​

ParameterTypeRequiredDescription
modelstringYesThe model name to use for generation. Required field.
- Must be ideogram/character-edit for this endpoint Default:"ideogram/character-edit"。 Allowed values:ideogram/character-edit。 Example:ideogram/character-edit。
promptstringYesPrompt required by the ModelFold gateway; at most 2000 characters. The prompt to fill the masked part of the image. (Max length: 5000 characters) maxLength: 2000. Example:A fabulous look head tilted down, looking forward with a smile<br>。
image_urlstringYesThe image URL to generate an image from. Should have the same aspect ratio as the mask. (File URL after upload, not file content; Accepted types: image/jpeg, image/png, image/webp; Max size: 10.0MB) Example:https://file.aiquickdraw.com/custom-page/akr/section-images/17557680349256sa0lk53.webp。
mask_urlstringYesThe mask URL to inpaint the image. Should have the same aspect ratio as the input image. (File URL after upload, not file content; Accepted types: image/jpeg, image/png, image/webp; Max size: 10.0MB) Example:https://file.aiquickdraw.com/custom-page/akr/section-images/1755768046014ftgvma28.webp。
reference_image_urlsarray&lt;string&gt;YesA 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 (File URL after upload, not file content; Accepted types: image/jpeg, image/png, image/webp; Max size: 10.0MB) maxItems: 1.
rendering_speedstringNoThe rendering speed to use. Default value: "BALANCED" Default:"BALANCED"。 Allowed values:TURBO / BALANCED / QUALITY。 Example:BALANCED。
stylestringNoThe style type to generate with. Default value: "AUTO" Default:"AUTO"。 Allowed values:AUTO / REALISTIC / FICTION。 Example:AUTO。
expand_promptbooleanNoDetermine if MagicPrompt should be used in generating the request or not. Default value: true (Boolean value (true/false)) Example:true。
seedintegerNoSeed for the random number generator

Request Example ​

bash
curl -X POST "https://modelfold.ai/v1/images/generations" \
  -H "Authorization: Bearer $MODELFOLD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "ideogram/character-edit",
  "prompt": "A fabulous look head tilted down, looking forward with a smile\n",
  "image_url": "https://file.aiquickdraw.com/custom-page/akr/section-images/17557680349256sa0lk53.webp",
  "mask_url": "https://file.aiquickdraw.com/custom-page/akr/section-images/1755768046014ftgvma28.webp",
  "reference_image_urls": [
    "https://example.com/reference.png"
  ],
  "rendering_speed": "BALANCED",
  "style": "AUTO"
}'
json
{
  "model": "ideogram/character-edit",
  "prompt": "A fabulous look head tilted down, looking forward with a smile\n",
  "image_url": "https://file.aiquickdraw.com/custom-page/akr/section-images/17557680349256sa0lk53.webp",
  "mask_url": "https://file.aiquickdraw.com/custom-page/akr/section-images/1755768046014ftgvma28.webp",
  "reference_image_urls": [
    "https://example.com/reference.png"
  ],
  "rendering_speed": "BALANCED",
  "style": "AUTO"
}

Response ​

200 — Generation completed. usage contains actual billing details; result URLs are illustrative. ​

json
{
  "ok": true,
  "created": 1792134000,
  "data": [
    {
      "url": "https://modelfold.ai/uploads/outputs/result.png"
    }
  ],
  "usage": {}
}

ModelFold — one API for all the best AI models.