> ## Documentation Index
> Fetch the complete documentation index at: https://docs.skayle.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Media

> Retrieve a single media resource by media ID.

## Endpoint

```bash theme={null}
GET /media/:id
```

## ID format

Supported IDs:

* `post-{postId}`
* `author-{authorId}`

Examples:

* `post-post_01HZX2...`
* `author-author_01HZ...`

## Query parameters

| Parameter | Type   | Description                            |
| --------- | ------ | -------------------------------------- |
| `_fields` | string | Comma-separated attribute field filter |

## Example request

```bash theme={null}
curl "https://api.skayle.ai/v1/ORG_ID/media/post-post_01HZX2..."
```

## Example response

```json theme={null}
{
  "data": {
    "id": "post-post_01HZX2...",
    "type": "media",
    "attributes": {
      "source": "post",
      "source_id": "post_01HZX2...",
      "url": "https://cdn.example.com/images/hero-1.jpg",
      "type": "image",
      "title": "B2B SaaS Content Strategy for 2026",
      "description": "Editorial hero composition",
      "aspect_ratio": "16:9",
      "created_at": "2026-02-01T09:20:11.000Z"
    },
    "links": {
      "self": "/v1/ORG_ID/media/post-post_01HZX2..."
    }
  }
}
```

## Error responses

### Invalid media ID format

```json theme={null}
{
  "errors": [
    {
      "status": "400",
      "title": "Bad Request",
      "detail": "Invalid media ID format"
    }
  ]
}
```

### Media not found

```json theme={null}
{
  "errors": [
    {
      "status": "404",
      "title": "Not Found",
      "detail": "Media with id \"post-missing\" not found"
    }
  ]
}
```

## Response field descriptions

| Field                          | Type           | Description             |
| ------------------------------ | -------------- | ----------------------- |
| `data.id`                      | string         | Media ID                |
| `data.type`                    | string         | Resource type (`media`) |
| `data.attributes.source`       | string         | `post` or `author`      |
| `data.attributes.source_id`    | string         | Related post/author ID  |
| `data.attributes.url`          | string         | Media URL               |
| `data.attributes.type`         | string         | Media type (`image`)    |
| `data.attributes.title`        | string \| null | Title                   |
| `data.attributes.description`  | string \| null | Description             |
| `data.attributes.aspect_ratio` | string \| null | Aspect ratio            |
| `data.attributes.palette`      | object \| null | Palette metadata        |
| `data.attributes.created_at`   | string         | ISO datetime            |

## Notes

* Media IDs are not slug-based.
* Single media fetch expects exact media ID format.
