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

# Delete a Wan face swap task

> Delete a Wan face swap task owned by the current API key scope.



## OpenAPI

````yaml openapi/wan-face-swap.yaml DELETE /wan-face-swaps/generations/{id}
openapi: 3.1.0
info:
  title: Wan face swap API
  version: 1.0.0
  description: Provider-specific GENGEN reference for asynchronous Wan face swap tasks.
servers:
  - url: https://gengen.farm/api/gengen/v1
    description: Production
security:
  - bearerAuth: []
paths:
  /wan-face-swaps/generations/{id}:
    delete:
      summary: Delete a Wan face swap task
      description: Delete a Wan face swap task owned by the current API key scope.
      operationId: deleteWanFaceSwapTask
      parameters:
        - $ref: '#/components/parameters/TaskId'
      responses:
        '200':
          description: The task was deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteTaskResponse'
              example:
                id: wanfaceswap:550e8400-e29b-41d4-a716-446655440000
                deletedAt: '2026-07-21T08:03:00.000Z'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        default:
          $ref: '#/components/responses/UnexpectedError'
      x-codeSamples:
        - lang: bash
          label: Delete task
          source: |
            curl --request DELETE \
              --url https://gengen.farm/api/gengen/v1/wan-face-swaps/generations/wanfaceswap%3A550e8400-e29b-41d4-a716-446655440000 \
              --header 'Authorization: Bearer gengen_live_xxxxxxxxxxxxxxxx'
components:
  parameters:
    TaskId:
      name: id
      in: path
      required: true
      description: Public task ID beginning with `wanfaceswap:`. URL-encode it in the path.
      schema:
        type: string
  schemas:
    DeleteTaskResponse:
      type: object
      required:
        - id
        - deletedAt
      properties:
        id:
          type: string
        deletedAt:
          type: string
          format: date-time
      additionalProperties: true
    Error:
      type: object
      properties:
        error_code:
          type: string
        error:
          type: string
        error_params:
          type: object
          additionalProperties: true
      additionalProperties: true
  responses:
    BadRequest:
      description: The request is invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: The bearer token is missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: The API key is not authorized for this operation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: The task was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    UnexpectedError:
      description: GENGEN or the Wan provider could not complete the request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: GENGEN API key
      description: A workspace API key beginning with `gengen_live_`.

````