---
canonical_url: "https://docs.composio.dev/toolkits/nutrient_document_web_services_api"
markdown_url: "https://docs.composio.dev/toolkits/nutrient_document_web_services_api.md"
product: "platform"
version: null
last_updated: null
---

# Nutrient Document Web Services API

Process, convert, OCR, redact, sign, and analyze documents with Nutrient Document Web Services.

- **Category:** developer tools
- **Auth:** API_KEY
- **Composio-managed OAuth available?** N/A
- **Tools:** 13
- **Triggers:** 0
- **Slug:** `NUTRIENT_DOCUMENT_WEB_SERVICES_API`
- **Version:** 00000000_00

## Tools

### Analyze Build Request (Deprecated)

**Slug:** `NUTRIENT_DOCUMENT_WEB_SERVICES_API_ANALYZE_BUILD`

Deprecated compatibility tool for the original ANALYZE_BUILD contract. Use ANALYZE_BUILD_COST for typed Build instructions.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `parts` | array | Yes | Legacy Build parts passed through without renaming nested fields. |
| `output` | object | No | Legacy Build output settings passed through without renaming nested fields. |
| `actions` | array | No | Legacy Build actions passed through without renaming nested fields. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Analyze Build Cost

**Slug:** `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.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `parts` | array | Yes | Build parts using remote files, HTML, new pages, or Document Engine documents. Use snake_case fields such as page_count; they are converted for Nutrient. Add content_type to non-PDF file parts for accurate conversion costs. |
| `output` | string | No | Output object whose type is pdf, pdfa, pdfua, image, json-content, docx, xlsx, pptx, html, or markdown. Add format-specific fields such as conformance for PDF/A or format/pages/width/height/dpi for images. |
| `actions` | array | No | Ordered action objects whose type is applyInstantJson, applyRedactions, applyXfdf, createRedactions, flatten, ocr, rotate, or watermark. Include the fields required by that action type. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Build Document

**Slug:** `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 multi-step workflows; applied redaction and JSON-content output are not supported. This consumes Processor credits; run ANALYZE_BUILD_COST and check GET_PROCESSOR_USAGE first. Free-tier output may be watermarked.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `parts` | array | Yes | Build parts using remote files, HTML, new pages, or Document Engine documents. Use snake_case fields such as page_count; they are converted for Nutrient. |
| `output` | string | No | File output object whose type is pdf, pdfa, pdfua, image, docx, xlsx, pptx, html, or markdown. Add format-specific fields such as conformance for PDF/A, format/pages/width/height/dpi for images, or layout for HTML. |
| `actions` | array | No | Ordered action objects whose type is applyInstantJson, applyXfdf, flatten, ocr, rotate, watermark, or createRedactions. Include that action type's documented fields; applyRedactions and unknown action types are rejected. |
| `filename` | string | No | Fallback filename for the downloaded result. A filename supplied by Nutrient is preferred so its format-specific extension is preserved. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Convert Markdown to PDF

**Slug:** `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 content up to 4 MB. This consumes Processor credits; check GET_PROCESSOR_USAGE first. Free-tier output may be watermarked.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `css` | string | No | CSS appended after the selected template stylesheet. |
| `layout` | object | No | Optional generated-page size, orientation, and margins. |
| `filename` | string | No | Filename for the downloadable PDF result. |
| `markdown` | string | Yes | Markdown source to convert, up to Nutrient's 5 MB limit. |
| `template` | string ("built-in:default" | "built-in:minimal" | "built-in:corporate" | "built-in:elegant" | "built-in:executive" | "built-in:nordic" | "built-in:nordic-report" | "built-in:technical" | "built-in:elegant-presentation" | "built-in:nordic-executive" | "built-in:nordic-presentation") | No | Built-in HTML and CSS template. Custom HTML templates require the multipart API variant and are not accepted by this JSON action. |
| `markdown_options` | object | No | Optional Markdown rendering and syntax-highlighting settings. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create JWT Token

**Slug:** `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 key for normal server-side document processing.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `allowed_origins` | array | No | Browser origins allowed to use the token. Requests using an origin-restricted token must send a matching Origin header. |
| `expiration_time` | integer | No | Token lifetime in seconds. Nutrient defaults to 3600 (1 hour) and enforces its own maximum server-side. |
| `allowed_operations` | array | No | Operations the generated token may access. Omit to allow every operation available to generated JWTs. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create PDF from Web Page

