Social media image generation API

Turn the post idea into the picture.

Add image creation to a social editor, content planner, or brand workspace. Users describe the visual they need and get a preview they can place beside their copy, without exporting prompts to another tool.

Create a Magnt API key →

Start with the right request.

Begin with the composition rather than the caption. Describe the subject, visual mood and empty space your layout needs. Keep exact headlines, prices and calls to action in your own text layer so users can edit them without regenerating the picture.

  • Use 4:5 for a portrait composition, 1:1 for a square, or 9:16 for a tall canvas.
  • Leave deliberate space for your app’s text overlay.
  • Generate a new composition when switching between very different ratios.

A prompt to build from

Create a realistic overhead photograph of a notebook, a black pen and a small coffee cup on a cream desk. Warm morning light, restrained colours and a calm working atmosphere. Keep the upper third uncluttered for a headline that will be added later. No lettering or logos.

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. This example generates from text and needs no input image.

{
  "model": "magnt-image-1",
  "prompt": "Create a realistic overhead photograph of a notebook, a black pen and a small coffee cup on a cream desk. Warm morning light, restrained colours and a calm working atmosphere. Keep the upper third uncluttered for a headline that will be added later. No lettering or logos.",
  "aspect_ratio": "4:5",
  "resolution": "1K",
  "response_format": "image"
}
Read the complete integration guide →

Review the details that matter.

Preview the image inside the actual post layout. A subject that looks balanced on its own can clash with a headline or a button. Inspect small details at the size your audience will see, and make sure the final crop does not remove the main subject. These are composition choices, not promises of better engagement.

Make it part of your app.

A useful first version needs a prompt field, a ratio selector and an explicit Generate button. Keep the accepted image available in your app if users will return to the draft later: Magnt returns bytes but does not host a permanent result URL. Each variation is a new generation that uses the account’s allowance.

Does the API publish images to social networks?

No. It returns an image. Your application handles text overlays, scheduling, account connections and publishing.

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.