> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.reka.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.reka.ai/_mcp/server.

# Image Management

> Upload, retrieve, list, and delete images

> **Info**
>
> For chat over text, images and short videos, use the OpenAI-compatible [Chat Completions API](/chat/overview).

These endpoints manage the images in your account. You can upload images for indexing, retrieve image details, list images with filters, and delete images you no longer need.
Video search fits use cases that need video context. For most simple use cases, image upload and search is about as accurate as video search, with faster processing and lower cost.

## Upload images

Upload one or more images to your account with optional indexing.

### Endpoint

* `POST /v1/images/upload`

### Request

#### Bash

```bash
curl -X POST https://vision-agent.api.reka.ai/v1/images/upload \
  -H "X-Api-Key: YOUR_API_KEY" \
  -F "images=@/path/to/image1.jpg" \
  -F "images=@/path/to/image2.jpg" \
  -F 'metadata={"requests":[{"indexing_config":{"index":true},"metadata":{}},{"indexing_config":{"index":true},"metadata":{}}]}'
```

#### Python

```python
import requests
import json
import io

url = f"{BASE_URL}/v1/images/upload"
headers = {
    "X-Api-Key": REKA_API_KEY
}
images = [get_image() for _ in range(10)]
metadata = {
    "requests": [
        {
            "indexing_config": {"index": True},
            "metadata": {}
        } for i in range(len(images))
    ]
}

# Prepare files and data
files = []
for i, image in enumerate(images):
    file_obj = io.BytesIO(image)
    files.append(
        ('images', (f'test_image_{i}.jpg', file_obj, 'image/jpeg'))
    )
data = {'metadata': json.dumps(metadata)}

# Make request
response = requests.post(
    url,
    files=files,
    data=data,
)
if response.status_code == 200:
    result = response.json()
    print("Upload successful:", result)
else:
    raise ValueError(
      "Error:", response.status_code, response.text
    )
```

### Parameters

* **`images`** (required): Image file(s) to upload
* **`metadata`** (optional): JSON object containing configuration for each image:
  * **`indexing_config`**: Configuration for indexing
    * **`index`**: Boolean indicating whether to index the image
  * **`metadata`**: Custom metadata for the image

### Response

Returns an array of image upload results with:

* **`image_id`**: Unique identifier for the uploaded image
* **`image_url`**: URL to access the uploaded image
* **`indexing_status`**: Indexing status (1 = indexing in progress, 2 = indexed)
* **`image_metadata`**: Custom metadata fields for the image
* **`upload_timestamp`**: Unix timestamp of when the image was uploaded

## Get image

Retrieve details for a specific image by its ID.

### Endpoint

* `GET /v1/images/{image_id}`

### Request

#### Bash

```bash
curl -X GET https://vision-agent.api.reka.ai/v1/images/550e8400-e29b-41d4-a716-446655440000 \
  -H "X-Api-Key: YOUR_API_KEY"
```

#### Python

```python
import requests

image_id = "550e8400-e29b-41d4-a716-446655440000"
url = f"{BASE_URL}/v1/images/{image_id}"
headers = {
    "X-Api-Key": REKA_API_KEY
}
response = requests.get(url, headers=headers)
```

### Parameters

* **`image_id`** (required, path): The unique identifier of the image to retrieve

### Response

Returns the image object with the same structure as the upload response.

## List images

List images in your account with optional pagination.

### Endpoint

* `GET /v1/images`

### Request

#### Bash

```bash
curl -X GET "https://vision-agent.api.reka.ai/v1/images?limit=20&offset=0" \
  -H "X-Api-Key: YOUR_API_KEY"
```

#### Python

```python
import requests

url = f"{BASE_URL}/v1/images"
params = {
    "limit": 20,
    "offset": 0,
}
headers = {
    "X-Api-Key": REKA_API_KEY
}
response = requests.get(url, params=params, headers=headers)
```

### Parameters

* **`limit`** (optional, query): Maximum number of images to return
* **`offset`** (optional, query): Number of images to skip for pagination

### Response

Returns a paginated array of images with the same structure as the upload and get responses.

## Delete image

Delete an image from your account.

### Endpoint

* `DELETE /v1/images/{image_id}`

### Request

#### Bash

```bash
curl -X DELETE https://vision-agent.api.reka.ai/v1/images/550e8400-e29b-41d4-a716-446655440000 \
  -H "X-Api-Key: YOUR_API_KEY"
```

#### Python

```python
import requests

image_id = "550e8400-e29b-41d4-a716-446655440000"
url = f"{BASE_URL}/v1/images/{image_id}"
headers = {
    "X-Api-Key": REKA_API_KEY
}
response = requests.delete(url, headers=headers)
if response.status_code == 200:
    result = response.json()
    print("Delete successful:", result)
else:
    raise ValueError("Error:", response.status_code, response.text)
```

### Parameters

* **`image_id`** (required, path): The unique identifier of the image to delete

### Response

Returns a message confirming the deletion.