text-to-image
Create image from text - GPT Image 2
Generate images from a text prompt using OpenAI's GPT Image 2.5 model.
Key Features:
- Strong instruction following on long, detailed prompts
- Reliable text rendering inside the image
- Explicit resolution tier, aspect ratio, format and compression control
- Selectable quality tier (low / medium / high)
Best for:
- Marketing and editorial images that must contain legible text
- Prompts with many precise constraints
- Cases where transparency or an exact output format is required
Output: one image per num_images (up to 10), at the size selected by resolution + aspect_ratio, delivered as CDN URLs in the task's generated array.
Credits: the quality tier sets the price per image and resolution multiplies it (1k x1, 2k x2, 4k x3). Every image in num_images is billed.
The request is processed asynchronously: the endpoint returns a task id immediately. Retrieve the result by polling the task endpoint or by providing an optional webhook_url.
post/v1/ai/text-to-image/gpt-image-2-5
Request
- Base URL: https://api.magnific.com
- URL: https://api.magnific.com/v1/ai/text-to-image/gpt-image-2-5
- Auth: API key in header x-magnific-api-key
Request body
Example request
{
"prompt": "A vintage travel poster for Mars, bold sans-serif title, muted orange palette",
"webhook_url": "https://www.example.com/webhook",
"num_images": 1,
"variant": "flare",
"resolution": "1k",
"aspect_ratio": "auto",
"quality": "medium",
"output_format": "png",
"background": "auto",
"output_compression": 80,
"moderation": "auto"
}Response
OK - The request has succeeded and the GPT Image 2.5 process has started.
Example response
{
"data": {
"generated": [
"https://openapi-generator.tech",
"https://openapi-generator.tech"
],
"task_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"status": "CREATED"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.