DeepSwapAI Group photo API

Map up to ten replacement identities into one group photo.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 2

POST /api/ai-tasks/multi-face-swap Create a mapped group-photo face swap task #
GET /api/ai-tasks/multi-face-swap Get a mapped group-photo task #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/deepswapai-com:deepswapai-com-group-photo-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

deepswapai-com-group-photo-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: DeepSwapAI Face Swap Group photo API
  version: '2026-09-04'
  description: The current paid DeepSwapAI.com API for photo, batch photo, mapped group-photo, video, and GIF face swap tasks. A verified email and at least one PAID or COMPLETED credit order are required. Submit multipart media, receive a taskId, and poll the same workflow endpoint for completion.
  termsOfService: https://deepswapai.com/terms
  contact:
    name: DeepSwapAI Support
    url: https://deepswapai.com/contact
    email: support@deepswapai.com
  x-last-verified: '2026-09-04'
servers:
- url: https://deepswapai.com
  description: Production
security:
- bearerAuth: []
tags:
- name: Group photo
  description: Map up to ten replacement identities into one group photo.
paths:
  /api/ai-tasks/multi-face-swap:
    post:
      tags:
      - Group photo
      summary: Create a mapped group-photo face swap task
      operationId: createGroupPhotoFaceSwap
      description: Costs 6 credits per replacement face. Supply one group photo, contiguous targetFace0 through targetFace9 fields, and one corresponding faceBox mapping for every replacement. The total request can be up to 95 MB.
      x-credit-cost:
        credits: 6
        unit: replacement face
        maximumReplacementFaces: 10
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
              - sourceImage
              - targetFace0
              - faceBox0
              properties:
                sourceImage:
                  type: string
                  format: binary
                  description: Group photo containing the people to replace. JPEG, PNG, or WebP; maximum 30 MB.
                targetFace0:
                  type: string
                  format: binary
                  description: Replacement identity image 0. Numbered fields must be contiguous from targetFace0. JPEG, PNG, or WebP; maximum 30 MB.
                faceBox0:
                  type: string
                  description: 'Required when targetFace0 is supplied. JSON face mapping: {"x":number,"y":number,"width":number,"height":number}. Supply exactly one mapping for every replacement face.'
                  example: '{"x":120,"y":80,"width":180,"height":180}'
                targetFace1:
                  type: string
                  format: binary
                  description: Replacement identity image 1. Numbered fields must be contiguous from targetFace0. JPEG, PNG, or WebP; maximum 30 MB.
                faceBox1:
                  type: string
                  description: 'Required when targetFace1 is supplied. JSON face mapping: {"x":number,"y":number,"width":number,"height":number}. Supply exactly one mapping for every replacement face.'
                  example: '{"x":120,"y":80,"width":180,"height":180}'
                targetFace2:
                  type: string
                  format: binary
                  description: Replacement identity image 2. Numbered fields must be contiguous from targetFace0. JPEG, PNG, or WebP; maximum 30 MB.
                faceBox2:
                  type: string
                  description: 'Required when targetFace2 is supplied. JSON face mapping: {"x":number,"y":number,"width":number,"height":number}. Supply exactly one mapping for every replacement face.'
                  example: '{"x":120,"y":80,"width":180,"height":180}'
                targetFace3:
                  type: string
                  format: binary
                  description: Replacement identity image 3. Numbered fields must be contiguous from targetFace0. JPEG, PNG, or WebP; maximum 30 MB.
                faceBox3:
                  type: string
                  description: 'Required when targetFace3 is supplied. JSON face mapping: {"x":number,"y":number,"width":number,"height":number}. Supply exactly one mapping for every replacement face.'
                  example: '{"x":120,"y":80,"width":180,"height":180}'
                targetFace4:
                  type: string
                  format: binary
                  description: Replacement identity image 4. Numbered fields must be contiguous from targetFace0. JPEG, PNG, or WebP; maximum 30 MB.
                faceBox4:
                  type: string
                  description: 'Required when targetFace4 is supplied. JSON face mapping: {"x":number,"y":number,"width":number,"height":number}. Supply exactly one mapping for every replacement face.'
                  example: '{"x":120,"y":80,"width":180,"height":180}'
                targetFace5:
                  type: string
                  format: binary
                  description: Replacement identity image 5. Numbered fields must be contiguous from targetFace0. JPEG, PNG, or WebP; maximum 30 MB.
                faceBox5:
                  type: string
                  description: 'Required when targetFace5 is supplied. JSON face mapping: {"x":number,"y":number,"width":number,"height":number}. Supply exactly one mapping for every replacement face.'
                  example: '{"x":120,"y":80,"width":180,"height":180}'
                targetFace6:
                  type: string
                  format: binary
                  description: Replacement identity image 6. Numbered fields must be contiguous from targetFace0. JPEG, PNG, or WebP; maximum 30 MB.
                faceBox6:
                  type: string
                  description: 'Required when targetFace6 is supplied. JSON face mapping: {"x":number,"y":number,"width":number,"height":number}. Supply exactly one mapping for every replacement face.'
                  example: '{"x":120,"y":80,"width":180,"height":180}'
                targetFace7:
                  type: string
                  format: binary
                  description: Replacement identity image 7. Numbered fields must be contiguous from targetFace0. JPEG, PNG, or WebP; maximum 30 MB.
                faceBox7:
                  type: string
                  description: 'Required when targetFace7 is supplied. JSON face mapping: {"x":number,"y":number,"width":number,"height":number}. Supply exactly one mapping for every replacement face.'
                  example: '{"x":120,"y":80,"width":180,"height":180}'
                targetFace8:
                  type: string
                  format: binary
                  description: Replacement identity image 8. Numbered fields must be contiguous from targetFace0. JPEG, PNG, or WebP; maximum 30 MB.
                faceBox8:
                  type: string
                  description: 'Required when targetFace8 is supplied. JSON face mapping: {"x":number,"y":number,"width":number,"height":number}. Supply exactly one mapping for every replacement face.'
                  example: '{"x":120,"y":80,"width":180,"height":180}'
                targetFace9:
                  type: string
                  format: binary
                  description: Replacement identity image 9. Numbered fields must be contiguous from targetFace0. JPEG, PNG, or WebP; maximum 30 MB.
                faceBox9:
                  type: string
                  description: 'Required when targetFace9 is supplied. JSON face mapping: {"x":number,"y":number,"width":number,"height":number}. Supply exactly one mapping for every replacement face.'
                  example: '{"x":120,"y":80,"width":180,"height":180}'
      responses:
        '200':
          description: Task accepted for asynchronous processing.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskAccepted'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/InsufficientCredits'
        '403':
          $ref: '#/components/responses/EmailNotVerified'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/ServerError'
    get:
      tags:
      - Group photo
      summary: Get a mapped group-photo task
      operationId: getGroupPhotoFaceSwap
      description: 'Poll this endpoint until status is COMPLETED, FAILED, or CANCELLED. Polling is the currently supported completion mechanism; webhook callbacks are not available. Start near 5 seconds, use bounded exponential backoff with jitter, honor Retry-After, and cap the interval at 30 seconds. A local polling deadline is not a terminal task state: retain taskId and resume GET polling instead of submitting a duplicate POST.'
      x-polling-guidance:
        initialIntervalSeconds: 5
        maximumIntervalSeconds: 30
        exponentialBackoff: true
        jitter: true
        honorRetryAfter: true
        localTimeoutIsTerminalState: false
        retryCreateAfterUncertainResponse: false
        persistTaskIdBeforePolling: true
      parameters:
      - name: taskId
        in: query
        required: true
        description: The taskId returned by the matching POST request.
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Current task state.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Task'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  responses:
    EmailNotVerified:
      description: The account email must be verified before creating a task.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: The Bearer API key is missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ServerError:
      description: The task could not be accepted or read because of a server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: The API-key rate limit was exceeded or another generation is already in progress for the account. Generation requests are limited to 6 per key per minute; the broader API default is 20 requests per key per minute.
      headers:
        Retry-After:
          description: Seconds to wait when the API-key limit is exceeded.
          schema:
            type: integer
        X-RateLimit-Limit:
          description: Current per-key request limit when supplied.
          schema:
            type: integer
        X-RateLimit-Remaining:
          description: Remaining requests in the current window when supplied.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InsufficientCredits:
      description: The account does not have enough credits or does not have the completed purchase required for API access.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: No task with that taskId belongs to the authenticated account.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ValidationError:
      description: A field, file type, size, duration, mapping, or taskId is invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      required:
      - error
      properties:
        error:
          type: string
        required:
          type: integer
        available:
          type: integer
        limit:
          type: integer
        resetSeconds:
          type: integer
    TaskAccepted:
      type: object
      required:
      - taskId
      - status
      properties:
        taskId:
          type: string
          format: uuid
        status:
          $ref: '#/components/schemas/TaskStatus'
        requiredCredits:
          type: integer
          minimum: 0
          description: Included by workflows that return the calculated credit requirement.
        estimatedCredits:
          type: integer
          minimum: 0
          description: Included by the GIF workflow.
        quality:
          type: string
          enum:
          - 1080p
    TaskResult:
      type: object
      description: Terminal task output. Fields vary by workflow; the documented URL fields below cover single-output and batch delivery.
      properties:
        url:
          type: string
          format: uri
          description: Single-output result URL when the workflow returns one primary asset.
        urls:
          type: array
          items:
            type: string
            format: uri
          description: Batch output URLs in deterministic request order. Present on completed batch photo tasks, including single-output batches.
        zipUrl:
          anyOf:
          - type: string
            format: uri
          - type: 'null'
          description: Batch ZIP download URL when more than one output was produced; null for a completed single-output batch.
      additionalProperties: true
    Task:
      type: object
      required:
      - id
      - taskType
      - status
      - costCredits
      - createdAt
      properties:
        id:
          type: string
          format: uuid
        taskType:
          type: string
          enum:
          - IMAGE_SWAP
          - BATCH_FACE_SWAP
          - MULTI_FACE_SWAP
          - VIDEO_SWAP
          - GIF_FACE_SWAP
        status:
          $ref: '#/components/schemas/TaskStatus'
        costCredits:
          type: integer
          minimum: 0
        parameters:
          type: object
          additionalProperties: true
        result:
          anyOf:
          - $ref: '#/components/schemas/TaskResult'
          - type: 'null'
          description: Terminal result when available; null while no result has been recorded.
        createdAt:
          type: string
          format: date-time
        startedAt:
          type:
          - string
          - 'null'
          format: date-time
        completedAt:
          type:
          - string
          - 'null'
          format: date-time
    TaskStatus:
      type: string
      enum:
      - PENDING
      - PROCESSING
      - COMPLETED
      - FAILED
      - CANCELLED
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: DeepSwapAI API key
      description: 'Send the key once in Authorization: Bearer YOUR_API_KEY. Creating and using keys requires a verified email and at least one PAID or COMPLETED credit order. Each account can hold at most three keys. Keys are shown once when created and stored by DeepSwapAI only as SHA-256 hashes.'
externalDocs:
  description: Human-readable API documentation
  url: https://deepswapai.com/face-swap-api
x-postman-collection: https://deepswapai.com/deepswapai-face-swap-api.postman_collection.json
x-access-requirements:
  verifiedEmail: true
  paidOrCompletedCreditOrder: true
  rewardAndTrialCreditsAvailableThroughApi: false
  maximumKeysPerAccount: 3
  defaultRequestsPerMinutePerKey: 20
  generationRequestsPerMinutePerKey: 6