# Read one picture of the library as a PNG

> Page: https://docs.plotwork.dev/api/get-v1-library-id-png. Index of every page: https://docs.plotwork.dev/llms.txt

The picture {id}.svg answers, painted as a PNG width pixels wide (1600 when left out) on the paper of its scheme, for places that take no SVG.

`GET /v1/library/{id}.png`

## TL;DR

| Question | Answer |
|---|---|
| What does it do? | Read one picture of the library as a PNG. |
| What does it take? | `id` in the path, and `width`, `scheme` in the query string. |
| What does it return? | Status 200 with no body. |
| What can go wrong? | `304` the picture has not changed; `400` the width or the scheme is not valid; `401` no key, or the key or token is not valid; `403` the token's grant does not hold library:read (oauth.insufficient_scope); `404` no such diagram the caller can see; `422` the picture is too big to paint (raster.too_large); `429` too many requests, or the daily limit is used up; `503` painting pictures is not available on this server (raster.unavailable). Every failure uses the one error envelope. |

## What it does

The picture {id}.svg answers, painted as a PNG width pixels wide (1600 when left out) on the paper of its scheme, for places that take no SVG. Painted for each call and never kept, with a strong ETag; If-None-Match answers 304. An app's token needs library:read.

## Path parameters

| Field | Type | Required | Description |
|---|---|---|---|
| `id` | `string` | yes |  |

## Query parameters

| Field | Type | Required | Description |
|---|---|---|---|
| `width` | `integer` | no | The width in pixels, 64 to 4000. 1600 when left out. Lowered to keep the picture under 25 megapixels. |
| `scheme` | `"light" \| "dark"` | no | For a picture that follows the reader's color scheme, the one to paint. A light or dark picture is painted as it was drawn. light when left out. |

## Responses

| Status | Meaning | Body |
|---|---|---|
| 200 | The PNG. | none |
| 304 | The picture has not changed. | none |
| 400 | The width or the scheme is not valid. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 401 | No key, or the key or token is not valid. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 403 | The token's grant does not hold library:read (oauth.insufficient_scope). | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 404 | No such diagram the caller can see. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 422 | The picture is too big to paint (raster.too_large). | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 429 | Too many requests, or the daily limit is used up. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 503 | Painting pictures is not available on this server (raster.unavailable). | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |

## See also

| Doc | Why |
|---|---|
| [API reference](https://docs.plotwork.dev/api/reference.md) | Every endpoint, and the error envelope |
| [Schemas](https://docs.plotwork.dev/api/schemas.md) | Every request and response type |
| [Tool reference](https://docs.plotwork.dev/mcp/tools.md) | The operations as callable tools |
