# 2026-10-28 — Magic Prompt for image edits (feature · API)

> With input images attached, magic_prompt now rewrites your request as an edit instruction and leaves the rest of the image alone.

Magic Prompt used to rewrite every prompt as a full scene description, even
for edits. The model then redrew the whole picture and made up details it
had never seen. Now a request with `inputs` gets a rewrite written for
editing. It says what to change and asks the model to keep everything else.

```ts
const task = await mynth.image.generate({
  model: "black-forest-labs/flux.2-pro",
  prompt: "pls make the hair red",
  inputs: ["https://cdn.example.com/portrait.png"],
  magic_prompt: true,
});

console.log(task.magicPrompt?.positive);
// "Change the hair to red. Keep everything else unchanged."
```

This covers edits and generating from reference images. The rewrite knows
each image's role, `source` or `reference`, so it can tell "edit this
picture" apart from "use this style". Mynth never sends the image itself,
its URL, or its filename to the rewrite. Requests without `inputs` work as
before. See [enhance prompts](/docs/guides/enhance-prompts) and
[image to image](/docs/guides/image-to-image).

Permalink: https://mynth.io/changelog/2026-10-28-magic-prompt-image-edits · Markdown: https://mynth.io/changelog/2026-10-28-magic-prompt-image-edits.md
