> ## 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 3 Klein Text to Image

> The FLUX 3 Klein Text to Image API generates 1–4 images from a prompt at 1K, 2K or 4K, with 7 aspect ratios or custom sizes and PNG, JPEG or WebP output.

> [!TIP]
>
> 1. After submission, a `task_id` will be returned. If you provided a `callback_url`, when the task status becomes `finished` or `failed`, a POST request will be sent to the `callback_url`.
> 2. Regardless of whether `callback_url` is provided, you can retrieve the result through the unified [Query Task Status](https://docs.vidgo.ai/api-manual/task-management/status.md) endpoint.

FLUX 3 Klein Text to Image creates images from a prompt at 1K, 2K or 4K, using seven aspect-ratio presets or an exact custom size. It suits product shots, marketing visuals, concept art and high-volume image pipelines where fast turnaround matters.

FLUX 3 Klein is the compact member of Black Forest Labs' FLUX 3 image family, built for fast generation and instruction-based editing. Vidgo exposes it as two model IDs: [Text to Image](https://docs.vidgo.ai/api-manual/image-series/blackforestlabs-flux-3-klein-text-to-image.md) and [Edit](https://docs.vidgo.ai/api-manual/image-series/blackforestlabs-flux-3-klein-edit.md).

## Models

* **blackforestlabs/flux-3-klein/text-to-image** — Text-to-image with FLUX 3 Klein, 1–4 images at 1K, 2K or 4K.

## Features

* Text-to-image from a single prompt.
* Three resolution tiers: `1K`, `2K`, `4K`.
* Seven aspect-ratio presets, or a custom `WIDTHxHEIGHT` from 256 to 4096 px per side.
* PNG, JPEG or WebP output, 1–4 images per request.

## Required parameters

* `prompt` (string): The image you want. Must not be blank.

## Optional parameters

* `n` (integer): Number of images, `1`–`4`. Default `1`.
* `resolution` (string): `1K`, `2K` or `4K`. Default `1K`. See [Resolution](#resolution).
* `size` (string): Preset or custom `WIDTHxHEIGHT`. Default `1:1`. See [Resolution](#resolution).
* `output_format` (string): `png`, `jpeg` or `webp`. Default `png`.
* `enable_safety_checker` (boolean): Upstream safety checker. Default `true`.

## Resolution

* With a preset `size` (`1:1`, `4:3`, `3:4`, `16:9`, `9:16`, `3:2`, `2:3`), the image is scaled so its long edge matches the tier: `1K` → 1024 px, `2K` → 2048 px, `4K` → 4096 px.
* With a custom `size` such as `1920x1080`, each side must be 256–4096 and a multiple of 16, and you must send `resolution` matching the long edge: up to 1024 → `1K`, up to 2048 → `2K`, above 2048 → `4K`. A mismatch returns 400.

| `resolution` | Long edge (presets) | Custom long edge |
| - | - | - |
| `1K` | 1024 px | ≤ 1024 px |
| `2K` | 2048 px | 1025–2048 px |
| `4K` | 4096 px | 2049–4096 px |

## Output

The finished task returns one file per requested image (`n`) in the `files` array of [Query Task Status](https://docs.vidgo.ai/api-manual/task-management/status.md) and the callback payload.

## Examples

* **1K square image**: a product photo at `1:1`, `1K`, PNG.
* **Custom 4K size, two JPEGs, with callback**: `size: 3840x2160` with `resolution: 4K` (long edge above 2048), `n: 2`, JPEG, with a `callback_url`.

## Notes

* This ID takes text only; `image_urls` returns 400. To edit or combine images, use [FLUX 3 Klein Edit](https://docs.vidgo.ai/api-manual/image-series/blackforestlabs-flux-3-klein-edit.md).
* Fields not listed above return 400. `model` and `callback_url` belong at the request root, not inside `input`.
* Credits are reserved at submission and depend on `resolution` and `n`. Text-to-image and edit use the same rates. A failed task is refunded in full. See the [pricing page](https://vidgo.ai/apis/api-pricing) for current rates.


## OpenAPI

````yaml api-manual/image-series/blackforestlabs-flux-3-klein-text-to-image.json POST /api/generate/submit
openapi: 3.0.0
info:
  title: Vidgo API - FLUX 3 Klein Text to Image
  description: >-
    The FLUX 3 Klein Text to Image API generates 1–4 images from a prompt at 1K,
    2K or 4K, with 7 aspect ratios or custom sizes and PNG, JPEG or WebP output.
  version: 1.0.0
servers:
  - url: https://api.vidgo.ai
    description: Production server
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      tags:
        - Image Series
      summary: FLUX 3 Klein Text to Image
      description: >-
        Send only the `input` fields listed for this model. Any other field,
        including `image_urls`, returns 400. A custom `WIDTHxHEIGHT` size needs
        a `resolution` that matches its long edge.
      operationId: submit_blackforestlabs_flux_3_klein_text_to_image
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - input
              properties:
                model:
                  type: string
                  description: Model ID. Use `blackforestlabs/flux-3-klein/text-to-image`.
                  example: blackforestlabs/flux-3-klein/text-to-image
                callback_url:
                  type: string
                  format: uri
                  nullable: true
                  description: >-
                    Optional public HTTP(S) endpoint that receives a POST when
                    the task becomes `finished` or `failed`. HTTPS is
                    recommended. Omit it, or send `null` or an empty string, to
                    disable callbacks.
                  example: https://your-domain.com/callback
                input:
                  type: object
                  required:
                    - prompt
                  properties:
                    prompt:
                      type: string
                      minLength: 1
                      example: >-
                        Studio product photo of a matte black water bottle on
                        wet slate, soft rim light
                      description: Text prompt describing the image. Must not be blank.
                    'n':
                      type: integer
                      minimum: 1
                      maximum: 4
                      default: 1
                      description: Number of images to generate.
                    resolution:
                      type: string
                      enum:
                        - 1K
                        - 2K
                        - 4K
                      default: 1K
                      description: >-
                        Resolution tier (case-insensitive). Presets are scaled
                        so the long edge is 1024, 2048 or 4096 px. It sets the
                        billing rate. With a custom `size`, send the tier that
                        matches its long edge.
                    size:
                      type: string
                      default: '1:1'
                      example: '16:9'
                      description: >-
                        Aspect-ratio preset (`1:1`, `4:3`, `3:4`, `16:9`,
                        `9:16`, `3:2`, `2:3`) or a custom `WIDTHxHEIGHT` with
                        each side 256–4096 and a multiple of 16. A custom size
                        needs an explicit `resolution` matching its long edge:
                        up to 1024 → `1K`, up to 2048 → `2K`, otherwise `4K`.
                    output_format:
                      type: string
                      enum:
                        - png
                        - jpeg
                        - webp
                      default: png
                      description: Image file format.
                    enable_safety_checker:
                      type: boolean
                      default: true
                      description: Run the upstream safety checker.
                  additionalProperties: false
                  description: Generation parameters.
            examples:
              preset:
                summary: 1K square image
                value:
                  model: blackforestlabs/flux-3-klein/text-to-image
                  input:
                    prompt: >-
                      Studio product photo of a matte black water bottle on wet
                      slate, soft rim light
                    'n': 1
                    resolution: 1K
                    size: '1:1'
                    output_format: png
              custom_4k:
                summary: Custom 4K size, two JPEGs, with callback
                value:
                  model: blackforestlabs/flux-3-klein/text-to-image
                  callback_url: https://your-domain.com/callback
                  input:
                    prompt: >-
                      Aerial view of terraced rice fields at golden hour, mist
                      in the valleys, ultra detailed
                    'n': 2
                    resolution: 4K
                    size: 3840x2160
                    output_format: jpeg
                    enable_safety_checker: true
      responses:
        '200':
          description: Task submitted
          content:
            application/json:
              schema:
                type: object
                required:
                  - code
                  - data
                properties:
                  code:
                    type: integer
                    enum:
                      - 200
                    description: HTTP status code.
                  data:
                    type: object
                    required:
                      - task_id
                      - status
                      - created_time
                    properties:
                      task_id:
                        type: string
                        description: >-
                          Task ID. Use it with [Query Task
                          Status](/api-manual/task-management/status).
                      status:
                        type: string
                        enum:
                          - not_started
                        description: Initial task status.
                      created_time:
                        type: string
                        format: date-time
                        description: Time the task was created (ISO 8601).
              example:
                code: 200
                data:
                  task_id: task-unified-1762160000-abc123
                  status: not_started
                  created_time: '2026-11-03T10:30:00'
        '400':
          description: >-
            Invalid input, unsupported field, inaccessible media, or
            insufficient credits
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
                    description: Error message.
        '401':
          description: Invalid credentials
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
                    description: Error message.
        '403':
          description: Access denied
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
                    description: Error message.
        '404':
          description: Unknown or disabled model
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
                    description: Error message.
        '408':
          description: Request timed out
          content:
            text/plain:
              schema:
                type: string
              example: Request timeout
        '422':
          description: Invalid JSON or non-object request body
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
                    description: Error message.
        '429':
          description: Rate or API key credit limit exceeded
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
                    description: Error message.
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
                    description: Error message.
        '502':
          description: Unable to create the upstream generation task
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
                    description: Error message.
        '503':
          description: The requested model is temporarily unavailable
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
                    description: Error message.
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        All API endpoints require Bearer Token authentication


        Get your API Key:


        Go to **Dashboard → API Key** ([API Key Management
        Page](https://vidgo.ai/apis/dashboard/api-key)) to get your API Key


        Add it to the request header:


        ```

        Authorization: Bearer VIDGO_API_KEY

        ```

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.