GPT Image-1.5 - Image 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-image-to-image for this endpoint Default:"gpt-image/1.5-image-to-image"。 Allowed values:gpt-image/1.5-image-to-image。 Example:gpt-image/1.5-image-to-image。 |
input_urls | array<string> | Yes | Upload an image file to use as input for the API (File URL after upload, not file content; Accepted types: image/jpeg, image/png, image/webp; Max size: 10.0MB) maxItems: 16. |
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:Edit the image to dress the woman using the provided clothing images. Preserve her exact likeness, expression, hairstyle, and proportions. Replace only the clothing, fitting the garments naturally to her existing pose and body geometry with realistic fabric behavior. Match lighting, shadows, and color temperature to the original photo so the outfit integrates photorealistically, without looking pasted on.。 |
aspect_ratio | string | Yes | Required. Width-height ratio of the image, determining its visual form. Allowed values:1:1 / 2:3 / 3:2。 Example:3:2。 |
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-image-to-image",
"input_urls": [
"https://example.com/reference.png"
],
"prompt": "Edit the image to dress the woman using the provided clothing images. Preserve her exact likeness, expression, hairstyle, and proportions. Replace only the clothing, fitting the garments naturally to her existing pose and body geometry with realistic fabric behavior. Match lighting, shadows, and color temperature to the original photo so the outfit integrates photorealistically, without looking pasted on.",
"aspect_ratio": "3:2",
"quality": "medium"
}'json
{
"model": "gpt-image/1.5-image-to-image",
"input_urls": [
"https://example.com/reference.png"
],
"prompt": "Edit the image to dress the woman using the provided clothing images. Preserve her exact likeness, expression, hairstyle, and proportions. Replace only the clothing, fitting the garments naturally to her existing pose and body geometry with realistic fabric behavior. Match lighting, shadows, and color temperature to the original photo so the outfit integrates photorealistically, without looking pasted on.",
"aspect_ratio": "3:2",
"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": {}
}