LongCat Image Edit

LONGCAT_IMAGE_EDIT

Edits a picture from an instruction in English or Chinese with LongCat-Image-Edit (6B, Apache-2.0): local and global changes, text and style edits, aiming to keep the rest of the picture; it can learn your own kind of edit from 4 to 200 examples.

Image Editingimage-editinginstruction-editingtext-editinglongcatapache-2.0Fine-tunable
LongCat Image Edit: Image Editing model on Kainguru

About LongCat Image Edit

Capabilities

  • Plain instructions — in English or Chinese: add, remove, replace, recolour, restyle, or change the background
  • Text in pictures — writes or replaces words; put the text to render in quotation marks
  • Consistency — aims to change only what the instruction names and to keep the rest of the picture as it was
  • Fine-tuning — teach it your own kind of edit from 4 to 200 before-and-after examples

Good to know

  • Pictures are PNG, JPEG or WebP, at most 50 MB and 16.8 megapixels, the long side at most 8 times the short side; the result has about one megapixel in the picture's aspect ratio.
  • An edit can change details the instruction does not mention; if it does, try another seed or a more specific instruction.
  • 50 denoising steps by default; while guidance is above 1, each step runs the model twice. Guidance 1 to 10; 4.5 suits most instructions.
  • Instructions are at most 512 tokens; each character of a passage in quotation marks counts as one token.
  • Fine-tuning takes one ZIP (at most 2 GB, no password) with 4 to 200 examples of a picture, the picture after the edit (the same size) and the instruction, and a manifest.jsonl holding one {"input": "...", "target": "...", "instruction": "..."} line each. Training works at 512 x 512 pixels (centre crops) and stops after the steps you ask for or after 9 hours, whichever comes first, keeping what it has learned.

LongCat Image Edit inputs and output

NameTypeRequiredDefaultDetails
imagefileYes—The picture to edit: PNG, JPEG or WebP, at most 50 MB and 16.8 megapixels, at least 16 pixels a side, its long side at most 8 times its short side.
1–2048 characters · image/png, jpeg, webp
instructiontextYes—What to change, in plain words, at most 512 tokens, e.g. "replace the red car with a blue bicycle" or "make it a snowy evening".
1–1000 characters
guidance_scalenumberNo4.5How closely the result follows the instruction; high values can look overdone. How guidance affects the time per step is in Good to know.
1–10
num_inference_stepsintegerNo50Denoising steps; more steps take longer.
1–50
seedintegerNo—The same seed and inputs give the same result. Leave empty for a random seed.
0–2147483647
negative_prompttextNo—What the result should avoid, e.g. blurry, text, extra limbs, at most 512 tokens. It takes effect while guidance is above 1.
Max 1000 characters

Output. Returns PNG image: The edited picture (PNG).

Run LongCat Image Edit with the API

Send your API key in the X-API-Key header. The run is asynchronous: submit it, then poll it until it finishes. Create an API key.

cURL
curl -X POST "https://api.kainguru.com/api/v1/executions?mlFlowId=LONGCAT_IMAGE_EDIT" \
  -H "X-API-Key: kg_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "image": "https://example.com/input.png",
    "instruction": "example",
    "guidance_scale": 4.5,
    "num_inference_steps": 50
  },
  "outputFormat": "json"
}'

# Poll until the execution reaches a terminal state
curl "https://api.kainguru.com/api/v1/executions/{executionId}" \
  -H "X-API-Key: kg_your_api_key"
Python
from kainguru import KainguruClient

with KainguruClient(api_key="kg_your_api_key", base_url="https://api.kainguru.com/api") as client:
    submitted = client.executions.execute(
        "LONGCAT_IMAGE_EDIT",
        {
          "image": "https://example.com/input.png",
          "instruction": "example",
          "guidance_scale": 4.5,
          "num_inference_steps": 50
        },
        output_format="json",
    )
    result = client.executions.await_completion(submitted.id)
    print(result.execution.output)

Fine-tune LongCat Image Edit

You can fine-tune LongCat Image Edit on your own data and run the tuned model through the same API. Dataset: One ZIP (at most 2 GB, no password) with 4 to 200 examples of a picture, the same picture after the edit (same size) and the instruction, and manifest.jsonl with one {"input", "target", "instruction"} line each.

The steps are in the docs.

LongCat Image Edit pricing

Price per image: 1.529 credits ($0.01529). The price is shown again before every run; all prices are on the pricing page.

Licence and source

Qwen-Image-Edit-2509: Image Editing model on Kainguru
Image Editing

Qwen-Image-Edit-2509

Edit a picture from a written instruction, changing objects, people, text or style while keeping the rest consistent.

Fine-tunable
OmniGen v1: Image Editing model on Kainguru
Image Editing

OmniGen v1

Edits a picture from a plain-language instruction with OmniGen v1 (3.8B, MIT): add, remove or change objects, people…

Fine-tunable
Kandinsky 2 2 Img2img: Image Editing model on Kainguru
Image Editing

Kandinsky 2 2 Img2img

Kandinsky 2.2 restyles a photo from a text prompt and keeps its layout; the strength sets how far the result moves…

Kandinsky 2 2 Inpaint: Image Editing model on Kainguru
Image Editing

Kandinsky 2 2 Inpaint

Kandinsky 2.2 inpainting: paints the masked part of a photo from a text prompt and leaves the rest untouched.

DDColor: Image Editing model on Kainguru
Image Editing

DDColor

Colourises black-and-white and faded photos: it keeps each photo's own light and shade and adds natural colours.

Fine-tunable
LaMa: Image Editing model on Kainguru
Image Editing

LaMa

Removes objects, text, watermarks and blemishes from a photo: paint what to remove white on a black mask, and it fills…

Fine-tunable