# Expand AI

```
POST /v2/generate
```

**Parameters**

<table><thead><tr><th width="174">Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>model</td><td>string</td><td><p><strong>Required</strong></p><p>Value must be <strong><code>expand</code></strong> for Expand AI. Browse other <a href=""><strong>Generators</strong></a>.</p></td></tr><tr><td>image</td><td>string</td><td><p><em>Optional</em></p><p>URL of the input image. Encode your image url if url have special characters.</p></td></tr><tr><td>precise</td><td>integer</td><td><p><em>Optional</em></p><p>Higher numbers results more realistic results, lower numbers generates more creative. <a href="../knowledge/precision-levels">Learn more</a></p></td></tr><tr><td>pid</td><td>integer</td><td><p><em>Optional</em></p><p>Persona ID to use if you want to use <a href="../personas/persona-slots">Persona Slots</a> for images.</p></td></tr><tr><td>format</td><td>string</td><td><p><em>Optional</em></p><p>Output format values: <code>jpg</code>, <code>png</code> or <code>webp</code></p></td></tr><tr><td>processing_url</td><td>string</td><td><p>O<em>ptional</em></p><p>Get process results with same endpoint, alternative to <a href="../introduction/get-process-results"><strong><code>/results</code></strong></a> endpoint usage.</p></td></tr><tr><td>webhook</td><td>string</td><td><p><em>Optional</em></p><p>Get process results with real-time <a href="../introduction/webhooks">webhooks</a>, alternative to <a href="../introduction/get-process-results"><strong><code>/results</code></strong></a> endpoint usage.</p></td></tr></tbody></table>

**Curl Example**

```bash
curl -X POST https://api.luw.ai/v2/generate \
  -H "Authorization: Bearer LUW_API_TOKEN" \
  -d "model=expand" \
  -d "image=https://example.com/room.jpg"
```

**Response Example**

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

## ✨ Get results using the [**`/results`**](https://luw-ai.gitbook.io/api/luw.ai-api-documentation/introduction/get-process-results) endpoint.

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