Source: https://dinakar-rewind.docs.pageloop.ai/api-reference/images/getimage

# Get image by entity

GET `https://api.rewind.rest/v1/images/{domain}/{entity_type}/{entity_id}/{size}`

Serve image via CDN redirect. Triggers the image pipeline on cache miss. Returns a 302 redirect to the CDN URL with metadata in response headers.

## Authorization

#### Authorization (header, string, required)

API key. Read keys (rw\_live\_...) access GET endpoints. Admin keys (rw\_admin\_...) access all endpoints.

## Path Parameters

#### domain (path, enum (string), required) — allowed: listening, watching, collecting, reading

#### entity\_type (path, enum (string), required) — allowed: albums, artists, movies, shows, releases, articles

#### entity\_id (path, string, required)

#### size (path, enum (string), required) — allowed: thumbnail, small, medium, poster-sm, large, poster, poster-lg, backdrop, original

## Query Parameters

#### artist\_name (query, string)

#### album\_name (query, string)

#### mbid (query, string)

#### tmdb\_id (query, string)

## Response

#### 302

Redirect to CDN image URL. Metadata returned via X-ThumbHash, X-Dominant-Color, X-Accent-Color headers.

#### 400

Bad request

#### error (string, required)

#### status (integer, required)

#### 401

Unauthorized

#### error (string, required)

#### status (integer, required)

#### 404

Not found

#### error (string, required)

#### status (integer, required)

#### 500

Internal server error

#### error (string, required)

#### status (integer, required)

#### Request

```bash cURL
curl -X GET 'https://api.rewind.rest/v1/images/{domain}/{entity_type}/{entity_id}/{size}' \
  -H 'Authorization: Bearer <token>'
```

```javascript JavaScript
const res = await fetch('https://api.rewind.rest/v1/images/{domain}/{entity_type}/{entity_id}/{size}', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer <token>',
  },
});
const data = await res.json();
```

```python Python
import requests

res = requests.get(
    'https://api.rewind.rest/v1/images/{domain}/{entity_type}/{entity_id}/{size}',
    headers={'Authorization': 'Bearer <token>'}
)
data = res.json()
```

#### Response

```json 400
{
  "error": "Not found",
  "status": 404
}
```

```json 401
{
  "error": "Not found",
  "status": 404
}
```

```json 404
{
  "error": "Not found",
  "status": 404
}
```

```json 500
{
  "error": "Not found",
  "status": 404
}
```
