> ## 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 Result Fetch API Documentation

> Use the Flux fetch API to retrieve image generation task status, output URLs, and response payloads for asynchronous image workflows.



## OpenAPI

````yaml openapi/en/flux.json GET /flux/fetch
openapi: 3.1.0
info:
  title: Flux API DOCS
  version: 1.0.0
  description: >-
    TTAPI Flux API service, currently integrating the most advanced video large
    model 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: Request successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - 'PENDING_QUEUE '
                      - ON_QUEUE
                      - SUCCESS
                      - FAILED
                  message:
                    type: string
                    description: Response message
                  jobId:
                    type: string
                    description: Task ID
                  data:
                    type: object
                    description: Task result
                    properties:
                      jobId:
                        type: string
                        description: Task ID
                      mode:
                        type: string
                        description: Model version
                      prompt:
                        type: string
                        description: Prompt
                      quota:
                        type: string
                        description: Quota consumed
                      size:
                        type: string
                        description: Image size
                      imageUrl:
                        type: string
                        description: >-
                          Generated image URL. Validity: see [Storage and
                          Persistence](/grids/en/faq/storage)
                      hookUrl:
                        type: string
                        description: Callback 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 returned synchronously by the image generation endpoint
      required:
        - jobId
  responses:
    400Response:
      description: Parameter error
      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: Authorization failed
      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: >-
        You can obtain your API key from the <a
        href='https://dashboard.ttapi.io' target='_blank'>TTAPI Dashboard</a>.

````