**Slug:** `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_PROCESSOR_USAGE first. Free-tier output may be watermarked.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | Yes | Publicly reachable URL of the HTML page to render. |
| `layout` | object | No | Optional layout for the generated PDF pages. |
| `filename` | string | No | Filename for the downloadable PDF result. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Account Information

**Slug:** `NUTRIENT_DOCUMENT_WEB_SERVICES_API_GET_ACCOUNT_INFO`

Return the connected Nutrient account's subscription type, status, and estimated remaining credits.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Processor Usage

**Slug:** `NUTRIENT_DOCUMENT_WEB_SERVICES_API_GET_PROCESSOR_USAGE`

Return the connected account's Processor subscription status and credit usage counters.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Make PDF Accessible

**Slug:** `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_USAGE first. Free-tier output may be watermarked.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | Yes | Publicly reachable URL of the source PDF. |
| `filename` | string | No | Filename for the downloadable PDF/UA result. |
| `password` | string | No | Password for an encrypted source PDF, if required. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### OCR PDF

**Slug:** `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_USAGE first. Free-tier output may be watermarked.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | Yes | Publicly reachable URL of the source PDF. |
| `filename` | string | No | Filename for the downloadable searchable PDF. |
| `languages` | array | No | One or more OCR dictionaries from Nutrient's documented enum. Use a full name such as english or german, an ISO 639-2 code such as eng or deu, or a specialized dictionary such as chi_sim_vert or deu_frak. |
| `skip_ocr_for_searchable_documents` | boolean | No | Skip pages that already contain searchable text. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Revoke JWT Token

**Slug:** `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.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `token_id` | string | Yes | ID returned by CREATE_JWT_TOKEN for the token to revoke. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Stage PDF Redactions

**Slug:** `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 consumes Processor credits; check GET_PROCESSOR_USAGE first. Free-tier output may be watermarked.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | Yes | Publicly reachable URL of the source PDF. |
| `content` | string | Yes | Text, regular expression, word-based phrase, or documented preset name required by the selected strategy. |
| `filename` | string | No | Filename for the downloadable staged-redaction PDF. |
| `password` | string | No | Password for an encrypted source PDF, if required. |
| `strategy` | string ("text" | "regex" | "preset" | "word_based") | Yes | Rule type used to locate content for redaction. |
| `strategy_options` | object | No | Optional page range, case matching, and annotation matching settings. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Watermark PDF

**Slug:** `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_PROCESSOR_USAGE first. Free-tier output may also include Nutrient's watermark.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | Yes | Publicly reachable URL of the source PDF. |
| `font` | object | No | Optional font settings for the watermark text. |
| `text` | string | No | Text to place on every page. |
| `image` | object | No | Remote image to place on every page. |
| `width` | string | No | Watermark width in points, percent, or explicit units. |
| `height` | string | No | Watermark height in points, percent, or explicit units. |
| `opacity` | number | No | Watermark opacity from 0 (fully transparent) to 1 (fully opaque). |
| `filename` | string | No | Filename for the downloadable watermarked PDF. |
| `rotation` | number | No | Counterclockwise rotation in degrees. Nutrient defaults to 0. |
| `vertical_offset` | string | No | Offset from the top edge in points, percent, or explicit units. |
| `horizontal_offset` | string | No | Offset from the left edge in points, percent, or explicit units. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
