> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vidgo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Flux Schnell Text to Image

> Generate images from a text prompt with preset or custom dimensions and PNG or JPEG output.

## Submit a Task

Send `model: "blackforestlabs/flux/schnell"` and an `input` object to `POST /api/generate/submit`. Authenticate with `Authorization: Bearer VIDGO_API_KEY`.

* `prompt`: Required string. Describe the image using at least one character after trimming.
* `size`: Output canvas, default `1:1`. Choose `1:1`, `1:1 HD`, `4:3`, `3:4`, `16:9`, `9:16`, or a custom `WIDTHxHEIGHT` such as `1024x1536`. Custom width and height are positive integers.
* `n`: Positive integer specifying the output image count, default `1`.
* `output_format`: `png` or `jpeg`, default `png`.

## Retrieve Images

The submission response returns `data.task_id`. Use [Query Task Status](/api-manual/task-management/status) to follow the task through `not_started`, `running`, `finished`, or `failed`.

Read image URLs from `data.files[].file_url` when the status is `finished`. For `failed`, read `data.error_message`.

You can provide a top-level `callback_url` to receive the terminal result through a [webhook](/api-manual/task-management/webhooks).

## Verified Example

First Light at the Cliffside Pool. This text-to-image example uses a prompt only.

```json theme={null}
{
  "model": "blackforestlabs/flux/schnell",
  "input": {
    "prompt": "An architectural photograph of an empty public seawater swimming pool built into a coastal cliff at sunrise. From a low viewpoint beside the pool, pale turquoise water fills the foreground, broad curved stone steps descend naturally into the shallow end on the right, and a simple white limewashed wall catches moving water reflections. Warm low morning sunlight reveals the rough limestone coping and delicate ripples. Beyond the far pool edge, the calm open sea and a clean level horizon remain clearly visible. Restrained Mediterranean colors, believable pool geometry, natural light, crisp tactile surfaces, peaceful everyday public architecture. One coherent full-frame photograph, no people, hotel styling, advertising, signs, lettering, logos or watermark.",
    "size": "4:3",
    "n": 1,
    "output_format": "png"
  }
}
```

![First Light at the Cliffside Pool](https://cdn.vidgo.ai/apis/models/blackforestlabs/flux/schnell/text-to-image/v1/01/output.png)


## OpenAPI

````yaml api-manual/image-series/blackforestlabs-flux-schnell.json POST /api/generate/submit
openapi: 3.0.0
info:
  title: Vidgo API - Flux Schnell Text to Image
  description: Flux Schnell Text to Image API.
  version: 1.0.0
servers:
  - url: https://api.vidgo.ai
    description: Production server
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      tags:
        - Flux Schnell
      summary: Submit Flux Schnell Text to Image Task
      operationId: submitFluxSchnellTextToImage
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitRequest'
            examples:
              default:
                summary: First Light at the Cliffside Pool
                value:
                  model: blackforestlabs/flux/schnell
                  input:
                    prompt: >-
                      An architectural photograph of an empty public seawater
                      swimming pool built into a coastal cliff at sunrise. From
                      a low viewpoint beside the pool, pale turquoise water
                      fills the foreground, broad curved stone steps descend
                      naturally into the shallow end on the right, and a simple
                      white limewashed wall catches moving water reflections.
                      Warm low morning sunlight reveals the rough limestone
                      coping and delicate ripples. Beyond the far pool edge, the
                      calm open sea and a clean level horizon remain clearly
                      visible. Restrained Mediterranean colors, believable pool
                      geometry, natural light, crisp tactile surfaces, peaceful
                      everyday public architecture. One coherent full-frame
                      photograph, no people, hotel styling, advertising, signs,
                      lettering, logos or watermark.
                    size: '4:3'
                    'n': 1
                    output_format: png
      responses:
        '200':
          description: Task submitted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitResponse'
              example:
                code: 200
                data:
                  task_id: RGOGR6Z9UO0KX623
                  status: running
                  created_time: '2026-09-25T11:31:42'
        '400':
          description: Invalid request parameters
        '401':
          description: Unauthorized
components:
  schemas:
    SubmitRequest:
      type: object
      required:
        - model
        - input
      additionalProperties: false
      properties:
        model:
          type: string
          enum:
            - blackforestlabs/flux/schnell
        callback_url:
          type: string
          format: uri
          description: Optional webhook callback URL.
        input:
          type: object
          required:
            - prompt
          description: Parameters for text-to-image generation.
          properties:
            prompt:
              type: string
              description: >-
                Describe the image to generate or the changes to make. Provide
                at least one character after trimming.
              minLength: 1
              example: >-
                An architectural photograph of an empty public seawater swimming
                pool built into a coastal cliff at sunrise. From a low viewpoint
                beside the pool, pale turquoise water fills the foreground,
                broad curved stone steps descend naturally into the shallow end
                on the right, and a simple white limewashed wall catches moving
                water reflections. Warm low morning sunlight reveals the rough
                limestone coping and delicate ripples. Beyond the far pool edge,
                the calm open sea and a clean level horizon remain clearly
                visible. Restrained Mediterranean colors, believable pool
                geometry, natural light, crisp tactile surfaces, peaceful
                everyday public architecture. One coherent full-frame
                photograph, no people, hotel styling, advertising, signs,
                lettering, logos or watermark.
            size:
              type: string
              description: >-
                Output canvas. Presets: 1:1 (512×512), 1:1 HD (1024×1024), 4:3
                (1024×768), 3:4 (768×1024), 16:9 (1024×576), 9:16 (576×1024).
                Custom WIDTHxHEIGHT dimensions are positive integers.


                Use a preset (`1:1`, `1:1 HD`, `4:3`, `3:4`, `16:9`, `9:16`) or
                custom `WIDTHxHEIGHT` dimensions.
              default: '1:1'
              example: '4:3'
              pattern: ^(?:1:1|1:1\ HD|4:3|3:4|16:9|9:16|(?:\d+x\d+))$
            'n':
              type: integer
              description: Number of output images.
              default: 1
              example: 1
              minimum: 1
            output_format:
              type: string
              description: Output image format.
              enum:
                - jpeg
                - png
              default: png
              example: png
          additionalProperties: false
    SubmitResponse:
      type: object
      required:
        - code
        - data
      properties:
        code:
          type: integer
          example: 200
        data:
          type: object
          required:
            - task_id
            - status
            - created_time
          properties:
            task_id:
              type: string
            status:
              type: string
              enum:
                - not_started
                - running
                - failed
            created_time:
              type: string
              format: date-time
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'Use `Authorization: Bearer VIDGO_API_KEY`.'

````