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

# Модель Flux.2 [pro]

> Используйте Flux.2[pro] API для профессиональной AI-генерации изображений с лучшим пониманием промпта и надежным качеством результата.



## OpenAPI

````yaml openapi/ru/flux.json POST /bfl/v1/flux-2-pro
openapi: 3.1.0
info:
  title: Документация Flux API
  version: 1.0.0
  description: >-
    Сервис TTAPI Flux API, в настоящее время интегрирующий самую совершенную
    большую видеомодель Sora2.
servers:
  - url: https://api.ttapi.io
security: []
paths:
  /bfl/v1/flux-2-pro:
    post:
      description: >-
        Создавайте или редактируйте изображения с помощью модели Flux 2 Pro на
        основе текстовых подсказок. <a
        href='https://docs.bfl.ai/flux_2/flux2_image_editing#flux-2-image-editing-parameters'
        target='_blank'>Официальная документация</a>
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Pro2Request'
      responses:
        '200':
          $ref: '#/components/responses/SuccessResponse'
        '400':
          $ref: '#/components/responses/400Response'
        '401':
          $ref: '#/components/responses/401Response'
      security:
        - CustomApiKey: []
components:
  schemas:
    Pro2Request:
      type: object
      properties:
        prompt:
          type: string
          description: >-
            Описание изображения. Примечание. Flux поддерживает многоязычное
            понимание, но при тестировании лучше всего подходит английский.
        input_image:
          type: string
          description: Референс-изображение 1, URL или base64
        input_image_2:
          type: string
          description: Референс-изображение 2, URL или base64
        input_image_3:
          type: string
          description: Референс-изображение 3, URL или base64
        input_image_4:
          type: string
          description: Референс-изображение 4, URL или base64
        image_prompt:
          type: string
          description: Референс-изображение в кодировке base64
        width:
          type: string
          description: >-
            Ширина генерируемого изображения. Диапазон: 256-1440, значение
            должно быть кратно 32. По умолчанию: 1024
        height:
          type: string
          description: >-
            Высота генерируемого изображения. Диапазон: 256-1440, значение
            должно быть кратно 32. По умолчанию: 768
        seed:
          type: string
          description: Случайный исходное значение
        output_format:
          type: string
          description: Формат вывода
          example: jpeg
          enum:
            - jpeg
            - png
        safety_tolerance:
          type: integer
          description: >-
            Уровень допуска безопасности для регулировки входа и выхода.
            Диапазон: 0-6, где 0 — самый строгий, а 6 — самый разрешающий. По
            умолчанию: 2
          example: '2'
        webhook_url:
          type: string
          description: URL асинхронного обратный вызов
      required:
        - prompt
  responses:
    SuccessResponse:
      description: Запрос выполнен успешно
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                example: SUCCESS
              message:
                type: string
                example: success
              data:
                type: object
                example:
                  jobId: jobId
            required:
              - status
              - message
              - data
    400Response:
      description: Ошибка параметров
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                example: FAILED
              message:
                type: string
                example: '"prompt" cannot be empty.'
              data:
                type: object
            required:
              - status
              - message
    401Response:
      description: Ошибка авторизации
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                example: FAILED
              message:
                type: string
                example: Wrong TT-API-KEY or email is not activated.
            required:
              - status
              - message
  securitySchemes:
    CustomApiKey:
      type: apiKey
      in: header
      name: TT-API-KEY
      description: >-
        Вы можете получить API-ключ в <a href='https://dashboard.ttapi.io'
        target='_blank'>панель управления TTAPI</a>.

````