DeepSwapAI Photo API
One face reference and one target photo.
One face reference and one target photo.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
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.curl "https://apis.io/api/v1/apis/deepswapai-com:deepswapai-com-photo-api"
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.
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: 3.2.0
info:
title: DeepSwapAI Face Swap 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: Photo
description: One face reference and one target photo.
paths:
/api/ai-tasks:
post:
tags:
- Photo
summary: Create a photo face swap task
operationId: createPhotoFaceSwap
description: Costs 6 credits. Each image can be up to 30 MB. Accepted inputs are JPEG/JPG, PNG, WebP, GIF, BMP, HEIC, or HEIF with validated image content.
x-credit-cost:
credits: 6
unit: task
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
required:
- sourceImage
- targetImage
properties:
sourceImage:
type: string
format: binary
description: Face reference image; maximum 30 MB.
targetImage:
type: string
format: binary
description: Target scene image; maximum 30 MB.
faceRestoreVisibility:
type: number
default: 1
description: Optional face restoration visibility value.
restoreVisibility:
type: number
default: 1
description: Optional restoration visibility value.
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:
- Photo
summary: Get a photo face swap task
operationId: getPhotoFaceSwap
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