> For the complete documentation index, see [llms.txt](https://luw-ai.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://luw-ai.gitbook.io/api/luw.ai-api-documentation/personas/persona-endpoints.md).

# Persona Endpoints

Persona management endpoints for CRUD operations

### Create Persona

POST /v2/personas

Create persona associated with your account.

**Parameters**

| Name       | Type    | Description                                                                                                                                                                                                                                                                                 |
| ---------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id         | integer | <p><strong>Required</strong><br>ID of the persona to update</p>                                                                                                                                                                                                                             |
| name       | string  | <p><em>Optional</em><br>New name for the persona</p>                                                                                                                                                                                                                                        |
| title      | string  | <p><em>Optional</em><br>New title or description</p>                                                                                                                                                                                                                                        |
| knows      | string  | <p><em>Optional</em><br>New comma-separated style knowledge. List of types for <a href="/api/luw.ai-api-documentation/knowledge/interior-types.md"><strong>interior</strong></a> and <a href="/api/luw.ai-api-documentation/knowledge/exterior-types.md"><strong>exterior</strong></a>.</p> |
| profession | string  | <p><em>Optional</em><br>Profession of the persona. <a href="#profession-types">L<strong>earn more</strong></a></p>                                                                                                                                                                          |

**Curl Example**

```bash
curl -X POST https://api.luw.ai/v2/personas \
-H "Authorization: Bearer LUW_API_TOKEN" \
-d "name=Alice" \
-d "knows=Modern,Minimalism"
```

**Response Example**

```json
{
  "status": true
}
```

### List Personas

GET /v2/personas

Lists all personas associated with your account.

**Curl Example**

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

**Response Example**

```json
{
  "status": true,
  "personas": [
    {
      "id": 123,
      "name": "Modern Designer",
      "title": "Professional Interior Designer",
      "knows": "Modern,Minimalist",
      "profession": "Interior"
    }
  ]
}
```

### Get Persona

GET /v2/personas/:id

**Parameters**

| Name | Type    | Description                                                       |
| ---- | ------- | ----------------------------------------------------------------- |
| id   | integer | <p><strong>Required</strong><br>ID of the persona to retrieve</p> |

**Curl Example**

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

**Response Example**

```json
{
  "status": true,
  "persona": {
    "id": 123,
    "name": "Modern Designer",
    "title": "Professional Interior Designer",
    "knows": "Modern,Minimalist",
    "profession": "Interior",
    "trainings_count": 3
  }
}
```

### Update Persona

PUT /v2/personas/:id

Updates existing persona details.

**Parameters**

| Name       | Type    | Description                                                     |
| ---------- | ------- | --------------------------------------------------------------- |
| id         | integer | <p><strong>Required</strong><br>ID of the persona to update</p> |
| name       | string  | <p><em>Optional</em><br>New name for the persona</p>            |
| title      | string  | <p><em>Optional</em><br>New title or description</p>            |
| knows      | string  | <p><em>Optional</em><br>New comma-separated style knowledge</p> |
| profession | string  | <p><em>Optional</em><br>New professional field</p>              |

**Curl Example**

```bash
curl -X PUT https://api.luw.ai/v2/personas/123 \
-H "Authorization: Bearer LUW_API_TOKEN" \
-d "knows=Modern,Minimalist,Industrial"
```

**Response Example**

```json
{
  "status": true
}
```

### Delete Persona

DELETE /v2/personas/:id

**Parameters**

| Name | Type    | Description                                                     |
| ---- | ------- | --------------------------------------------------------------- |
| id   | integer | <p><strong>Required</strong><br>ID of the persona to delete</p> |

**Curl Example**

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

**Response Example**

```json
{
  "status": true
}
```

### Profession Types

* Interior
* Exterior
* Sketch
* Video (Use it for Motion AI)
* Fluw
* 3DGen
* Render
* MagicWand
* Enhancer
* Segment
* ArchiGPT
