GPT Image-1.5 - Text to Image
Endpoint
POST /images/generations
Full URL: https://modelfold.ai/v1/images/generations
Authentication: every request must include the
Authorization: Bearer <API_KEY>header.
Send model parameters directly in the JSON body. Do not wrap them in input. This request waits for generation to finish and returns data[].url; supported media models also offer async jobs, polling and callbacks. Replace example media URLs with your own publicly accessible files. See API gateway for billing and errors.
Input parameters for the generation task
Request Parameters
Body (application/json)
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | The model name to use for generation. Required field. - Must be gpt-image/1.5-text-to-image for this endpoint Default:"gpt-image/1.5-text-to-image"。 Allowed values:gpt-image/1.5-text-to-image。 Example:gpt-image/1.5-text-to-image。 |
prompt | string | Yes | Prompt required by the ModelFold gateway; at most 2000 characters. A text description of the image you want to generate maxLength: 2000. Example:Create a photorealistic candid photograph of an elderly sailor standing on a small fishing boat. He has weathered skin with visible wrinkles, pores, and sun texture, and a few faded traditional sailor tattoos on his arms. He is calmly adjusting a net while his dog sits nearby on the deck. Shot like a 35mm film photograph, medium close-up at eye level, using a 50mm lens. The image should feel honest and unposed, with real skin texture, worn materials, and everyday detail. No glamorization, no heavy retouching. 。 |
aspect_ratio | string | Yes | Required. Width-height ratio of the image, determining its visual form. Allowed values:1:1 / 2:3 / 3:2。 Example:1:1。 |
quality | string | Yes | Required. Quality: medium=balanced, high=slow/detailed. Allowed values:medium / high。 Example:medium。 |
Request Example
bash
curl -X POST "https://modelfold.ai/v1/images/generations" \
-H "Authorization: Bearer $MODELFOLD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image/1.5-text-to-image",
"prompt": "Create a photorealistic candid photograph of an elderly sailor standing on a small fishing boat. He has weathered skin with visible wrinkles, pores, and sun texture, and a few faded traditional sailor tattoos on his arms. He is calmly adjusting a net while his dog sits nearby on the deck. Shot like a 35mm film photograph, medium close-up at eye level, using a 50mm lens. The image should feel honest and unposed, with real skin texture, worn materials, and everyday detail. No glamorization, no heavy retouching. ",
"aspect_ratio": "1:1",
"quality": "medium"
}'json
{
"model": "gpt-image/1.5-text-to-image",
"prompt": "Create a photorealistic candid photograph of an elderly sailor standing on a small fishing boat. He has weathered skin with visible wrinkles, pores, and sun texture, and a few faded traditional sailor tattoos on his arms. He is calmly adjusting a net while his dog sits nearby on the deck. Shot like a 35mm film photograph, medium close-up at eye level, using a 50mm lens. The image should feel honest and unposed, with real skin texture, worn materials, and everyday detail. No glamorization, no heavy retouching. ",
"aspect_ratio": "1:1",
"quality": "medium"
}Response
200 — Generation completed. usage contains actual billing details; result URLs are illustrative.
json
{
"ok": true,
"created": 1792134000,
"data": [
{
"url": "https://modelfold.ai/uploads/outputs/result.png"
}
],
"usage": {}
}