Freja Faceswap Examples
Result
Swap faces in photos and videos with our optimized proprietary pipeline, using source portraits and optional identity matching.
Pricing
Charged in credits.
| Configuration | Credits |
|---|---|
media type: image | 0.05per image |
media type: video | 0.02per started second of video |
0.05 credits per image, or 0.02 credits per started second of video.
- Videos have a five-second minimum charge. Video seconds always round upward: 5.1 seconds costs 0.12 credits.
- Only the first 30 seconds are processed and billed, so the maximum video charge is 0.60 credits.
- The backend measures the target video before reserving credits. It uses a temporary snapshot for processing so the checked video cannot change afterward.
- Extra source portraits, identity matching and occlusion masking have no separate surcharge.
- Credits are reserved before inference. Failed jobs refund the reserved credits.
About Freja Faceswap
Replace faces in photos and videos with our optimized proprietary face-swapping pipeline. Use up to five portraits of the same person, add an optional identity-reference portrait, and control boundary and occlusion masking.
- This model has no text prompt, negative prompt, seed, step count or LoRA input.
- Source and reference portraits must each contain exactly one detectable face. Use source photos of the same person.
- Without a reference portrait, the largest detected face is chosen per frame; a video with several people may switch subjects. This is not persistent identity tracking.
- With a reference portrait, frames without a matching face remain unchanged. Jobs with no selected face fail and refund reserved credits.
- Only one image or video target and one output are supported. Image outputs are PNG; videos are H.264 MP4.
- Image URLs: PNG/JPEG/WebP up to 50 MiB, 64 megapixels and 16384 pixels per side; normalized to at most 4 megapixels/4096 per side. Playground image uploads use 10 MiB/12 MP limits.
- MP4 intake is up to 256 MiB/4096 pixels per side; Playground uploads are capped at 25 MiB. Longer clips use only their first 30 seconds. Video resolution and FPS may be reduced automatically.
- The existing audio track is requested when available; full audio-preservation acceptance and maximum-load quality remain unverified.
- Editing quality depends on face angle, lighting and occlusion. Result media expires after 24 hours unless saved to assets.
API Reference
View llms.txtCreate an asynchronous generation job, then fetch its status and result or receive a webhook.
Base URL: https://api.deepixels.co
Create a job
/v1/generateHeaders
x-api-keyYour Deepixels API key. Keep it on your server and include it on every generation or job-status request.
Example: "YOUR_DEEPIXELS_API_KEY"
Content-TypeSend the request body as JSON.
"application/json"Request body
modelThe exact model ID to run.
"freja/faceswap"inputModel inputs as a JSON object. Supported fields and limits are documented below.
webhookOptional public HTTPS URL. Deepixels sends a POST when the job completes or fails, with the same job body returned by GET /v1/get. Return a 2xx status to acknowledge delivery. Delivery may be retried, so handle repeated job IDs safely.
Maximum length: 2,048 characters
Example: "https://your-app.example/webhooks/deepixels"
Examples
Submit once, then use the returned jobId to get the result.
Model inputs · input
imagesOne to five source portraits of the same person; optionally one reference portrait identifying whom to replace, and one image target when no video target is supplied. Each source/reference must show exactly one face.
Minimum items: 1 · Maximum items: 7
videosOne MP4 target instead of an image target. Public URLs up to 256 MiB; uploads up to 25 MiB. The first 30 seconds are processed, fitted within 720p bounds and capped to 30 FPS.
Minimum items: 1 · Maximum items: 1
parametersOptional controls. Omitted values use the API defaults shown below.
API default: {}
Example: {"face_mask_types":["box"],"reference_face_distance":0.3}
Expected response · 200
{
"jobId": "example-job-id",
"status": "created",
"credit": 1
}Sample values. The reserved credit amount is calculated by the server from your inputs and current pricing. Use the returned jobId to get the result.
Response fields
jobIdThe job ID. Use it to read this job's status and result.
statusThe initial job status. Submission returns before generation finishes.
"created"creditCredits reserved by the server using the current model pricing. This is a response field; do not send it in the request.
Validation and availability checks run before credits are reserved. The server determines pricing and execution settings. Only model, input and optional webhook are accepted at the request root.
Get a job
/v1/getPoll using the job ID returned by Create a job. Only the account that created the job can read it. Stop polling when status is completed or failed.
Headers
x-api-keyYour Deepixels API key. Keep it on your server and include it on every generation or job-status request.
Example: "YOUR_DEEPIXELS_API_KEY"
Query parameters
jobIdThe job ID returned by POST /v1/generate.
Example: "YOUR_JOB_ID"
Expected response · 200
{
"jobId": "example-job-id",
"model": "freja/faceswap",
"status": "completed",
"input": {
"images": [
{
"url": "https://r2.deepixels.co/explore/freja/inpaint/examples/599cc84a-b20e-4a2a-9185-9baf17038c3f/inputs/target-v1.png",
"role": "source"
},
{
"url": "https://r2.deepixels.co/explore/freja/h3-image/examples/9ca91ff7-9fa6-44a8-9eae-a3be4f2ac97a/inputs/character-reference-v1.png",
"role": "target"
}
],
"parameters": {
"face_mask_types": [
"box"
],
"reference_face_distance": 0.3
}
},
"webhook": null,
"output": {
"imageUrl": [
"https://r2.deepixels.co/results/example-result.png"
],
"videoUrl": [
"https://r2.deepixels.co/results/example-result.mp4"
]
},
"date": 1767225600000,
"startedAt": 1767225601000,
"finishedAt": 1767225901000,
"durationMs": 300000,
"resultExpiresAt": 1767312301000,
"recordExpiresAt": null
}Illustrative response. IDs, URLs and timing values will differ. While processing or after failure, output can be null. A failed job still returns HTTP 200 when its status is retrieved successfully.
Response fields
jobIdThe job ID.
modelThe model used by this job.
statusStop polling at completed or failed.
"created""pending""processing""completed""failed"inputThe saved model inputs.
webhookThe callback URL, when supplied.
outputThe current Deepixels job API returns result URL arrays, such as videoUrl, imageUrl or audioUrl when available. It can be null before a result exists. The worker schema below describes worker media metadata, not this job envelope.
dateJob creation time as a Unix timestamp in milliseconds, when available.
startedAtJob start time as a Unix timestamp in milliseconds, when available.
finishedAtJob finish time as a Unix timestamp in milliseconds, when available.
durationMsRecorded job duration in milliseconds, when available.
resultExpiresAtResult expiry time as a Unix timestamp in milliseconds, when available.
recordExpiresAtJob record expiry time as a Unix timestamp in milliseconds, when available.
List requests
/v1/model-requestsList your Playground and API jobs for this model, newest first. Send your x-api-key; each page contains up to 20 requests. Pass next_cursor as cursor to load the next page.
Query parameters
modelExact model ID.
Example: "freja/faceswap"
cursorThe next_cursor returned by the previous page. Omit it for the newest requests.
curl "https://api.deepixels.co/v1/model-requests?model=freja%2Ffaceswap" -H "x-api-key: YOUR_DEEPIXELS_API_KEY"The response contains requests and next_cursor (null on the final page). Each entry has response, the full Get a job response; source (playground, api or unknown); contractVersion; and billing with state, reservedCredits, chargedCredits and refundedCredits. Unknown amounts are null. Temporary previews may expire while request details remain available.
Schemas
These describe model inputs and worker output. GET /v1/get uses the job response documented above.
Limits & behavior
- This model has no text prompt, negative prompt, seed, step count or LoRA input.
- Source and reference portraits must each contain exactly one detectable face. Use source photos of the same person.
- Without a reference portrait, the largest detected face is chosen per frame; a video with several people may switch subjects. This is not persistent identity tracking.
- With a reference portrait, frames without a matching face remain unchanged. Jobs with no selected face fail and refund reserved credits.
- Only one image or video target and one output are supported. Image outputs are PNG; videos are H.264 MP4.
- Image URLs: PNG/JPEG/WebP up to 50 MiB, 64 megapixels and 16384 pixels per side; normalized to at most 4 megapixels/4096 per side. Playground image uploads use 10 MiB/12 MP limits.
- MP4 intake is up to 256 MiB/4096 pixels per side; Playground uploads are capped at 25 MiB. Longer clips use only their first 30 seconds. Video resolution and FPS may be reduced automatically.
- The existing audio track is requested when available; full audio-preservation acceptance and maximum-load quality remain unverified.
- Editing quality depends on face angle, lighting and occlusion. Result media expires after 24 hours unless saved to assets.
Error responses
Errors return JSON with status: "error" and a message. Common responses include 400 for invalid input, 401 for an API key problem, 402 for insufficient credit, 404 for a missing job, 409 when model settings changed, and 5xx for availability or server failures.
Examples
Explore examples and try their inputs.
Pool splash — portrait-to-video face swap
Pool splash — portrait-to-video face swap
Replace one face in a group portrait
Replace one face in a group portrait