Recraft Remove Background API Integration
Use Recraft Remove Background through Rivya Public API v1 with model id recraft-remove-background, supported inputs, parameters, Files API rules, credits, and response examples.
recraft-remove-background
file
Required for reference modes
per_image · default=1 · ⌈total⌉
Image
FIXED
No documented prompt limit
Request contract
Send the model id at the top level. Model-specific controls belong in params.
| Key | Type | Required | Default | Description |
|---|---|---|---|---|
| model | string | Yes | recraft-remove-background | Use the recraft-remove-background API model id. |
| prompt | string | No | - | Prompt text for models that support text input. |
| params | object | No | - | Model-specific parameter object. Use the rows below for allowed keys. |
| client_request_id | string | No | - | Optional client-side id for tracing requests in your system. |
Model parameters
This model does not require additional params beyond model, prompt, and optional client_request_id.
Upload policy
Upload reference files first, then place the returned URL and duration token inside params.referenceMediaItems.
Source image: Upload exactly 1 JPG, PNG, or WebP image, up to 5 MB and 16 MP; each dimension must be 256–4096 px.
1
image
Video and audio references should carry durationToken from /api/v1/files when duration verification is required.
| kind | Max size | MIME types |
|---|---|---|
| image | 5 MB | image/jpeg, image/png, image/webp |
Minimal request
{
"model": "recraft-remove-background"
}Reference-file request
{
"model": "recraft-remove-background",
"params": {
"referenceMediaItems": [
{
"url": "https://cdn.example.com/reference-image.png",
"kind": "image",
"name": "reference-image.png",
"mimeType": "image/png"
}
]
}
}Create response
The create endpoint returns a public task id. Poll the status endpoint until the task succeeds or fails.
{
"id": "task_recraft_remove_background_example",
"status": "queued",
"model": "recraft-remove-background",
"reserved_credits": 1,
"final_credits": 0,
"settlement_status": "RESERVED",
"created_at": "2026-05-11T00:00:00.000Z",
"updated_at": "2026-05-11T00:00:00.000Z",
"result": null,
"error": null
}Common errors
validation_failed, insufficient_credits, idempotency_conflict, rate_limited, not_found
Some modes require Files API reference uploads.
