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

# SwapFace Result Fetch

> Query face swap task results. The returned data structure is consistent with the <a href="fetch" target="_self">hookUrl</a> return format.<br/>Note: jobId can be passed via URL parameters (Query) or request body (Body)



## OpenAPI

````yaml openapi/en/swapface.json get /insightFace/v1/fetch
openapi: 3.1.0
info:
  title: Swapface API DOCS
  version: 1.0.0
  description: >-
    TTAPI Swapface API service, currently integrating the most advanced video
    large model Sora2.
servers:
  - url: https://api.ttapi.io
security: []
paths:
  /insightFace/v1/fetch:
    get:
      description: >-
        Query face swap task results. The returned data structure is consistent
        with the <a href="fetch" target="_self">hookUrl</a> return
        format.<br/>Note: jobId can be passed via URL parameters (Query) or
        request body (Body)
      parameters:
        - name: jobId
          in: query
          required: true
          schema:
            type: string
          description: Job ID returned synchronously by the generation endpoint
          example: SWAP-FACE-171349414479347616
      responses:
        '200':
          description: Request successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - SUCCESS
                      - ON_QUEUE
                      - FAILED
                    description: >-
                      Task status: ON_QUEUE-processing, SUCCESS-success,
                      FAILED-failed
                    example: SUCCESS
                  message:
                    type: string
                    description: >-
                      Response message: empty string on success, returns
                      specific error reason on failure (e.g., 'insufficient
                      quota', 'prompt violation')
                    example: ''
                  jobId:
                    type: string
                    description: >-
                      Unique task identifier for querying task status or
                      receiving callback notifications
                    example: c679a92e-dae0-462d-b70f-dcfeaf2189fa
                  data:
                    oneOf:
                      - title: SUCCESS
                        type: object
                        description: Data returned when task succeeds
                        properties:
                          targetImage:
                            type: string
                            description: >-
                              URL of the template image uploaded by the user.
                              Validity: see [Storage and
                              Persistence](/grids/en/faq/storage)
                          swapImage:
                            type: string
                            description: >-
                              URL of the face image uploaded by the user.
                              Validity: see [Storage and
                              Persistence](/grids/en/faq/storage)
                          discordImage:
                            type: string
                            description: >-
                              Discord address of the result returned when the
                              task is successful, not directly accessible in
                              China. Validity: see [Storage and
                              Persistence](/grids/en/faq/storage)
                          cdnImage:
                            type: string
                            description: >-
                              TTAPI proxy address of the result returned when
                              the task is successful, directly accessible in
                              China. Validity: see [Storage and
                              Persistence](/grids/en/faq/storage)
                          quota:
                            type: string
                            description: Quota consumed
                            example: '3'
                          hookUrl:
                            type: string
                            description: Callback URL
                            example: >-
                              https://webhook-test.com/bf74f63b0d51ba1b3090e295aae057fe
                          finishTime:
                            type: string
                            description: Completion time
                            example: '2025-07-30T05:40:01Z'
                      - title: ON_QUEUE
                        type: object
                        description: Data returned when task is processing
                      - title: FAILED
                        type: object
                        description: Data returned when task fails
                required:
                  - status
                  - message
                  - jobId
                examples:
                  SUCCESS:
                    summary: Success status example
                    value:
                      status: SUCCESS
                      message: ''
                      jobId: SWAP-FACE-171349414479347616
                      data:
                        jobId: SWAP-FACE-171349414479347616
                        targetImage: >-
                          https://pics1.baidu.com/feed/a5c27d1ed21b0ef42316cbd385d68fd780cb3e64.jpeg@f_auto?token=0d9295cb14265da251460e7e8918db0a
                        swapImage: >-
                          https://img2.baidu.com/it/u=2626318104,3413060045&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=625
                        discordImage: >-
                          https://cdn.discordapp.com/attachments/1225427359679909939/1230708397020811325/2aa3ab1495b844d084aa6eaaa4fb9bcf_ins.jpg?ex=66344d83&is=6621d883&hm=a0ac9fbb17cf52302662e2f50b40a9894977624d55bcc4f32d6ed09e7c56a415&
                        cdnImage: >-
                          https://mjcdn.ttapi.io/attachments/1225427359679909939/1230708397020811325/2aa3ab1495b844d084aa6eaaa4fb9bcf_ins.jpg?ex=66344d83&is=6621d883&hm=a0ac9fbb17cf52302662e2f50b40a9894977624d55bcc4f32d6ed09e7c56a415&
                        hookUrl: null
                        quota: '3'
                        finishTime: '2025-07-30T05:40:01Z'
                  ON_QUEUE:
                    summary: Processing status example
                    value:
                      status: ON_QUEUE
                      message: ''
                      jobId: SWAP-FACE-171349414479347616
                      data: null
                  FAILED:
                    summary: Failed status example
                    value:
                      status: FAILED
                      message: Insufficient quota
                      jobId: SWAP-FACE-171349414479347616
                      data: null
        '400':
          $ref: '#/components/responses/400Response'
        '401':
          $ref: '#/components/responses/401Response'
      security:
        - CustomApiKey: []
components:
  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>.

````