> ## 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.1 [dev]

> Используйте Flux.1[dev] API для тестирования, прототипирования и автоматизации сценариев AI-генерации изображений во время разработки и интеграции продукта.



## OpenAPI

````yaml openapi/ru/flux.json POST /bfl/v1/flux-dev
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-dev:
    post:
      description: >-
        Создавайте или редактируйте изображения с помощью модели Flux Dev на
        основе текстовых подсказок. <a
        href='https://docs.bfl.ai/api/tasks/generate-an-image-with-flux1-[pro]'
        target='_blank'>Официальная документация</a>
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DevRequest'
      responses:
        '200':
          $ref: '#/components/responses/SuccessResponse'
        '400':
          $ref: '#/components/responses/400Response'
        '401':
          $ref: '#/components/responses/401Response'
      security:
        - CustomApiKey: []
components:
  schemas:
    DevRequest:
      type: object
      properties:
        prompt:
          type: string
          description: >-
            Описание изображения. Примечание. Flux поддерживает многоязычное
            понимание, но при тестировании лучше всего подходит английский.
        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
        prompt_upsampling:
          type: boolean
          description: Включить улучшение промпта. true - да, false - нет
          example: 'false'
          enum:
            - 'false'
            - 'true'
        safety_tolerance:
          type: integer
          description: >-
            Уровень допуска безопасности для регулировки входа и выхода.
            Диапазон: 0-6, где 0 — самый строгий, а 6 — самый разрешающий. По
            умолчанию: 2
          example: '2'
        steps:
          type: integer
          description: >-
            Количество шагов в процессе генерации изображения. Диапазон: 1-50.
            По умолчанию: 40
          example: '40'
        guidance:
          type: number
          description: >-
            Степень соответствия промпту для генерации изображения. Более
            высокое значение усиливает соответствие промпту, но может снизить
            реалистичность. Диапазон: 1.5-5. По умолчанию: 2.5
          example: '2.5'
        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>.

````