# flux generate image

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /flux/v1/{model}:
    post:
      summary: flux generate image
      deprecated: false
      description: >-
        ## Overview

        The `/flux/v1/{model}` endpoint allows you to generate images based on
        prompts and parameters.


        ⚠️ **Important Note**: 

        - Due to significant differences in parameter lists across Flux series
        models, please refer to the [official
        documentation](https://docs.bfl.ai/quick_start/introduction) for
        detailed usage instructions. The parameter list provided here is for
        reference only.

        - After generation, you can use the
        [`/flux/v1/get_result`](https://apidoc.cometapi.com/image/flux/get_result)
        endpoint to query generated images or monitor process status.

        - Because the image resources returned by BFL’s official service have a
        very short validity period, the images may expire in about 10 minutes.
        Please save the generated results promptly!


        ## Supported models
         - flux-pro-1.1-ultra
         - flux-pro-1.1
         - flux-pro
         - flux-dev
         - flux-pro-1.0-fill
         - flux-pro-1.0-canny
         - flux-pro-1.0-depth
         - flux-kontext-pro
         - flux-kontext-max
         - flux-2-pro
         - flux-2-flex
         - flux-2-max
      tags:
        - 🖼️ Image Models/Flux(images)
      parameters:
        - name: model
          in: path
          description: ''
          required: true
          example: flux-2-pro
          schema:
            type: string
            enum:
              - flux-2-flex
              - flux-2-pro
              - flux-2-max
            x-apidog-enum:
              - value: flux-2-flex
                name: ''
                description: ''
              - value: flux-2-pro
                name: ''
                description: ''
              - value: flux-2-max
                name: ''
                description: ''
        - name: Authorization
          in: header
          description: Bearer token
          required: true
          example: '{{api-key}}'
          schema:
            type: string
        - name: Content-Type
          in: header
          description: ''
          required: false
          example: application/json
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                prompt:
                  type: string
                image_prompt:
                  type: string
                width:
                  type: integer
                height:
                  type: integer
                steps:
                  type: integer
                prompt_upsampling:
                  type: boolean
                seed:
                  type: integer
                guidance:
                  type: number
                safety_tolerance:
                  type: integer
                interval:
                  type: integer
                output_format:
                  type: string
                webhook_url:
                  type: string
                webhook_secret:
                  type: string
              required:
                - prompt
              x-apidog-orders:
                - prompt
                - image_prompt
                - width
                - height
                - steps
                - prompt_upsampling
                - seed
                - guidance
                - safety_tolerance
                - interval
                - output_format
                - webhook_url
                - webhook_secret
            example:
              prompt: ein fantastisches bild
              image_prompt: ''
              aspect_ratio: custom
              width: 2048
              height: 2048
              prompt_upsampling: false
              seed: 42
              safety_tolerance: 2
              output_format: jpeg
              webhook_url: ''
              webhook_secret: ''
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  polling_url:
                    type: string
                x-apidog-orders:
                  - id
                  - polling_url
              example:
                id: …
                polling_url: …
          headers: {}
          x-apidog-name: OK
      security: []
      x-apidog-folder: 🖼️ Image Models/Flux(images)
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/810968/apis/api-14680666-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://api.cometapi.com
    description: Prod Env
security: []

```
