API buyer guide
Face Swap API Evaluation: 15 Production Checks
Evaluate a face swap API for authentication, pricing, uploads, async tasks, errors, privacy and production readiness with a reproducible checklist.
Method, measurements and limitations reviewed against the published dataset.

Key takeaways
- Start with the published OpenAPI contract, then verify behavior with a separate test account and permitted media.
- Normalize cost to the same photo, group, video or GIF workload instead of comparing a credit headline.
- Test authentication, validation, asynchronous states, ownership, refunds and temporary result access before integration.
- Record missing contract features as missing; do not infer webhooks, idempotency, an SLA or guaranteed output from a marketing page.
Open data and method
Use the versioned source files to reproduce the table or cite the current measurement boundary.
1. Define one acceptance workload before comparing APIs
An API evaluation needs a fixed job, not a list of logos. Specify the media type, source and target file properties, duration or frame count, number of selected faces, expected concurrency, acceptable completion window and downstream use. Use media you own or are authorized to process, and keep exact copies so every provider receives the same inputs.
Create a normal case and a difficult but legitimate case. For photos, the difficult case might use a three-quarter angle or partial occlusion. For video, include one head turn or lighting change. Define pass and fail observations before seeing the result: HTTP behavior, task state sequence, charged amount, output dimensions, visible watermark, first unstable timestamp and file-retention boundary.
Do not let a successful provider demo stand in for your workload. A controlled test exposes whether the integration fits your files, queue behavior and budget, while a polished sample proves only that one selected sample completed.
2. Inspect the machine-readable contract before writing client code
A production API should expose methods, paths, authentication, request fields, response schemas and failure statuses in a versioned contract. Check that the human guide and OpenAPI document agree. Generate a client only after reading the raw schema, because generated types cannot repair an incomplete or inaccurate contract.
FaceSwapAI publishes OpenAPI 3.1 version 1.0.0. The current surface has four multipart POST operations, matching GET operations that accept taskId, and a paginated task-history GET. Every route uses a bearer API key tied to a verified account. The published application limit is 300 authenticated requests per minute; generation throughput remains queue-dependent.
| Contract check | Current FaceSwapAI v1 evidence | Integration decision |
|---|---|---|
| Version and server | OpenAPI 3.1.0; production server URL is explicit | Pin the version reviewed by your team |
| Authentication | HTTP bearer key from the account key manager | Keep the key on a trusted server |
| Submit operations | Photo, video, GIF and multiple-face multipart POST | Map each workload to one documented route |
| Status operations | Matching GET route with required taskId | Poll only the route that accepted the task |
| Task history | Paginated GET with status and task-type filters | Use it for reconciliation, not as a webhook substitute |
3. Normalize pricing to one completed workload
A credit is not a currency and has no universal dollar value. First calculate the exact task credits, then divide the relevant live pack price by usable credits. Keep pack expiration, subscription renewal, taxes, failed-task refund behavior and any resolution surcharge in separate columns. Recalculate whenever the provider changes its packs or formula.
FaceSwapAI: one image costs 6 credits; multiple-face swap costs 6 credits per selected target face; video and GIF cost 3 credits per server-measured input second, rounded up, with a 9-credit minimum.
| Test workload | Current formula | Credits to reserve |
|---|---|---|
| One paid photo | Fixed | 6 |
| One group photo with 1-10 selected faces | 6 × selected target faces | 6 × selected target faces |
| 4-second video | max(9, 3 × ceil(4)) | 12 |
| 18.2-second video | max(9, 3 × ceil(18.2)) | 57 |
| 6-second GIF with 80 frames | max(9, 3 × ceil(6)) | 18 |
| 12-second GIF with 180 frames | max(9, 3 × ceil(12)) | 36 |
4. Verify asynchronous states, retries and reconciliation
Treat submission and completion as different events. A successful POST should return a stable task identifier and the amount reserved. Persist that identifier before polling. Stop on a terminal state, place a ceiling on polling duration and retain enough internal context to reconcile the request without storing the customer media longer than necessary.
FaceSwapAI currently returns taskId after an accepted POST and exposes PENDING, PROCESSING, COMPLETED, FAILED and CANCELLED. The client polls the matching media route and reads a temporary result URL only after completion. If a task fails on our side, its credits are refunded automatically, once; a client should still reconcile the final task record rather than assuming that every network timeout means failure.
The published v1 contract does not expose a webhook or an idempotency-key field. It also does not publish an SLA or guaranteed completion time. Integrations must use bounded polling and avoid automatically repeating an uncertain POST, because a lost client response can occur after the server accepted the task. Those are current contract boundaries, not features to infer from another provider or a future roadmap.
5. Test file validation before testing model quality
Separate transport acceptance from visual quality. Send one valid file at the documented boundary, one unsupported container, one mislabeled file, one truncated file and one oversized request. Confirm that validation happens before an expensive task starts and that a rejected request does not consume any paid credits.
Duration, frame count and MIME type should be derived from the media rather than trusted from a browser filename. For group photos, verify that the number and coordinates of selected faces match the submitted replacement files. A detector response is an input to selection, not proof that a final identity transfer will look convincing.
| FaceSwapAI input | Current boundary | Pre-production test |
|---|---|---|
| Photo source and target | Recognized still formats; 30 MB each | Valid pair, corrupt image, false extension, 30 MB boundary |
| Multiple-face inputs | 15 MB each; up to 10 selected faces | Missing replacement, invalid box, unmatched face count |
| Video target | MP4, MOV, WebM or AVI; 100 MB; 600 seconds (about 1–2 min of 1080p phone video) | Container, duration and file-size boundaries |
| GIF target | GIF; 30 MB; 30 seconds; billing uses server-measured input duration | Duration boundary and truncated animation |
| Consent field | Boolean true is required for every generation | Missing and false values must be rejected |
6. Give every HTTP error one client action
Retry rules should be written before launch. Permanent request or account errors need a user action, while transient capacity errors need backoff and a retry ceiling. Log the request identifier, route, taskId when available, status, elapsed time and public error category. Do not log bearer keys or raw face media.
The table follows the current published FaceSwapAI response contract. A real integration must still inspect the response body and task record, because an intermediary timeout or connection reset does not provide the same certainty as an application response.
| HTTP status | Meaning in current contract | Client action |
|---|---|---|
| 400 | Invalid form data, media metadata or consent | Correct the request; do not retry unchanged |
| 401 | Missing or invalid API key | Stop and rotate or replace the credential |
| 402 | Insufficient account credits | Show required and available balance |
| 403 | Account email is not verified | Complete verification before resubmitting |
| 413 | Request or file exceeds a published limit | Resize, trim or reject locally |
| 429 | Authenticated request limit reached | Apply exponential backoff with jitter |
| 500 or 503 | Queueing failure or provider unavailable | Reconcile the task, then retry later within a ceiling |
7. Trace media, identity and result access separately
Document where source and target media enter the system, which processors receive them, how a temporary result is delivered and when each copy is scheduled for deletion. Keep account, billing, security and consent records separate from task media; one retention sentence rarely applies to every data category.
FaceSwapAI schedules uploaded and generated task files for deletion after 24 hours and may remove them earlier. Upstream-provider policies also apply. Every generation requires consent=true and a verified account. There is no free trial: every task is paid with one-time credits, from 600 credits for $19.99.
A result URL is not a permanent asset store. Download an approved result into your own controlled storage and enforce the customer retention policy there; uploaded and generated files are auto-deleted after 24 hours. Every result has no watermark and never contains the account email, so a forwarded file does not reveal the address.
8. Separate observed production evidence from untested checks
FaceSwapAI publishes a machine-readable conformance matrix for this 15-check protocol. The July 20, 2026 snapshot binds the fetched OpenAPI response to a SHA-256 hash and records one isolated production smoke run against temporary users, keys, tasks and Redis counters. No customer data or paid upstream generation was used.
The matrix reports eight bounded passes, four partial checks and three checks that were deliberately not executed. Maximum media boundaries, uncertain accepted POST recovery and 24-hour result expiry remain unexecuted; they are not converted into passes from documentation alone. The snapshot is a first-party evidence record, not an independent audit, SLA, security certification or output-quality score.
| Snapshot status | Count | How to interpret it |
|---|---|---|
| Pass | 8 of 15 | The exact bounded requirement matched runtime or contract evidence |
| Partial | 4 of 15 | Some evidence exists, but at least one material part was not exercised |
| Not executed | 3 of 15 | No runtime pass is claimed |
9. Run all 15 checks before production traffic
Record the date, API version, exact input checksums and response evidence for every row. A pass means the observed behavior matched a written acceptance rule; it does not mean the same provider wins every workload. Re-run contract, price, retention and error tests after a version or policy change.
| # | Production check | Evidence to retain |
|---|---|---|
| 1 | OpenAPI parses and names the production server | Saved version and schema validation result |
| 2 | Key creation, revocation and invalid-key handling work | 401 response and key lifecycle record |
| 3 | Unverified accounts cannot generate | 403 response from a test account |
| 4 | Every accepted media type completes | Task IDs and terminal states |
| 5 | Corrupt and mislabeled files fail before charging | 400 response and unchanged balance |
| 6 | Size, duration, frame and face-count limits match docs | Boundary-case response matrix |
| 7 | Credits match the exact workload formula | Before/after balance and task cost |
| 8 | Rate limiting returns a controlled 429 | Window, headers and backoff behavior |
| 9 | Polling observes only documented states | Timestamped state sequence |
| 10 | Network uncertainty does not trigger blind duplicate POSTs | Client retry and reconciliation log |
| 11 | Failed tasks are refunded automatically, once | Credit ledger and final task record |
| 12 | One account cannot read another account’s task | 404 or equivalent ownership response |
| 13 | Result URLs are treated as temporary | Download and expiry handling test |
| 14 | Results carry no watermark or account email, as disclosed | Original downloaded result files |
| 15 | Retention, consent and subprocessor review is approved | Dated legal and security sign-off |
Ready to apply the checklist to your own permitted media?
Questions this guide answers
What should I test first in a face swap API?
Validate the OpenAPI contract, authentication, one normal permitted workload, exact charged credits and the complete asynchronous task lifecycle before testing concurrency.
Does the FaceSwapAI API currently support webhooks?
No webhook is exposed in the published v1 contract. Current clients submit a task and poll the matching media route with taskId.
Does FaceSwapAI publish an idempotency key?
No idempotency-key field is published in v1. Persist taskId and reconcile uncertain requests rather than blindly repeating a POST.
How many authenticated API requests are allowed?
The current application-level limit is 300 authenticated requests per minute. Generation throughput also depends on queue and provider capacity.
Is an API result URL permanent?
No. Task media is temporary and scheduled for deletion after 24 hours, with earlier removal possible. Download approved results to storage you control.
Is the FaceSwapAI API conformance matrix an independent certification?
No. It is a dated first-party evidence snapshot. Every row identifies its observed behavior, evidence type and boundary, and partial or unexecuted checks are not counted as passes.
Which API checks were not executed in the July 20, 2026 snapshot?
Maximum media boundaries, recovery from a connection loss after an uncertain accepted POST and 24-hour result expiry were not runtime-tested. Read the downloadable matrix before relying on any check.