# Flux Pro 1.1 Image Generation

> Image Generation

Generate an image from a required text prompt and optional
Base64-encoded image prompt. The documented response returns Base64
image data in `data[].b64_json`.

## Endpoint

`POST https://api.modelverse.cn/v1/flux-pro-1.1`

## Request Body

## Responses

- **200** — Image generation response.
- **400** — Invalid request parameters or image generation error.
- **default** — Error response.

## OpenAPI Definition

```json
{
  "openapi": "3.1.0",
  "x-language": "en-US",
  "info": {
    "title": "ModelVerse flux-pro-1.1 Image API",
    "version": "1.0.0",
    "description": "Self-contained OpenAPI 3.1 schema for the ModelVerse `flux-pro-1.1`\nimage API.\n\nThe source document references the upstream FLUX 1.1 [pro]\ndocumentation for additional fields; this schema is intentionally limited\nto the fields documented in the ModelVerse source file.\n"
  },
  "servers": [
    {
      "url": "https://api.modelverse.cn",
      "description": "ModelVerse API endpoint documented for this model."
    }
  ],
  "tags": [
    {
      "name": "flux-pro-1.1",
      "description": "Image generation with flux-pro-1.1."
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/v1/flux-pro-1.1": {
      "post": {
        "tags": [
          "flux-pro-1.1"
        ],
        "operationId": "createFluxPro11ImageGeneration",
        "summary": "Flux Pro 1.1 Image Generation",
        "description": "Generate an image from a required text prompt and optional\nBase64-encoded image prompt. The documented response returns Base64\nimage data in `data[].b64_json`.\n",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FluxPro11ImageRequest"
              },
              "examples": {
                "documentedTextToImage": {
                  "summary": "Source document text-to-image request",
                  "value": {
                    "prompt": "A photograph of a red fox in an autumn forest",
                    "width": 1024,
                    "height": 1024
                  }
                },
                "imagePromptWithWebhook": {
                  "summary": "Image prompt request with webhook settings",
                  "value": {
                    "prompt": "A polished studio product photo with soft side lighting",
                    "image_prompt": "{base64_image_string}",
                    "width": 1024,
                    "height": 768,
                    "prompt_upsampling": true,
                    "seed": 123456,
                    "safety_tolerance": 2,
                    "output_format": "png",
                    "webhook_url": "https://example.com/modelverse/webhook",
                    "webhook_secret": "webhook_secret_value"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Image generation response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FluxPro11ImageResponse"
                },
                "examples": {
                  "generatedImage": {
                    "summary": "Generated image returned as Base64",
                    "value": {
                      "createed": 1761283200,
                      "data": [
                        {
                          "b64_json": "{image_base64_string}"
                        }
                      ]
                    }
                  },
                  "webhookImage": {
                    "summary": "Generated image response for a webhook-enabled request",
                    "value": {
                      "createed": 1761283260,
                      "data": [
                        {
                          "b64_json": "{image_base64_string}"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters or image generation error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FluxPro11ErrorResponse"
                },
                "examples": {
                  "invalidWidth": {
                    "summary": "Invalid width parameter",
                    "value": {
                      "error": {
                        "message": "width must be between 256 and 1440 and a multiple of 32",
                        "type": "invalid_request_error",
                        "param": "width",
                        "code": "param_error"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FluxPro11ErrorResponse"
                },
                "examples": {
                  "requestError": {
                    "summary": "Request error",
                    "value": {
                      "error": {
                        "message": "error_message",
                        "type": "error_type",
                        "param": "request_id",
                        "code": "error_code"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "API key",
        "description": "ModelVerse API key sent in the `Authorization: Bearer <API_KEY>`\nheader. The source document states that ModelVerse uses\n`Authorization` instead of the upstream `x-key` header.\n"
      }
    },
    "schemas": {
      "FluxPro11ImageRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "prompt"
        ],
        "properties": {
          "prompt": {
            "type": "string",
            "minLength": 1,
            "description": "Text prompt."
          },
          "image_prompt": {
            "$ref": "#/components/schemas/FluxPro11Base64Image"
          },
          "width": {
            "type": "integer",
            "minimum": 256,
            "maximum": 1440,
            "multipleOf": 32,
            "description": "Image width in pixels. The documented constraint is\n`256 <= x <= 1440`, and the value must be a multiple of 32.\n"
          },
          "height": {
            "type": "integer",
            "minimum": 256,
            "maximum": 1440,
            "multipleOf": 32,
            "description": "Image height in pixels. The documented constraint is\n`256 <= x <= 1440`, and the value must be a multiple of 32.\n"
          },
          "prompt_upsampling": {
            "type": "boolean",
            "default": false,
            "description": "Whether to upsample the prompt. When enabled, the prompt is\nautomatically modified for more creative generation.\n"
          },
          "seed": {
            "type": "integer",
            "format": "int64",
            "description": "Optional seed for reproducible generation."
          },
          "safety_tolerance": {
            "type": "integer",
            "enum": [
              0,
              1,
              2,
              3,
              4,
              5,
              6
            ],
            "default": 2,
            "description": "Tolerance level for input and output moderation. The source\ndescribes values from 1 to 6 and also states that `0` is the\nstrictest and `6` is the least strict.\n"
          },
          "output_format": {
            "type": "string",
            "enum": [
              "png",
              "jpg",
              "jpeg"
            ],
            "default": "png",
            "description": "Output image format. The source type column lists `jpeg/png`, and\nthe source description lists `png,jpg`.\n"
          },
          "webhook_url": {
            "type": "string",
            "format": "uri",
            "description": "Webhook URL used to receive generation results."
          },
          "webhook_secret": {
            "type": "string",
            "description": "Webhook secret used to verify webhook requests."
          }
        }
      },
      "FluxPro11Base64Image": {
        "type": "string",
        "contentEncoding": "base64",
        "description": "Base64-encoded image prompt."
      },
      "FluxPro11ImageResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "createed",
          "data"
        ],
        "properties": {
          "createed": {
            "type": "integer",
            "format": "int64",
            "description": "Creation time field as documented in the source response table."
          },
          "data": {
            "type": "array",
            "description": "Generated image data.",
            "items": {
              "$ref": "#/components/schemas/FluxPro11ImageData"
            }
          }
        }
      },
      "FluxPro11ImageData": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "b64_json"
        ],
        "properties": {
          "b64_json": {
            "type": "string",
            "contentEncoding": "base64",
            "description": "Base64-encoded generated image data."
          }
        }
      },
      "FluxPro11ErrorResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "$ref": "#/components/schemas/FluxPro11Error"
          }
        }
      },
      "FluxPro11Error": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "type": "string",
            "description": "Error message."
          },
          "type": {
            "type": "string",
            "description": "Error type."
          },
          "param": {
            "type": "string",
            "description": "Request parameter related to the error, when available."
          },
          "code": {
            "type": "string",
            "description": "Error code."
          }
        }
      }
    }
  }
}
```
