Start with the right request.
The quickest route is the Magnt MCP server at magnt.app/mcp: add the URL to Claude, ChatGPT, Claude Code, Cursor or any MCP client, sign in, and the agent gets a generate_image tool with download links it can save. Building your own agent? Point it at the spec at magnt.app/openapi.json, or define the tool yourself with a prompt, optional images and an aspect ratio. Every call finishes in one response, so there are no job IDs to poll and no webhooks to wire up. Errors come back as JSON with a stable code, so the agent can tell a bad prompt from a rate limit and decide what to do next.
A prompt to build from
A realistic photograph of a small potted herb garden on a sunny kitchen windowsill. Basil, mint and rosemary in matching terracotta pots. Soft morning light, shallow depth of field and a blurred kitchen behind. Leave the right third calm for text. 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": "A realistic photograph of a small potted herb garden on a sunny kitchen windowsill. Basil, mint and rosemary in matching terracotta pots. Soft morning light, shallow depth of field and a blurred kitchen behind. Leave the right third calm for text. No lettering or logos.",
"aspect_ratio": "16:9",
"resolution": "1K",
"response_format": "image"
}Review the details that matter.
Agents are fast at writing prompts and slow at noticing what went wrong in a picture. Keep a person or a check in the loop before anything is published. Look for odd hands, warped text, extra objects and details that contradict the brief. If the agent edits a real photo, compare the result with the source, because generative editing can change things the prompt asked it to keep.
Make it part of your app.
Run the tool on your server so the key never leaves it. When the agent calls it, forward the request to Magnt and store the returned WebP wherever your app keeps files, then give the agent a link or ID to reference. Magnt keeps no history, so the agent must send source photos again for each edit. Budget with the account limit in mind: 30 requests an hour per account, each image spending 1 plan credit.
Does Magnt have an MCP server?
Yes. Add https://magnt.app/mcp to any MCP client that supports remote servers and sign in with your Magnt account, or send an API key in the Authorization header. Setup for Claude, ChatGPT, Claude Code, Cursor, VS Code and Codex is at magnt.app/image-api/mcp. For your own code, the OpenAPI 3.1 spec is at magnt.app/openapi.json.