# Get a generation

> Fetch one generation result by the id the listing returns.

Canonical page: https://www.rundiffusion.com/docs/api/library/get
Endpoint: GET /api/v2/library/{item_id}
Authorization: OAuth device flow or Personal API Access Token or Company API Access Token

---

One library item, when you already hold its `id` from
[List generations](/docs/api/library/list). The same rules apply as on a page:
renderable media only, and the URLs are signed with a 7-day TTL, so re-fetch
rather than storing one.

`GET /api/v2/library/{item_id}`

Authorization: OAuth device flow or Personal API Access Token or Company API Access Token

## Request

**Headers**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Authorization` | string | Yes | Bearer token. This endpoint accepts an OAuth device flow token, a Personal API Access Token, or a Company API Access Token. See [Authentication](/docs/api/authentication). |

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `item_id` | string | Yes | The item id from the [listing](/docs/api/library/list): run_id and result_id joined by a colon. Pass it whole, exactly as returned. The first half is a 20-character id, the second a dashed UUID. |

cURL:

```bash
curl https://api2.rundiffusion.com/api/v2/library/$ITEM_ID \
  -H "Authorization: Bearer $RUNDIFFUSION_TOKEN"
```

JavaScript:

```javascript
const item = await fetch(
  `https://api2.rundiffusion.com/api/v2/library/${itemId}`,
  { headers: { Authorization: `Bearer ${process.env.RUNDIFFUSION_TOKEN}` } },
).then(r => r.json());
```

Python:

```python
item = requests.get(
    f"{BASE}/library/{item_id}",
    headers=HEADERS,
).json()
```

## Response

`200 OK` with one item, in exactly the shape
the [Generation object](/docs/api/library/list#generation-object) the listing
returns, so a client that parses pages parses this for free.

```json
{
  "id": "Rn8qWm…:0b6a1f6e-93cf-…",
  "run_id": "Rn8qWm…",
  "result_id": "0b6a1f6e-93cf-…",
  "type": "IMAGE",
  "url": "https://storage.googleapis.com/…",
  "thumb_url": "https://storage.googleapis.com/…",
  "mime_type": "image/png",
  "width": 1024,
  "height": 1024,
  "duration_seconds": null,
  "size_bytes": 1284211,
  "created": "2026-08-01T09:14:00+00:00",
  "tool_id": "Tl9xBv…"
}
```

This fetch reads your own generations: on a team account it is pinned to yours,
and reading other members' work is the listing's `scope=all` question, gated by
the same permission there.

## Errors

**Status codes**

| Name | Type | Description |
| --- | --- | --- |
| `401` | TOKEN_INVALID | Missing or invalid credential. |
| `404` | LIBRARY_ITEM_NOT_FOUND | No such item, or not one this credential can see. A malformed id, somebody else's item, and a withheld result type all read the same, deliberately: an id must not be probeable for whether it exists. |
| `429` | RATE_LIMITED | Too many requests. See [Rate limits](/docs/api/rate-limits#library). |
