# Nutrient Document Web Services API — how to use (mcp.ai)

Connect your Nutrient Document Web Services API account and use 13 tools for developer tools straight from your AI agent. Connect with your own API key. Process, convert, OCR, redact, sign, and analyze documents with Nutrient Document Web Services.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_nutrient_document_web_services_api?ms=1787291160000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `nutrient_document_web_services_api_analyze_build`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/nutrient_document_web_services_api`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/nutrient_document_web_services_api/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/nutrient_document_web_services_api/analyze/build` — Deprecated compatibility tool for the original ANALYZE_BUILD contract. Use ANALYZE_BUILD_COST for typed Build instructions.
  - body: { parts: object[], output?: object, actions?: object[] }
- `POST https://api.mcp.ai/api/nutrient_document_web_services_api/analyze/build/cost` — Estimate the credits and Processor features required by Build API instructions without executing the document job or consuming credits.
  - body: { parts: object[], output?: object, actions?: object[] }
- `POST https://api.mcp.ai/api/nutrient_document_web_services_api/build/document` — Synchronously create one document from remote files, remote HTML, new pages, and composable safe actions, returning its filename, media type, and Base64 content up to 4 MB. Use this for multi-part or 
  - body: { parts: object[], output?: object, actions?: object[], filename?: string }
- `POST https://api.mcp.ai/api/nutrient_document_web_services_api/convert/markdown/to/pdf` — Convert CommonMark or GitHub-Flavored Markdown text into a PDF using optional built-in styling, custom CSS, page layout, and syntax highlighting settings. Returns the filename, media type, and Base64 
  - body: { css?: string, layout?: object, filename?: string, markdown: string, template?: string, markdown_options?: object }
- `POST https://api.mcp.ai/api/nutrient_document_web_services_api/create/jwt/token` — Create a short-lived restricted Nutrient bearer token. This compatibility tool returns secret credential material; revoke it with REVOKE_JWT_TOKEN when it is no longer needed. Prefer the connected API
  - body: { allowed_origins?: string[], expiration_time?: integer, allowed_operations?: string[] }
- `POST https://api.mcp.ai/api/nutrient_document_web_services_api/create/pdf/from/web/page` — Render an HTML web page at a public URL, with optional page layout settings, into a PDF. Returns the filename, media type, and Base64 content up to 4 MB. This consumes Processor credits; check GET_PRO
  - body: { url: string, layout?: object, filename?: string }
- `POST https://api.mcp.ai/api/nutrient_document_web_services_api/get/account/info` — Return the connected Nutrient account's subscription type, status, and estimated remaining credits.
- `POST https://api.mcp.ai/api/nutrient_document_web_services_api/get/processor/usage` — Return the connected account's Processor subscription status and credit usage counters.
- `POST https://api.mcp.ai/api/nutrient_document_web_services_api/make/pdf/accessible` — Auto-tag a PDF at a remote URL for PDF/UA screen-reader accessibility and return the result's filename, media type, and Base64 content up to 4 MB. This consumes Processor credits; check GET_PROCESSOR_
  - body: { url: string, filename?: string, password?: string }
- `POST https://api.mcp.ai/api/nutrient_document_web_services_api/ocr/pdf` — Apply optical character recognition to a PDF at a remote URL and return a searchable PDF's filename, media type, and Base64 content up to 4 MB. This consumes Processor credits; check GET_PROCESSOR_USA
  - body: { url: string, filename?: string, languages?: string[], skip_ocr_for_searchable_documents?: boolean }
- `POST https://api.mcp.ai/api/nutrient_document_web_services_api/revoke/jwt/token` — Immediately revoke a bearer token created by CREATE_JWT_TOKEN using its ID. Use this when a generated token is no longer needed or may be compromised.
  - body: { token_id: string }
- `POST https://api.mcp.ai/api/nutrient_document_web_services_api/stage/pdf/redactions` — Find matching content in a remote PDF and return a review PDF's filename, media type, and Base64 content up to 4 MB with unapplied redaction marks. This action cannot permanently apply redactions. It 
  - body: { url: string, content: string, filename?: string, password?: string, strategy: string, strategy_options?: object }
- `POST https://api.mcp.ai/api/nutrient_document_web_services_api/watermark/pdf` — Add a positioned text or image watermark to every page of a PDF at a public URL and return the copy's filename, media type, and Base64 content up to 4 MB. This consumes Processor credits; check GET_PR
  - body: { url: string, font?: object, text?: string, image?: object, width?: number|string|object, height?: number|string|object, opacity?: number, filename?: string, rotation?: number, vertical_offset?: number|string|object, horizontal_offset?: number|string|object }

## Example prompts
- "What can I do in Nutrient Document Web Services API?"
- "Show me a summary of my Nutrient Document Web Services API account"

## More
- Page: https://mcp.ai/nutrient_document_web_services_api
- Agent spec (llms.txt): https://mcp.ai/nutrient_document_web_services_api/llms.txt
- Postman collection: https://mcp.ai/nutrient_document_web_services_api/postman.json
