Freja Inpaint API Reference
Result
Edit selected parts of an image with Fooocus inpainting, uploaded masks or automatic clothing detection, plus optional SDXL LoRAs.
Pricing
Charged in credits.
| Configuration | Credits |
|---|---|
Standard | 0.05per image |
0.05 credits per successful image.
- One PNG is generated per request, with a maximum 1024-pixel longest side.
- The price includes 1–60 steps, automatic clothing detection or an uploaded mask, and optional LoRAs.
- Credits are reserved before submission. Failed jobs refund the reserved credits.
About Freja Inpaint
Freja Inpaint uses Fooocus inpaint v2.6 to replace selected image regions. Upload a mask for precise control or use automatic clothing detection. Compatible SDXL LoRAs can guide the edit.
- The public API requires a nonblank prompt up to 2,000 characters; negative_prompt also accepts up to 2,000 characters. These are Deepixels product limits, not native Fooocus context limits.
- Supply exactly one target and at most one mask. Without a mask, detect_cloth must be true.
- An uploaded mask must match the target after image orientation: white repaints, black preserves. Alpha is not treated as a mask; empty masks fail.
- Target and mask resize together to at most 1024 pixels on the longest side, without upscaling. Fooocus blends boundaries; preserved regions are not a pixel-exact guarantee.
- Automatic clothing segmentation may miss areas or include nearby objects. Expansion grows the mask but does not guarantee coverage.
- One PNG per job. No output-count, resolution, video or audio controls. Standard public inputs exclude legacy delivery options and storage credentials.
- Results expire after 24 hours unless saved to private 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
Prompt limit: 2,000 characters. Longer prompts are rejected with HTTP 400 before a job is created or credits are reserved.
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/inpaint"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
promptDescribe what should appear inside the edited region. The public API requires a nonblank prompt, up to 2,000 characters (Deepixels product limit). Keep the edit description focused.
Minimum length: 1 character · Maximum length: 2,000 characters
Example: "A tailored cobalt-blue jacket over a white blouse, realistic fabric folds and natural lighting. Keep the person's face, hair, pose and background unchanged."
negative_promptOptional details to avoid inside the edited region. Up to 2,000 characters (Deepixels product limit).
API default: ""
Maximum length: 2,000 characters
imagesExactly one target, optionally one mask. White mask areas repaint; black preserves. A supplied mask skips automatic detection and expansion. Still PNG/JPEG/WebP, at most 30 MiB/64 MP; matching oriented target/mask dimensions. Playground uploads use 10 MiB/12 MP.
Minimum items: 1 · Maximum items: 2
Example: [{"role":"target","url":"https://r2.deepixels.co/explore/freja/h3-image/examples/9ca91ff7-9fa6-44a8-9eae-a3be4f2ac97a/inputs/character-reference-v1.png"}]
parametersOptional controls. Omitted values use the API defaults shown below.
API default: {}
Example: {"detect_cloth":true,"detect_expansion":10,"steps":30,"guidance_scale":4,"strength":1,"seed":42,"loras":[]}
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/inpaint",
"status": "completed",
"input": {
"prompt": "A tailored cobalt-blue jacket over a white blouse, realistic fabric folds and natural lighting. Keep the person's face, hair, pose and background unchanged.",
"images": [
{
"role": "target",
"url": "https://r2.deepixels.co/explore/freja/h3-image/examples/9ca91ff7-9fa6-44a8-9eae-a3be4f2ac97a/inputs/character-reference-v1.png"
}
],
"parameters": {
"detect_cloth": true,
"detect_expansion": 10,
"steps": 30,
"guidance_scale": 4,
"strength": 1,
"seed": 42,
"loras": []
}
},
"webhook": null,
"output": {
"imageUrl": [
"https://r2.deepixels.co/results/example-result.png"
]
},
"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/inpaint"
cursorThe next_cursor returned by the previous page. Omit it for the newest requests.
curl "https://api.deepixels.co/v1/model-requests?model=freja%2Finpaint" -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
- The public API requires a nonblank prompt up to 2,000 characters; negative_prompt also accepts up to 2,000 characters. These are Deepixels product limits, not native Fooocus context limits.
- Supply exactly one target and at most one mask. Without a mask, detect_cloth must be true.
- An uploaded mask must match the target after image orientation: white repaints, black preserves. Alpha is not treated as a mask; empty masks fail.
- Target and mask resize together to at most 1024 pixels on the longest side, without upscaling. Fooocus blends boundaries; preserved regions are not a pixel-exact guarantee.
- Automatic clothing segmentation may miss areas or include nearby objects. Expansion grows the mask but does not guarantee coverage.
- One PNG per job. No output-count, resolution, video or audio controls. Standard public inputs exclude legacy delivery options and storage credentials.
- Results expire after 24 hours unless saved to private 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.
Yellow armchair to emerald lounge chair
A sculptural emerald-green velvet lounge chair with a rounded shell back and polished brass pedestal base. Photorealistic upholstery, natural proportions, matching the room’s perspective and warm sunlight, with realistic contact shadows on the rug. Preserve the surrounding room, table, plant and windows.
Automatic clothing detection — cobalt-blue blazer
A tailored cobalt-blue wool blazer with crisp lapels, realistic seams, natural fabric folds and elegant gold buttons, worn over a clean ivory crew-neck shirt, paired with fitted charcoal tailored trousers. Fully clothed editorial fashion photography. Match the original pose, body proportions, lighting and perspective. Preserve the woman's face, hair, hands and the sunlit stone courtyard background.