Migrating from Capix FaceSwap API to magicapi/faceswap-capix API
This guide provides focused instructions to help you migrate your applications from the old Capix FaceSwap API to the new magicapi/faceswap-capix API by API.market.
Last updated
This guide provides focused instructions to help you migrate your applications from the old Capix FaceSwap API to the new magicapi/faceswap-capix API by API.market.
Last updated
You can try the new API here ->
Why Migrate?
The Capix FaceSwap API is scheduled for a platform-wide shutdown on Wednesday, May 21st, 2025. Our new magicapi/faceswap-capix
API is an enhanced, in-house replacement designed for better performance and clarity.
The primary changes you need to be aware of are:
No /upload/
Endpoint: The new API requires you to provide public URLs for your target_url
and swap_url
directly. File uploads via a dedicated endpoint are no longer supported.
New Base URL: The base URL for the service has changed.
New Endpoint Paths for Submitting Jobs: The paths for initiating image and video faceswaps are new.
Separate Result Endpoints: Previously, you might have used a single /result/
endpoint. Now, there are distinct endpoints for fetching image results (/image/result/
) and video results (/video/result/
).
Other aspects like authentication (using x-magicapi-key
) and the core parameters for target_url
and swap_url
remain conceptually similar, though the new API introduces an optional target_face_index
.
This is the most critical part of the migration.
Old Capix API Base URL (example): https://prod.api.market/api/v1/capix/faceswap
New magicapi/faceswap-capix
API Base URL: https://prod.api.market/api/v1/magicapi/faceswap-capix
Submitting Image FaceSwap:
Old: POST {OLD_BASE_URL}/faceswap/v1/image
New: POST {NEW_BASE_URL}/image/run
Key Change: Base URL and path. Functionality is similar (takes target_url
, swap_url
).
Getting Image FaceSwap Result:
Old: POST {OLD_BASE_URL}/result/
(with request_id
for an image job)
New: POST {NEW_BASE_URL}/image/result/
(with request_id
)
Key Change: Base URL and a dedicated path for image results.
Submitting Video FaceSwap:
Old: POST {OLD_BASE_URL}/faceswap/v1/video
New: POST {NEW_BASE_URL}/video/run
Key Change: Base URL and path. Functionality is similar (takes target_url
, swap_url
). Response structure is the same as the new image run endpoint.
Getting Video FaceSwap Result:
Old: POST {OLD_BASE_URL}/result/
(with request_id
for a video job)
New: POST {NEW_BASE_URL}/video/result/
(with request_id
)
Key Change: Base URL and a dedicated path for video results. Response structure is the same as the new image result endpoint.
/upload/
EndpointIf you were using the /upload/
endpoint in the old API, you must now ensure your image and video files are accessible via public URLs before calling the new /image/run
or /video/run
endpoints. The new API expects target_url
and swap_url
parameters to be direct public links.
The core parameters target_url
and swap_url
remain.
The new API introduces an optional target_face_index
(integer, default: 0) for both /image/run
and /video/run
if you need to specify which face to target in media with multiple faces.
The new API provides well-defined JSON responses. The /run
endpoints immediately return a request_id
. The /result/
endpoints provide status and, upon completion, a result_url
.
Important Note: For video operations (/video/run
and /video/result/
), the main JSON response object key is image_process_response
, the same as for image operations. Adapt your parsing logic accordingly.
If you have questions or need assistance with the migration, please contact API.market support.
Alternative for Uploading: If you require a way to upload your images to get a public URL, API.market provides a free, managed Image Upload API that you can use: . This service can help you host your images and obtain the necessary public URLs for the magicapi/faceswap-capix
API.