recraft_replace_background
Swap an image background to a new AI-generated scene described by a prompt, while keeping the original subject intact.
Instructions
Replace the background of an image with AI-generated content. Keeps the subject, changes the scene. V3/V3 Vector only.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file_path": "<file_path>",
"prompt": "<prompt>"
},
"name": "recraft_replace_background"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | Number of images to generate (1-6) | |
| model | No | Model (V3 only) | recraftv3 |
| style | No | Style name | |
| prompt | Yes | Description of the new background | |
| controls | No | Generation controls | |
| style_id | No | Custom style UUID | |
| file_path | Yes | Local path to source image | |
| text_layout | No | Text placement on image | |
| negative_prompt | No | What to exclude | |
| response_format | No | Response format | url |