Luw.ai API
  • Luw.ai API Documentation
    • Introduction
      • Getting Started
      • API Reference
      • Authentication
      • Error Handling
      • Rate Limit and Quotas
      • Get Process Results
      • Uploading Files
    • Generators
      • Interior AI
      • Exterior AI
      • Sketch AI
      • Magic Prompt AI
      • Mood Board AI
      • Magic Wand AI
      • Enhance AI
      • Remove Furniture AI
      • Segment AI
      • ArchiGPT
      • Motion AI
      • Video AI
      • Fluw AI
      • Fluw Vector AI
      • 3DGen AI
      • Pattern AI
      • Change Background AI
    • Knowledge
      • Design Styles
      • Video Styles
      • Interior Types
      • Exterior Types
      • Mood Board Types
      • Magic Wand Materials
      • What is Mask Image?
      • Precision Levels
    • Personas
      • Persona Endpoints
      • Training Endpoints
      • Like a Design
      • Persona Slots
    • Projects API
Powered by GitBook
On this page
  • ✨ Get results using the /results endpoint.
  • Special Parameters
  • Remove Furniture
  • Material Swap
  1. Luw.ai API Documentation
  2. Generators

Magic Wand AI

Remove, add, or replace objects and generate the new fill with a prompt. If you want to remove object rather than adding new one, with Magic Wand endpoint, you can use special parameters on prompt.

PreviousMood Board AINextEnhance AI

Last updated 1 month ago

Note: Also, please check out for and parameters.

POST /v2/generate

Parameters

Name
Type
Description

model

string

Required

image

string

Optional

URL of the input image. Encode your image url if url have special characters.

mask_image

string

Required

prompt

string

Optional

Description of desired design. You can use special parameters.

material_image

string

Optional

Material reference image to fill mask area with material. Leave empty for Prompt design or Removing objects.

remove

string

Optional Use true value to

pid

integer

Optional

seed

integer

Optional

For reproducible results

enhance_prompt

string

Optional

If you want to use Prompt Enhance model, use true value. If you want to continue without Prompt Enhancer don't add enhance_prompt parameter to your requests.

format

string

Optional

Output format values: jpg, png or webp

processing_url

string

Optional

Curl Example

curl -X POST https://api.luw.ai/v2/generate \
  -H "Authorization: Bearer LUW_API_TOKEN" \
  -d "model=magicwand" \
  -d "mask_image=https://example.com/roommask.jpg" \
  -d "prompt=Modern minimalist living room" \
  -d "image=https://example.com/room.jpg"

Response Example

{
  "status": true,
  "progress": {
    "started_at": "2024-01-04T12:00:00Z",
    "state": "processing",
    "percent": 45
  },
  "processing": true,
  "processing_url": "abc_123..."
}

Alternative legacy method: Add &processing_url={url} to your request.

Special Parameters

Remove Furniture

To switch Remove Object mode, you can simply add remove parameter with true value like this example:

?remove=true

Curl Example

curl -X POST https://api.luw.ai/v2/generate \
  -H "Authorization: Bearer LUW_API_TOKEN" \
  -d "model=magicwand" \
  -d "image=https://example.com/room.jpg" \
  -d "mask_image=https://example.com/roommask.jpg" \
  -d "remove=true"

Material Swap

To switch Material Swap mode, you can simply add material_image parameter with image url like this example:

curl -X POST https://api.luw.ai/v2/generate \
  -H "Authorization: Bearer LUW_API_TOKEN" \
  -d "model=magicwand" \
  -d "image=https://example.com/room.jpg" \
  -d "mask_image=https://example.com/roommask.jpg" \
  -d "material_image=https://example.com/material.jpg"

Value must be magicwand for Magic Wand AI. Browse other .

URL of the mask image. about mask images. Encode your image url if url have special characters.

Persona ID to use if you want to use for images.

Get process results with same endpoint, alternative to endpoint usage.

✨ Get results using the endpoint.

You can execute special actions like Remove Furniture, Remove Object or remove anything selected with mask_image parameter, check section for better results.

You can execute special actions like Swap Materials with material_image parameter, it will change you provided, with the material image you provided.

/results
Mask Image
Mask Image
Remove Object
Change Material
Generators
Learn more
Persona Slots
/results