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
  1. Luw.ai API Documentation
  2. Generators

Segment AI

Easily get masks and corresponding information with the mask.

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.

processing_url

string

Optional

Curl Example

curl -X POST https://api.luw.ai/v2/generate \
  -H "Authorization: Bearer LUW_API_TOKEN" \
  -d "model=segment" \
  -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.

Segment AIs response will be like this (right now we do not provide score for the segmentation, in the future we are planning to add this functionality):

{ 
    "status": true, 
    "output": [ 
        { "label": "wall", "mask": "iVBORw0KGgoAAAANSUhEUg...", "score": null }, 
        { "label": "floor", "mask": "iVBORw0KGgoAAAANSUhEUg...", "score": null }, 
        { "label": "ceiling", "mask": "iVBORw0KGgoAAAANSUhEUg...", "score": null }, 
        { "label": "bed", "mask": "iVBORw0KGgoAAAANSUhEUg...", "score": null }, 
        ...
    ]
}
PreviousRemove Furniture AINextArchiGPT

Last updated 1 month ago

Value must be segment for Segment AI. Browse other .

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

✨ Get results using the endpoint.

/results
Generators
/results