---
title: "Image links for a version"
method: GET
path: "/v1/diagrams/{id}/render"
tags: ["Diagrams"]
---

# Image links for a version

`GET /v1/diagrams/{id}/render`

## Request

- Base URL: `https://api.zindex.ai`
- URL: `https://api.zindex.ai/v1/diagrams/{id}/render`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

SVG and PNG links to one version's images, as the MCP tool diagram_render returns, that work without a key. A published diagram's are its permanent version links: url is the version's page, https://zindex.ai/d/{id}@{revision}, and svg and png are that page with .svg or .png. Any other diagram's are signed and work for 7 days, until expires. revision or asOf picks the version; default the latest.

## Path parameters

- `id` string, required

## Query parameters

- `revision` integer
- `asOf` string

## Response `200`

The version's links, hashes and engine. A version whose image wasn't stored when it was saved gets it now, and its chain hash with it.

- object
  - `id` string, required
  - `revision` integer, required
  - `hash` string, required: The version's content hash, sha256:<hex>
  - `chain` string, nullable, required: The version's chain hash, sha256:<hex>
  - `engine` string, required: The build that drew the stored image
  - `url` string, uri: Published diagrams only: the version's page
  - `svg` string, uri, required
  - `png` string, uri, required
  - `expires` string, date-time: Signed links only: when they stop working

## Other responses

- `400`: INVALID_REQUEST: a bad revision or asOf, or both given
- `401`: Missing or invalid API key. Response includes a `code` field that distinguishes the failure mode so clients (dashboard, MCP server) can render actionable copy: `AUTH_REQUIRED` (no key or session was sent), `API_KEY_INVALID` (key not found), `API_KEY_REVOKED` (key was revoked, or its person is no longer in its workspace), `API_KEY_EXPIRED` (key passed its expires_at), and for the site's session cookie `SESSION_EXPIRED` (past its 24 hours), `SESSION_REVOKED` (the account's sessions were ended, for example by a password reset) and `SESSION_INVALID` (not a session this server signed).
- `403`: LIMIT_REACHED: the workspace's monthly renders are used up
- `404`: NOT_FOUND or NO_REVISION_AS_OF
- `422`: DRAW_TIMEOUT: drawing a version that had no kept image took longer than the drawing budget (20 s), or needed more memory than it allows
- `429`: RATE_LIMITED: over the request rate limit (see Rate Limiting). Wait retryAfter seconds (also the Retry-After header), then try again.
- `503`: BUSY: every drawing worker is busy and the queue is full. Wait retryAfter seconds (also the Retry-After header): half the budget of the drawing refused. Then try again.

---

[API](https://skmtc.dev/zindex/apis/zindex-api.md) · [All operations](https://skmtc.dev/zindex/apis/zindex-api/llms.txt) · [OpenAPI document](https://skmtc.dev/zindex/apis/zindex-api/revisions/1d21bd5bbf8e?raw)
