Headshot image editing API

A better portrait, built into your product.

Give users a way to improve a portrait without leaving your app. A clear source photo and a specific edit request are a practical starting point for headshots, profile builders, and personal websites.

Create a Magnt API key →

Start with the right request.

Ask the user to choose a recent, clearly lit portrait. Send that image with instructions for the changes they want, such as softer light or a quieter background. Keep those changes narrow: changing lighting and replacing clothing at the same time makes it harder to judge which part of an edit changed the person’s appearance.

  • Use 4:5 for a portrait preview and leave room for a circular crop.
  • Ask for natural skin texture rather than flawless skin.
  • Show the original alongside the result before the user accepts it.

A prompt to build from

Improve the lighting in the attached portrait for a professional profile photo. Preserve the person’s facial features, hairstyle, expression and natural skin texture. Use soft window light and a simple warm grey background. Frame from the upper chest upward. Avoid heavy smoothing.

Example prompt, not a promise of exact results. Review the generated image before publishing.

Send it to the Image API.

POST this JSON to /api/v1/images/generations with your Magnt key in the Authorization header. Replace the image placeholder with your actual JPEG bytes encoded as base64.

{
  "model": "magnt-image-1",
  "prompt": "Improve the lighting in the attached portrait for a professional profile photo. Preserve the person’s facial features, hairstyle, expression and natural skin texture. Use soft window light and a simple warm grey background. Frame from the upper chest upward. Avoid heavy smoothing.",
  "images": [
    "data:image/jpeg;base64,YOUR_IMAGE_BASE64"
  ],
  "aspect_ratio": "4:5",
  "resolution": "1K",
  "response_format": "image"
}
Read the complete integration guide →

Review the details that matter.

Inspect the eyes, teeth, hairline and outline of the face. Check that the expression and distinctive features still feel like the source photo. Identity preservation is a goal of the prompt, not a guarantee. Let the person in the photo make the final choice.

Make it part of your app.

Keep each edit self-contained. If a user wants another variation, send the chosen source image again with the new prompt. Magnt does not keep a face profile or learn a person from previous requests. The returned WebP can be previewed immediately and downloaded when the user is happy with it.

Does Magnt remember the person between requests?

No. Every request uses only its prompt and attached images. There are no saved face profiles or previous-photo context in the API.

Explore related workflows

Your next feature starts with one image.

Create a Magnt key, try your prompt, and bring the result into your app. Each image uses one plan generation or two legacy credits.