# 2.2 Hyper Art

**Method:** `POST`

```
https://sdk.hypergpt.ai/hyperArt
```

**Headers:**

<table data-header-hidden><thead><tr><th width="343">Key</th><th>Value</th></tr></thead><tbody><tr><td>Bearer Token</td><td>new_user_token</td></tr></tbody></table>

**Data :**&#x20;

* **samples** (int): The number of image samples to generate.
* **query** (str): The text query used to guide the image generation.
* **step** (int): The number of steps for the image generation process.

**Files** :

**file** (UploadFile):  The image file to be used as the base for generation.

**Return Value:**

* **result** (list or dict): The generated images or an error message if an exception occurs.

**Example Request:**

```python
headers = {
    "Authorization": bearer_token
}

data = {
    "query": query,
    "samples": samples,
    "step": step
}

files = {
    "file": (file.filename, file.file, file.content_type)
}

response = requests.post(
    "https://whale-app-2-ojzej.ondigitalocean.app/hyperArt",
    headers=headers,
    data=data,
    files=files 
)

return response.json()
```

**Example Response (Success):**

```json
{
  "datam": [
    "https://example.com/image1.png"
  ]
}
```

**Example Response (File Upload Error):**

```json
{
    "message": "There was an error uploading the file"
}
```

**Example Response (Error):**

```json
{
    "detail": "Credit not enough"
}
```
