Face Swap API
$0.02
Developer-ready API access
Integrate fast and simple AI-powered face swapping ability into your apps. Deliver extraordinary, personalized images for your users!
Simple & Straightforward
$0.02
Developer-ready API access
Capabilities from the production model page.
With our affordable pay-as-you-use pricing, we deliver excellent value for money while providing top-notch face-swapping capabilities!
We work hard to keep latencies low for our API, turning back images result faster for our users!
Built to handle high concurrency, our API efficiently manages concurrent requests, ensuring service even during peak loads.
Integrating our API is a hassle-free setup process with simple HTTPs calls, making it easy to integrate within any tech stack.
Our API works asynchronously, enhancing your workflow efficiency, and allowing smoother integration into your existing systems.
Our API comes with robust automatic face detection capability, intelligently identifying and swapping faces in your input photo.
We have the backend infrastructure to handle your custom high-volume needs, be it for batch operations or large-scale projects or one-time project, we've got you covered.
Conforming to the constraints of REST architectural style, our API ensures interoperability and compatibility with a variety of systems
We will notify you of a completed task through our webhook feature, to avoid repeated fetch calls made through the network.
Sign up and grab an API key from the PiAPI workspace — free credits are included on sign-up.
Add credits on the billing page when you are ready to scale beyond the free tier.
POST your first task following the API docs, then poll the task until the result is ready.
Prototype prompts and settings in the the playground above before wiring them into your product.
curl -X POST 'https://api.piapi.ai/api/v1/task' \
-H 'X-API-Key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"model": "Qubico/image-toolkit",
"task_type": "face-swap",
"input": {
"target_image": "YOUR_TARGET_IMAGE_URL",
"swap_image": "YOUR_FACE_IMAGE_URL"
}
}'
# → { "task_id": "9d5a…", "status": "pending" }curl 'https://api.piapi.ai/api/v1/task/{task_id}' \
-H 'X-API-Key: YOUR_API_KEY'
# poll until status = completed
{
"data": {
"status": "completed",
"output": {
"image_url": "https://img.theapi.app/ephemeral/…"
}
}
}$ npm install -g piapi-cli $ piapi run faceswap-api \ target_image=YOUR_TARGET_IMAGE_URL \ swap_image=YOUR_FACE_IMAGE_URL ✓ Task completed! https://img.theapi.app/ephemeral/…
Our FaceSwap API based on a custom AI model which allows developers to integrate advanced face swapping capability into their own apps or platforms, providing their users with the ability to quickly personalize desired images.
Our API is created for developers who want to incorporate face swapping capabilities into their generative AI software applications. This feature is ideal for social apps, picture editing apps, and/or entertainment apps. Non-developers can also use our API with tools such as Postman/Make/Zapier to swap faces as well!
After registering for an account on PiAPI, you will get some free credits to try the API. Using your own API-KEY you can start making HTTPs calls to the API!
You can call our API using HTTPS Post and Get methods from within your application. A wide range of programming languages that support HTTP methods (ex. Python, JavaScript, Ruby, Java, etc.) can be used to make the call!
Our model is designed for optimal speed. The actual response time will vary depending on several factors including the file size of the input pictures, resolution of the pictures, the unobstructed view of the face. Typically, the smaller the size of inputs will have a faster response time.
We will queue your concurrent jobs if the number of your concurrent jobs exceeds a certain threshold. In terms of total number of requests, you can make as many requests as your credit amount allows.
Our API returns error codes and messages in the HTTP response to help identify the issue. Please refer to our documentation for more details.
Yes, absolutely! We have clients who need custom solutions for specialized requirements (ex. Low latency, extra storage time, high concurrency, fine-tuning models, or just shorter queuing time in general), and we do provide cost-effective and performance-enhanced solutions for these scenarios!
Our model is hosted on PiAPI's server (rented). Our API does not store any input images, they go directly into the model. The output images are stored on our CDN provider's storage for three (3) days and then they are deleted.
We offer the API through a pay-as-you-use system, you can purchase credits on our Workspace and monitor the remaining credits. The per-use cost of the API is reflected on upper portion this page. Please note that the credits purchased do expire in 180 days after purchase.
We have integrated Stripe in our payment system, which will allow payments to be made from most major credit card providers.
No, we do not offer refunds. But when you first sign up for an account on PiAPI's Workspace, you are given free credits to try our service before making payments!
Please email us at support@piapi.ai - we'd love to listen to your feedback and explore potential collaborations!
More questions? See the API docs.