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
  • Create Training
  • List Trainings
  • Get Training
  • Update Training
  • Delete Training
  • Delete Training by Slot
  1. Luw.ai API Documentation
  2. Personas

Training Endpoints

Manage training data for personas to enhance their knowledge and capabilities.

Note: Also, please check out for Training Slots and Special Data parameters.

Create Training

POST /v2/personas/:id/trainings

Parameters

Name
Type
Description

image

string

Required URL of the training image or reference data

info

string

Optional Information or description about the training data

slot

integer

extras

text

Optional Additional metadata or training information

Curl Example

curl -X POST https://api.luw.ai/v2/personas/123/trainings \
-H "Authorization: Bearer LUW_API_TOKEN" \
-d "image=https://example.com/training.jpg" \
-d "slot=8" \
-d "info=Modern living room design"

Response Example

{
  "status": true,
  "training_id": 456
}

✨ Training slots 1-7 are reserved for system use. Use slots 8+ for custom training data.

List Trainings

GET /v2/personas/:id/trainings

Parameters

Name
Type
Description

id

integer

Required ID of the persona whose trainings to list

Curl Example

curl -X GET https://api.luw.ai/v2/personas/123/trainings \
-H "Authorization: Bearer LUW_API_TOKEN"

Response Example

{
  "status": true,
  "trainings": [
    {
      "id": 456,
      "image": "https://example.com/training.jpg",
      "slot": 8,
      "info": "Modern living room design",
      "created_at": "2024-01-04T12:00:00Z"
    }
  ]
}

Get Training

GET /v2/personas/:id/trainings/:training_id

Parameters

Name
Type
Description

id

integer

Required ID of the persona

training_id

integer

Required ID of the training to retrieve

Curl Example

curl -X GET https://api.luw.ai/v2/personas/123/trainings/456 \
-H "Authorization: Bearer LUW_API_TOKEN"

Response Example

{
  "status": true,
  "training": {
    "id": 456,
    "image": "https://example.com/training.jpg",
    "slot": 8,
    "info": "Modern living room design",
    "created_at": "2024-01-04T12:00:00Z"
  }
}

Update Training

PUT /v2/personas/:id/trainings/:training_id

Parameters

Name
Type
Description

id

integer

Required ID of the persona

training_id

integer

Required ID of the training to update

image

string

Optional New URL of the training image

info

string

Optional New information about the training

slot

integer

Optional New training slot number

extras

text

Optional New additional metadata

Curl Example

curl -X PUT https://api.luw.ai/v2/personas/123/trainings/456 \
-H "Authorization: Bearer LUW_API_TOKEN" \
-d "info=Updated modern living room design" \
-d "slot=9"

Response Example

{
  "status": true
}

Delete Training

DELETE /v2/personas/:id/trainings/:training_id

Parameters

Name
Type
Description

id

integer

Required ID of the persona

training_id

integer

Required ID of the training to delete

Curl Example

curl -X DELETE https://api.luw.ai/v2/personas/123/trainings/456 \
-H "Authorization: Bearer LUW_API_TOKEN"

Response Example

{
  "status": true
}

Delete Training by Slot

DELETE /v2/personas/:id/trainings/slot/:slot

Parameters

Name
Type
Description

id

integer

Required ID of the persona

slot

integer

Curl Example

curl -X DELETE https://api.luw.ai/v2/personas/123/trainings/slot/7 \
-H "Authorization: Bearer LUW_API_TOKEN"

Response Example

{
  "status": true
}
PreviousPersona EndpointsNextLike a Design

Last updated 4 months ago

Optional Training slot number (1-7 reserved for system)

Required of the training to delete

Learn more
Slot