Skip to content
Last updated

🔨 In Development — This section is still being developed and may change.
POSThttps://api.freddy.aitronos.com/v1/images/replace-background

Swap image backgrounds for new scenes, patterns, or solid fills using Freddy vision models.

Authentication

Request body

FieldTypeRequiredDescription
image_urlstringYesPublic URL or base64-encoded data for the source image.
new_backgroundstringYesDescription, image URL, or color code for the replacement background.
formatstringNoOutput format: png, jpeg, or webp. Default: png.
blend_modestringNoForeground blending strategy. Choose natural, overlay, or multiply. Default: natural.

Returns

JSON object containing processed images with new backgrounds and related metadata.

{
  "data": [
    {
      "url": "https://api.freddy.aitronos.com/processed-images/img_abc123.png",
      "foreground_mask": "https://api.freddy.aitronos.com/masks/mask_abc123.png",
      "background_replaced": true
    }
  ]
}
curl -X POST "https://api.freddy.aitronos.com/v1/images/replace-background" \
  -H "Authorization: Bearer $FREDDY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image_url": "https://example.com/product.jpg",
    "new_background": "modern office environment",
    "format": "png",
    "blend_mode": "natural"
  }'