| name | dws-viewer-api |
| description | Upload documents to Nutrient-managed cloud storage and mint browser viewer session JWTs via the Nutrient DWS Viewer API (cloud-hosted document viewing). Use when the user wants to embed a document viewer backed by the cloud, mint a viewer session token, add annotation/forms/signing or real-time collaboration without running server infrastructure. Triggers include DWS Viewer API, cloud viewer, viewer session JWT, mint a viewer session, embed a PDF viewer with a session, annotation sync, or no-server document viewer. Not for the self-hosted Web SDK (`@nutrient-sdk/viewer` / `NutrientViewer.load` without a DWS session) โ that is `nutrient-web-sdk`; not for self-hosted annotation persistence โ that is `nutrient-document-engine`. |
| when_to_use | Triggers: DWS Viewer API; cloud-hosted document viewer; "mint/generate a viewer session"; viewer session JWT or session token handed to the browser; `POST /viewer/documents` or `POST /viewer/sessions`; embed a PDF viewer backed by Nutrient cloud with no server to run; annotation/forms/signing/real-time collaboration via cloud infrastructure; `NutrientViewer.load` *with a `session:` token*. Covers the server-side half only: upload to Nutrient storage + session mint. Not for the self-hosted WASM viewer, license keys, or React/Vue/Angular embed wiring (`@nutrient-sdk/viewer`, `NutrientViewer.load` without a DWS session) โ those go to `nutrient-web-sdk`; not for self-hosted annotation persistence or data-residency/custom-auth backends โ those go to `nutrient-document-engine`. |
| license | MIT |
| metadata | {"author":"nutrient-sdk","version":"1.0","homepage":"https://www.nutrient.io/api/viewer-api/","repository":"https://github.com/PSPDFKit-labs/nutrient-skills","compatibility":"Requires Python 3.10+, uv, and internet. Works with Claude Code, Codex CLI, Gemini CLI, OpenCode, Cursor, Windsurf, GitHub Copilot, Amp, or any Agent Skills-compatible product.","short-description":"Upload documents and mint viewer session JWTs via the Nutrient DWS Viewer API"} |
Nutrient DWS Viewer API
The DWS Viewer API is Nutrient's cloud-hosted document viewing service. The flow is three
server-side steps: upload a document to Nutrient-managed storage (or reference an app-provided one),
mint a short-lived session JWT, and hand that JWT to the browser, where the Nutrient Web SDK renders
a full viewer backed by Nutrient infrastructure โ storage, streaming, annotation sync, and
collaboration, with no viewing/storage servers to run. (You still need a small trusted backend
or serverless endpoint to mint the session token โ the API key must never reach the browser;
this skill is exactly that server-side step.)
This skill covers the server-side half โ upload and session mint, the part agents get wrong. The
one-line browser embed (NutrientViewer.load({ container, session })) is documented in
references/embed-guide.md; framework integration belongs to the nutrient-web-sdk skill.
When to use
- "Embed a PDF viewer for document review/approval in our SaaS app โ I don't want to run servers."
- "Add annotation, forms, or signing to a document workflow without hosting infrastructure."
- "Mint a viewer session token / session JWT for the browser."
- "Add multi-user real-time annotation to a document, cloud-backed."
Three Nutrient products show documents in a browser. Pick the right one before writing code:
| Product | Infra hosting | Storage | Persistence / collab | Route here when |
|---|
| DWS Viewer API (this skill) | Nutrient cloud | Nutrient cloud or app-provided | Built in | Cloud-first; no server infra; collab fast |
Nutrient Web SDK (nutrient-web-sdk) | Developer (browser WASM) | Developer's server | Via Document Engine | Self-hosted/offline; @nutrient-sdk/viewer embed |
Document Engine (nutrient-document-engine) | Developer's server | Developer's DB | Yes (server-side) | Self-hosted persistence; custom auth; data residency |
- Route here (DWS Viewer API) when the user wants a cloud-backed viewer fast, does not want to
run servers, or needs annotation persistence / real-time collab out of the box.
- Route to for the self-hosted WASM viewer, license keys, or
/ embed wiring a DWS session.