> ## 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.

# Получение результата

> Используйте API получения результата Flux, чтобы получать статус задач генерации изображений, выходные URL и данные ответов для асинхронных сценариев.



## OpenAPI

````yaml openapi/ru/flux.json GET /flux/fetch
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:
  /flux/fetch:
    get:
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/FetchRequest'
      responses:
        '200':
          description: Запрос выполнен успешно
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - 'PENDING_QUEUE '
                      - ON_QUEUE
                      - SUCCESS
                      - FAILED
                  message:
                    type: string
                    description: Сообщение ответа
                  jobId:
                    type: string
                    description: ID задач
                  data:
                    type: object
                    description: Результат задачи
                    properties:
                      jobId:
                        type: string
                        description: ID задач
                      mode:
                        type: string
                        description: Версия модели
                      prompt:
                        type: string
                        description: Промпт
                      quota:
                        type: string
                        description: Израсходованная quota
                      size:
                        type: string
                        description: Размер изображения
                      imageUrl:
                        type: string
                        description: >-
                          URL сгенерированного изображения. Срок действия: см.
                          [Хранение и устойчивость](/grids/ru/faq/storage)
                      hookUrl:
                        type: string
                        description: URL обратного вызова
                example:
                  status: SUCCESS
                  message: ''
                  jobId: c679a92e-dae0-462d-b70f-dcfeaf2189fa
                  data:
                    mode: flux-dev
                    jobId: bf165abb-a7fa-4c77-a2e4-138baac1130d
                    prompt: A beautiful Asian girl posing for a photo with a cat
                    quota: '1'
                    size: 1024x1024
                    imageUrl: >-
                      https://cdnb.ttapi.io/2024-09-10/9rk3gmw3m6sxm4r75my02r48jizyli1l.webp
                    hookUrl: https://webhook-test.com/d47a918bcf231bfd4dcd1f63c2cb4c80
                required:
                  - status
                  - message
        '400':
          $ref: '#/components/responses/400Response'
        '401':
          $ref: '#/components/responses/401Response'
      security:
        - CustomApiKey: []
components:
  schemas:
    FetchRequest:
      type: object
      properties:
        jobId:
          type: string
          description: jobId, синхронно возвращенный интерфейсом генерации изображения
      required:
        - jobId
  responses:
    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>.

````