Generate and edit images

Generate, edit and refine pictures with TokenRex image models, quality controls and transparent outputs.

By Apirex Team · Updated · Sources checked

On this page
TokenRex

Generation versus editing

Generation starts from a text description. Editing supplies an existing picture with instructions describing what should change and what must remain. For product photography, preserve the product’s identity and use a reference rather than expecting a text description to reproduce it exactly. Image models do not replace vision chat models for answering questions about an upload.

Model families

FamilyUseImportant difference
GPT Image SunburstQuality-first finished visuals and precise editsToken-billed; quality changes usage and latency.
GPT Image FlareFaster previews and interactive image editorsToken-billed; speed does not make generation free.
GPT Image 2.6Precise edits and short animated GIFs where supportedRead the specific model page for animation and markup controls.
Gemini image modelsFast generation, reference editing and resolution variantsThe 1K, 2K and 4K identifiers have separate listed rates.
Seedream 5 ProReference-guided posters, ads and text-heavy designsSupports multiple references and returns a JPEG; inspect output rather than assuming transparency.

Request and result

json
{
  "model": "gpt-image-2.5-sunburst",
  "prompt": "A front-facing studio photograph of a green ceramic mug on a clean background",
  "size": "1024x1024",
  "quality": "medium",
  "n": 1
}

This is a generation request body, not a browser request containing a private key. The integration sends it to /images/generations through the protected connection. Read the returned image data or URL according to the endpoint, then store the finished asset if your app needs it later. A submitted request is not proof that an image was generated.

Controls and costs

  • Describe subject, composition, lighting, aspect ratio and intended use.
  • Choose only a quality, size and file format the selected model supports.
  • GPT image edits can use a PNG mask; transparent mask areas indicate the area to edit. Gemini edits do not use that same mask format.
  • Request transparent output only when supported and verify the returned alpha channel.
  • Token-billed images have no universal per-image price. Read the recorded usage after each completed generation.

Build an image feature

Text
Add an image editor using TokenRex AI.
Let users upload one picture and describe the edit.
Keep the original, show the generated result only after success, and allow download.
Use a supported edit model and confirm its quality and size options.
Keep inputs after failure; do not launch a second paid request automatically.

Images models

Loading the live catalog…

Prices are estimates converted from TokenRex’s listed rates at ₹96 per US dollar and $0.30 per Rex credit. Actual requests follow reported usage and rounding. Token, character, image and duration prices are different units; compare within the same task. Catalog availability does not mean every feature is connected in your app.

Open TokenRex’s model catalog