---
title: "Diff two renders synchronously and return the diff image inline."
method: POST
path: "/v1/dashboards/{id}/diffs/inline"
tags: ["diffs"]
---

# Diff two renders synchronously and return the diff image inline.

`POST /v1/dashboards/{id}/diffs/inline`

## Request

- Base URL: `http://localhost:8080`
- URL: `http://localhost:8080/v1/dashboards/{id}/diffs/inline`
- Auth: one of:
  - API key in cookie `dvt_session`
  - HTTP bearer

Computes the pixel diff and returns the **diff PNG bytes directly in the response body** —
no object storage, no polling. The agent critique/iterate path: a caller gets the diff
image back to analyze immediately. The changed-pixel metrics ride back in the
`X-Dvt-Diff-Pixels` and `X-Dvt-Diff-Total` response headers. Same auth + tenancy +
per-org diff budget + validity rules as `createDiff`. Returns **503** problem type
`diff-unavailable` while no render service is configured.

## Request body

- CreateDiffRequest: The two renders to compare. Both must be SUCCEEDED renders of this dashboard that share width, height, and format (pixelmatch requires equal dimensions). They must differ.
  - `baseRenderId` string, uuid, required: The "before" render (the baseline).
  - `headRenderId` string, uuid, required: The "after" render (compared against the baseline).

## Response `200`

The diff image bytes (changed-pixel counts in X-Dvt-Diff-* headers).

## Other responses

- `400`: Malformed request.
- `401`: Missing, invalid, or expired session.
- `404`: Resource does not exist.
- `422`: Problem type `diff-input-invalid` — the two renders aren't a valid diff pair.
- `429`: Per-org hourly diff budget exhausted (`rate-limited`, title "Too Many Diffs"): a fixed 60 diffs/hour per org in every edition (`server/internal/api/diffs.go` `diffRateLimit`); it is NOT governed by `RENDER_RATE_LIMIT`. The budget 429 carries no `Retry-After` header (the separate per-actor `RateLimitDefault` 429 does).
- `502`: The render service failed to produce the diff.
- `503`: Problem type `diff-unavailable` — no render service is configured.

---

[API](https://skmtc.dev/dvt/apis/dvt-rest-api.md) · [All operations](https://skmtc.dev/dvt/apis/dvt-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dvt/apis/dvt-rest-api/revisions/00016f504165?raw)
