Optimize a PDF with the Nitro PDF Services API. Choose a profile, send a POST request, and download the result synchronously or async.
Overview
This tutorial walks you through optimizing a PDF end-to-end with the Nitro PDF Services API. Optimization is a good first integration because it exercises the full request shape (auth, file upload, parameters, and result download) in a single call.The Optimize method of the Transformations endpoint restructures a PDF and applies image downsampling according to a chosen profile, producing an output tailored to a specific use case such as web viewing, printing, or archiving.This tutorial covers:
You will need an access token to authenticate your requests. Check the Getting Started guide first to obtain a client_id and client_secret and generate an access token.
A PDF to optimize
You can use any PDF file you have available. The endpoint accepts files up to 100 MB and 500 pages (up to 500 MB and 3000 pages for asynchronous requests with remote-file input).
1. Choosing an optimization profile
The params.profile field controls how the PDF is restructured and how aggressively images are downsampled. Pick the profile that matches your end use:
web — Linearizes the PDF for fast web delivery and downsamples images to screen resolution. Best for online viewing and email attachments.
print — Preserves print-resolution images and optimizes for fidelity over size. Best for high-quality printing.
archive — Converts to PDF/A, embedding all fonts and color profiles. Best for long-term storage and compliance.
minimal-file-size — Aggressively downsamples images and removes redundant data to produce the smallest possible file. Best when size reduction is the priority.
mixed-raster-content — Applies MRC compression, separating text and background layers. Best for scanned documents and pages mixing text and images.
If your goal is to shrink the file as much as possible, start with minimal-file-size.
More aggressive file size minimization will result in lower image quality for some or all images in the PDF.
2. Sending the optimize request
You send a multipart POST request and pass method=optimize together with the parameters and the input file.The request body fields are:
method: Always optimize for this operation.
params: JSON object with the optimization profile ({"profile": "minimal-file-size"}).
Binary output is only supported in synchronous mode.
4. Running asynchronously for large files
For files that take a long time to process — or to avoid keeping a long-lived HTTP connection open — switch the request to async by setting Prefer: respond-async.Request:
curl --request GET https://api.gonitro.dev/platform/jobs/<jobID>/status \ --header 'Authorization: Bearer <access_token>'
When the job’s status becomes completed, fetch the result:
curl --request GET https://api.gonitro.dev/platform/jobs/<jobID>/result \ --header 'Authorization: Bearer <access_token>'
The result payload has the same result.file.URL shape as the synchronous response.
Success!
You’ve now optimized your first PDF with the Nitro PDF Services API and covered both the synchronous and asynchronous flows.For the full list of available transformations, extractions, and conversions, explore the PDF Services API reference.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Nitro APIs","colors":{"primary":"#D93706","light":"#FCAF9D","dark":"#D93706"},"logo":{"light":"https://www.gonitro.com/hubfs/Nitro_2025/logo-dark.svg","dark":"https://www.gonitro.com/hubfs/Nitro_2025/logo-light.svg","href":"https://www.gonitro.com/automate"},"favicon":"https://mintcdn.com/go-nitro/0xUomOly-LNhxK7b/favicon.ico?fit=max\u0026auto=format\u0026n=0xUomOly-LNhxK7b\u0026q=85\u0026s=646fb37e5970115d681bdd0d81ba8515","api":{"playground":{"display":"interactive"},"examples":{"defaults":"required"}},"navbar":{"links":[{"icon":"newspaper","href":"https://www.gonitro.com/resources?type=developer_blog","label":"Blog"},{"icon":"headset","href":"https://help.gonitro.com/support","label":"Support"},{"icon":"arrow-right-to-bracket","href":"https://sso.gonitro.com/login","label":"Log In"}],"primary":{"type":"button","label":"Get API access","href":"https://sso.gonitro.com/platform-trial-signup"}},"footer":{"socials":{"instagram":"https://www.instagram.com/gonitro","youtube":"https://www.youtube.com/c/nitrosoftware","linkedin":"https://www.linkedin.com/company/go-nitro","facebook":"https://www.facebook.com/nitrosoftware"}},"seo":{"metatags":{"google-site-verification":"qdnOUtxzQiObiPkJRHptxlmvIVydZCoH1KBdB21IP8o"}},"fonts":{"heading":{"family":"DM Sans"},"body":{"family":"IBM Plex Sans"}},"integrations":{"gtm":{"tagId":"GTM-WVZNLW"}},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Home","icon":"house","href":"/"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"go-nitro","hasAudioNarration":false,"actualSubdomain":"go-nitro","customDomains":["developers.gonitro.com"],"gitSource":{"type":"github","owner":"nitro","repo":"public-api-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af5e069c24142980e6afaff","clientVersion":"0.0.4128","searchFilterCounts":[{"language":"default","tag":"API Reference","count":161},{"language":"default","tag":"Nitro PDF \u0026 Sign","count":103},{"language":"default","tag":"Nitro Sign Enterprise Verified","count":89},{"language":"default","tag":"NSEV WebPortal API","count":75},{"language":"default","tag":"Sign API","count":40},{"language":"default","tag":"PDF Services","count":37},{"language":"default","tag":"Packages","count":16},{"language":"default","tag":"Documents","count":14},{"language":"default","tag":"Transformations","count":13},{"language":"default","tag":"Guides","count":12}],"searchSettings":{"isFiltersEnabled":false}},"assistantConfig":{},"basePath":"/docs","hasChatPermissions":false,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":"html[data-current-path^=\"/nsev\"] a[href*=\"sso.gonitro.com\"],html[data-current-path^=\"/nsev\"] a[href*=\"contact-sales/early-access-automate\"]{display:none!important}"}],"page":{"pagePath":"build-nitro/optimize-pdf","slug":"/build-nitro/optimize-pdf","pageMetadata":{"title":"Optimize PDF Tutorial","description":"Optimize a PDF with the Nitro PDF Services API. Choose a profile, send a POST request, and download the result synchronously or async.","href":"/build-nitro/optimize-pdf"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Optimize a PDF with the Nitro PDF Services API. Choose a profile, send a POST request, and download the result synchronously or async.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading,Tip,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`overview`,children:`Overview`}),`\n`,_jsx(_components.p,{children:`This tutorial walks you through optimizing a PDF end-to-end with the Nitro PDF Services API. Optimization is a good first integration because it exercises the full request shape (auth, file upload, parameters, and result download) in a single call.`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.strong,{children:`Optimize`}),` method of the Transformations endpoint restructures a PDF and applies image downsampling according to a chosen profile, producing an output tailored to a specific use case such as web viewing, printing, or archiving.`]}),`\n`,_jsx(_components.p,{children:`This tutorial covers:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`#1-choosing-an-optimization-profile`,children:`Choosing an optimization profile`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`#2-sending-the-optimize-request`,children:`Sending the optimize request`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`#3-downloading-the-optimized-file`,children:`Downloading the optimized file`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`#4-running-asynchronously-for-large-files`,children:`Running asynchronously for large files`})}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`prerequisites`,children:`Prerequisites`}),`\n`,_jsx(Heading,{level:`3`,id:`authentication`,children:`Authentication`}),`\n`,_jsxs(_components.p,{children:[`You will need an access token to authenticate your requests. Check the `,_jsx(_components.a,{href:`https://developers.gonitro.com/docs/getting-started/basic-setup`,children:`Getting Started`}),` guide first to obtain a `,_jsx(_components.code,{children:`client_id`}),` and `,_jsx(_components.code,{children:`client_secret`}),` and generate an access token.`]}),`\n`,_jsx(Heading,{level:`3`,id:`a-pdf-to-optimize`,children:`A PDF to optimize`}),`\n`,_jsxs(_components.p,{children:[`You can use any PDF file you have available. The endpoint accepts files up to `,_jsx(_components.strong,{children:`100 MB`}),` and `,_jsx(_components.strong,{children:`500 pages`}),` (up to `,_jsx(_components.strong,{children:`500 MB`}),` and `,_jsx(_components.strong,{children:`3000 pages`}),` for asynchronous requests with remote-file input).`]}),`\n`,_jsx(Heading,{level:`2`,id:`1-choosing-an-optimization-profile`,children:`1. Choosing an optimization profile`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`params.profile`}),` field controls how the PDF is restructured and how aggressively images are downsampled. Pick the profile that matches your end use:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`web`}),` — Linearizes the PDF for fast web delivery and downsamples images to screen resolution. Best for online viewing and email attachments.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`print`}),` — Preserves print-resolution images and optimizes for fidelity over size. Best for high-quality printing.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`archive`}),` — Converts to PDF/A, embedding all fonts and color profiles. Best for long-term storage and compliance.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`minimal-file-size`}),` — Aggressively downsamples images and removes redundant data to produce the smallest possible file. Best when size reduction is the priority.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`mixed-raster-content`}),` — Applies MRC compression, separating text and background layers. Best for scanned documents and pages mixing text and images.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`If your goal is to shrink the file as much as possible, start with `,_jsx(_components.code,{children:`minimal-file-size`}),`.`]}),`\n`,_jsx(Warning,{children:`More aggressive file size minimization will result in lower image quality for some or all images in the PDF.`}),`\n`,_jsx(Heading,{level:`2`,id:`2-sending-the-optimize-request`,children:`2. Sending the optimize request`}),`\n`,_jsxs(_components.p,{children:[`You send a multipart POST request and pass `,_jsx(_components.code,{children:`method=optimize`}),` together with the parameters and the input file.`]}),`\n`,_jsx(_components.p,{children:`The request body fields are:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`method`}),`: Always `,_jsx(_components.code,{children:`optimize`}),` for this operation.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`params`}),`: JSON object with the optimization profile (`,_jsx(_components.code,{children:`{\"profile\": \"minimal-file-size\"}`}),`).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`file`}),`: The PDF binary to optimize.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Request:`})}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`Shell`,numberOfLines:`5`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --request`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.gonitro.dev/transformations`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Authorization: Bearer \u003caccess_token>'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --form`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'method=optimize'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --form`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'params={\"profile\":\"minimal-file-size\"}'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --form`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'file=@/path/to/your-file.pdf'`})]}),`\n`]})})})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Response example:`})}),`\n`,_jsx(_components.p,{children:`By default, the endpoint runs synchronously and responds with JSON containing a pre-signed URL to the optimized file.`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`result.file.URL`}),`: A pre-signed download URL for the optimized PDF. Valid for 15 minutes.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`result.file.contentType`}),`: Always `,_jsx(_components.code,{children:`application/pdf`}),` for optimize output.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`result.file.metadata.fileSizeBytes`}),`: Size of the optimized output.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`result.file.metadata.pageCount`}),`: Page count of the output PDF.`]}),`\n`]}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`JSON`,numberOfLines:`12`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`12`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"result\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"file\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"URL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://your-optimized-file.pdf\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"contentType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"application/pdf\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"metadata\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"fileSizeBytes\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`8543`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"pageCount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})}),`\n`,_jsx(Heading,{level:`2`,id:`3-downloading-the-optimized-file`,children:`3. Downloading the optimized file`}),`\n`,_jsxs(_components.p,{children:[`Fetch the optimized PDF from the pre-signed URL returned in `,_jsx(_components.code,{children:`result.file.URL`}),`. No authentication header is needed — the URL is already signed.`]}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`Shell`,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --output`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` optimized.pdf`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"\u003cresult.file.URL>\"`})]}),`\n`]})})})}),`\n`,_jsx(Tip,{children:`The pre-signed URL expires 15 minutes after the response is issued. Download the file (or copy it to your own storage) before then.`}),`\n`,_jsx(Heading,{level:`3`,id:`get-the-binary-directly`,children:`Get the binary directly`}),`\n`,_jsxs(_components.p,{children:[`If you would rather skip the download step and have the response stream the optimized file back, set the `,_jsx(_components.code,{children:`Accept`}),` header to `,_jsx(_components.code,{children:`application/octet-stream`}),`:`]}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`Shell`,numberOfLines:`7`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --request`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.gonitro.dev/transformations`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Authorization: Bearer \u003caccess_token>'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Accept: application/octet-stream'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --form`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'method=optimize'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --form`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'params={\"profile\":\"minimal-file-size\"}'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --form`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'file=@/path/to/your-file.pdf'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --output`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` optimized.pdf`})]}),`\n`]})})})}),`\n`,_jsx(_components.p,{children:`Binary output is only supported in synchronous mode.`}),`\n`,_jsx(Heading,{level:`2`,id:`4-running-asynchronously-for-large-files`,children:`4. Running asynchronously for large files`}),`\n`,_jsxs(_components.p,{children:[`For files that take a long time to process — or to avoid keeping a long-lived HTTP connection open — switch the request to async by setting `,_jsx(_components.code,{children:`Prefer: respond-async`}),`.`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Request:`})}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`Shell`,numberOfLines:`6`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --request`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.gonitro.dev/transformations`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Authorization: Bearer \u003caccess_token>'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Prefer: respond-async'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --form`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'method=optimize'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --form`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'params={\"profile\":\"minimal-file-size\"}'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --form`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'file=@/path/to/your-file.pdf'`})]}),`\n`]})})})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Response example:`})}),`\n`,_jsx(_components.p,{children:`The response now contains a Job ID instead of a result. Poll the job status endpoint to check when the file is ready.`}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`JSON`,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"jobID\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"babe2aa7-9b5d-4eb2-a679-5fc12cf0a490\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"location\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.gonitro.dev/platform/jobs/babe2aa7-9b5d-4eb2-a679-5fc12cf0a490\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})}),`\n`,_jsx(Heading,{level:`3`,id:`4-1-poll-job-status`,children:`4.1 Poll job status`}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`Shell`,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --request`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` GET`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.gonitro.dev/platform/jobs/`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`jobI`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`D`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`>`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/status`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Authorization: Bearer \u003caccess_token>'`})]}),`\n`]})})})}),`\n`,_jsxs(_components.p,{children:[`When the job’s `,_jsx(_components.code,{children:`status`}),` becomes `,_jsx(_components.code,{children:`completed`}),`, fetch the result:`]}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`Shell`,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --request`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` GET`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.gonitro.dev/platform/jobs/`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`jobI`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`D`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`>`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/result`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Authorization: Bearer \u003caccess_token>'`})]}),`\n`]})})})}),`\n`,_jsxs(_components.p,{children:[`The result payload has the same `,_jsx(_components.code,{children:`result.file.URL`}),` shape as the synchronous response.`]}),`\n`,_jsx(Heading,{level:`2`,id:`success`,children:`Success!`}),`\n`,_jsx(_components.p,{children:`You’ve now optimized your first PDF with the Nitro PDF Services API and covered both the synchronous and asynchronous flows.`}),`\n`,_jsxs(_components.p,{children:[`For the full list of available transformations, extractions, and conversions, explore the `,_jsx(_components.a,{href:`/api-reference/platform/transformations/optimize`,children:`PDF Services API`}),` reference.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Optimize PDF Tutorial","description":"Optimize a PDF with the Nitro PDF Services API. Choose a profile, send a POST request, and download the result synchronously or async.","href":"/build-nitro/optimize-pdf"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Overview","slug":"overview","depth":2,"children":[]},{"title":"Prerequisites","slug":"prerequisites","depth":2,"children":[{"title":"Authentication","slug":"authentication","depth":3,"children":[]},{"title":"A PDF to optimize","slug":"a-pdf-to-optimize","depth":3,"children":[]}]},{"title":"1. Choosing an optimization profile","slug":"1-choosing-an-optimization-profile","depth":2,"children":[]},{"title":"2. Sending the optimize request","slug":"2-sending-the-optimize-request","depth":2,"children":[]},{"title":"3. Downloading the optimized file","slug":"3-downloading-the-optimized-file","depth":2,"children":[{"title":"Get the binary directly","slug":"get-the-binary-directly","depth":3,"children":[]}]},{"title":"4. Running asynchronously for large files","slug":"4-running-asynchronously-for-large-files","depth":2,"children":[{"title":"4.1 Poll job status","slug":"4-1-poll-job-status","depth":3,"children":[]}]},{"title":"Success!","slug":"success","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"go-nitro","siteName":"Nitro APIs","title":"Optimize PDF Tutorial - Nitro APIs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-28T10:51:04.948Z","originalFileLocation":"build-nitro/optimize-pdf.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Optimize a PDF with the Nitro PDF Services API. Choose a profile, send a POST request, and download the result synchronously or async.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Nitro APIs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/go-nitro/zmdJVHCbyTDP-GYA/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/go-nitro/zmdJVHCbyTDP-GYA/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/go-nitro/zmdJVHCbyTDP-GYA/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/go-nitro/zmdJVHCbyTDP-GYA/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/go-nitro/zmdJVHCbyTDP-GYA/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/go-nitro/zmdJVHCbyTDP-GYA/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/go-nitro/zmdJVHCbyTDP-GYA/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/go-nitro/zmdJVHCbyTDP-GYA/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/go-nitro/zmdJVHCbyTDP-GYA/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Optimize PDF Tutorial - Nitro APIs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Optimize a PDF with the Nitro PDF Services API. Choose a profile, send a POST request, and download the result synchronously or async.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Nitro APIs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://developers.gonitro.com/docs/build-nitro/optimize-pdf\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://go-nitro.mintlify.site/docs/_mintlify/api/og/v2?division=Guides\u0026amp;title=Optimize+PDF+Tutorial\u0026amp;description=Optimize+a+PDF+with+the+Nitro+PDF+Services+API.+Choose+a+profile%2C+send+a+POST+request%2C+and+download+the+result+synchronously+or+async.\u0026amp;theme=15424dbe3b3c699dcf498f64\u0026amp;signature=2254c4562400e976a47b2d818f91e30214686a20be0811227256880dc977b99c\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Optimize PDF Tutorial - Nitro APIs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Optimize a PDF with the Nitro PDF Services API. Choose a profile, send a POST request, and download the result synchronously or async.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://go-nitro.mintlify.site/docs/_mintlify/api/og/v2?division=Guides\u0026amp;title=Optimize+PDF+Tutorial\u0026amp;description=Optimize+a+PDF+with+the+Nitro+PDF+Services+API.+Choose+a+profile%2C+send+a+POST+request%2C+and+download+the+result+synchronously+or+async.\u0026amp;theme=15424dbe3b3c699dcf498f64\u0026amp;signature=2254c4562400e976a47b2d818f91e30214686a20be0811227256880dc977b99c\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/go-nitro/zmdJVHCbyTDP-GYA/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Nitro APIs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#D93706\">\u003cmeta data-mint-head name=\"google-site-verification\" content=\"qdnOUtxzQiObiPkJRHptxlmvIVydZCoH1KBdB21IP8o\">\u003clink data-mint-head rel=\"canonical\" href=\"https://developers.gonitro.com/docs/build-nitro/optimize-pdf\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/build-nitro/optimize-pdf.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://developers.gonitro.com/#organization\",\"name\":\"Nitro APIs\",\"url\":\"https://developers.gonitro.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://www.gonitro.com/hubfs/Nitro_2025/logo-dark.svg\"}},{\"@type\":\"WebSite\",\"@id\":\"https://developers.gonitro.com/docs#website\",\"name\":\"Nitro APIs\",\"url\":\"https://developers.gonitro.com/docs\",\"publisher\":{\"@id\":\"https://developers.gonitro.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://developers.gonitro.com/docs/build-nitro/optimize-pdf#webpage\",\"url\":\"https://developers.gonitro.com/docs/build-nitro/optimize-pdf\",\"name\":\"Optimize PDF Tutorial\",\"description\":\"Optimize a PDF with the Nitro PDF Services API. Choose a profile, send a POST request, and download the result synchronously or async.\",\"dateModified\":\"2026-08-28T10:51:04.948Z\",\"isPartOf\":{\"@id\":\"https://developers.gonitro.com/docs#website\"},\"breadcrumb\":{\"@id\":\"https://developers.gonitro.com/docs/build-nitro/optimize-pdf#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://developers.gonitro.com/docs/build-nitro/optimize-pdf#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Nitro APIs\",\"item\":\"https://developers.gonitro.com/docs\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Optimize PDF Tutorial\",\"item\":\"https://developers.gonitro.com/docs/build-nitro/optimize-pdf\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://developers.gonitro.com/docs/build-nitro/optimize-pdf#article\",\"headline\":\"Optimize PDF Tutorial\",\"name\":\"Optimize PDF Tutorial\",\"description\":\"Optimize a PDF with the Nitro PDF Services API. Choose a profile, send a POST request, and download the result synchronously or async.\",\"url\":\"https://developers.gonitro.com/docs/build-nitro/optimize-pdf\",\"mainEntityOfPage\":{\"@id\":\"https://developers.gonitro.com/docs/build-nitro/optimize-pdf#webpage\"},\"dateModified\":\"2026-08-28T10:51:04.948Z\",\"publisher\":{\"@id\":\"https://developers.gonitro.com/#organization\"},\"isPartOf\":{\"@id\":\"https://developers.gonitro.com/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Nitro APIs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Nitro APIs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/build-nitro/optimize-pdf.md","siteName":"Nitro APIs","nav":{"global":{"anchors":[{"anchor":"Home","icon":"house","href":"/"}]},"products":[{"product":"Nitro PDF \u0026 Sign","icon":"file-signature","tabs":[{"tab":"API Reference","groups":[{"group":"Start Here","icon":"rocket","pages":[{"title":"Access the Nitro APIs","href":"/getting-started/basic-setup"},{"title":"Get API Credentials","href":"/authentication/credentials"},{"title":"Generate Access Tokens","href":"/authentication/token-renew"},{"group":"Authentication API","icon":"shield","pages":[{"title":"Get Access Token","description":"The Get Access Token endpoint exchanges client credentials for an access token\nusing the OAuth 2.0 client credentials flow.\n\nThis endpoint accepts a client ID and client secret and returns an access token that\ncan be used to authenticate API requests. The token follows standard OAuth 2.0 patterns.\n","deprecated":null,"version":null,"openapi":"https://api.gonitro.dev/openapi.json post /oauth/token","href":"/api-reference/authentication/get-access-token"}]}]},{"group":"PDF Services","icon":"file-pdf","pages":[{"group":"Guides","expanded":false,"pages":[{"title":"Optimize PDF Tutorial","href":"/build-nitro/optimize-pdf"},{"title":"Callbacks","description":"Attach a callback URL to an asynchronous Nitro PDF Services job and receive a single HTTP POST when the job has been created.","href":"/build-nitro/pdf-services-callbacks"},{"title":"Bounding Box Guide","href":"/build-nitro/bounding-box"},{"title":"PDF Services Postman Collection","href":"/build-nitro/pdf-services-postman-collection"}]},{"group":"Transformations","icon":"wand-magic-sparkles","expanded":false,"pages":[{"title":"OCR","openapi":"ocr POST /transformations","href":"/api-reference/platform/transformations/ocr"},{"title":"Optimize","openapi":"optimize POST /transformations","href":"/api-reference/platform/transformations/optimize"},{"title":"Compress","openapi":"compress POST /transformations","href":"/api-reference/platform/transformations/compress"},{"title":"Watermark","openapi":"watermark POST /transformations","href":"/api-reference/platform/transformations/watermark"},{"title":"Redact","openapi":"redact POST /transformations","href":"/api-reference/platform/transformations/redact"},{"title":"Merge","openapi":"merge POST /transformations","href":"/api-reference/platform/transformations/merge"},{"title":"Split","openapi":"split POST /transformations","href":"/api-reference/platform/transformations/split"},{"title":"Flatten","openapi":"flatten POST /transformations","href":"/api-reference/platform/transformations/flatten"},{"title":"Rotate","sidebarTitle":"Rotate","openapi":"rotate POST /transformations","href":"/api-reference/platform/transformations/rotate"},{"title":"Delete Pages","openapi":"delete POST /transformations","href":"/api-reference/platform/transformations/delete"},{"title":"Protect","openapi":"protect POST /transformations","href":"/api-reference/platform/transformations/protect"},{"title":"Unprotect","openapi":"unprotect POST /transformations","href":"/api-reference/platform/transformations/unprotect"},{"title":"Set Properties","openapi":"set-properties POST /transformations","href":"/api-reference/platform/transformations/properties"}]},{"group":"Extractions","icon":"file-export","expanded":false,"pages":[{"title":"Text","openapi":"extract-text POST /extractions","href":"/api-reference/platform/extractions/text"},{"title":"Forms","openapi":"forms POST /extractions","href":"/api-reference/platform/extractions/forms"},{"title":"Extract Fillable Form Data","openapi":"extract-fillable-form-data POST /extractions","href":"/api-reference/platform/extractions/extract-fillable-form-data"},{"title":"Smart Detect Form Fields","openapi":"smart-detect-form-fields POST /extractions","href":"/api-reference/platform/extractions/smart-detect-form-fields"},{"title":"Tables","openapi":"tables POST /extractions","href":"/api-reference/platform/extractions/tables"},{"title":"PII Bounding Boxes","openapi":"pii POST /extractions","href":"/api-reference/platform/extractions/pii"},{"title":"Text Bounding Boxes","openapi":"text-box POST /extractions","href":"/api-reference/platform/extractions/text-box"},{"title":"Properties","openapi":"get-properties POST /extractions","href":"/api-reference/platform/extractions/properties"},{"title":"Invoices","openapi":"extract-invoices POST /extractions","href":"/api-reference/platform/extractions/extract-invoices"}]},{"group":"Generations","icon":"file-circle-plus","expanded":false,"pages":[{"title":"Fill Forms","openapi":"fill-forms POST /generations","href":"/api-reference/platform/generations/fill-forms"},{"title":"Create Fillable Forms","openapi":"create-fillable-forms POST /generations","href":"/api-reference/platform/generations/create-fillable-forms"}]},{"group":"Conversions","icon":"arrows-rotate","expanded":false,"pages":[{"title":"PDF to MS Office","openapi":"pdftoms POST /conversions","href":"/api-reference/platform/conversions/pdftoms"},{"title":"MS Office to PDF","openapi":"mstopdf POST /conversions","href":"/api-reference/platform/conversions/mstopdf"},{"title":"PDF to Image","openapi":"pdftoimg POST /conversions","href":"/api-reference/platform/conversions/pdftoimg"},{"title":"Image to PDF","openapi":"imgtopdf POST /conversions","href":"/api-reference/platform/conversions/imgtopdf"},{"title":"Miscellaneous to PDF","openapi":"misctopdf POST /conversions","href":"/api-reference/platform/conversions/misctopdf"},{"title":"PDF to PDF/A","openapi":"pdfa POST /conversions","href":"/api-reference/platform/conversions/pdfa"}]},{"group":"Jobs","icon":"wrench","expanded":false,"pages":[{"title":"Job Status","openapi":"job GET /jobs/{jobID}/status","href":"/api-reference/platform/jobs/status"},{"title":"Job Results","openapi":"job GET /jobs/{jobID}","href":"/api-reference/platform/jobs/result"}]},{"group":"Presigned URLs","icon":"link","expanded":false,"pages":[{"title":"Request Presigned File URLs","openapi":"presigned-file-urls POST /presigned-file-urls","href":"/api-reference/platform/presigned-urls/request"}]}]},{"group":"Sign API","icon":"signature","pages":[{"group":"Guides","expanded":false,"pages":[{"title":"Make your first 'Get Envelopes' API call","href":"/getting-started/first-sign-api-call"},{"title":"Create Envelope Tutorial","href":"/build-nitro/create-envelope"},{"title":"Webhooks","href":"/build-nitro/sign-webhooks"},{"title":"Sign Postman Collection","href":"/build-nitro/sign-postman-collection"}]},{"group":"Envelopes","icon":"envelope","expanded":false,"pages":[{"title":"List Envelopes","deprecated":null,"version":null,"openapi":"https://api.gonitro.dev/openapi.json get /sign/envelopes","href":"/api-reference/sign/list-envelopes"},{"title":"Get Envelope by ID","deprecated":null,"version":null,"openapi":"https://api.gonitro.dev/openapi.json get /sign/envelopes/{envelopeID}","href":"/api-reference/sign/get-envelope-by-id"},{"title":"Delete Envelope by ID","deprecated":null,"version":null,"openapi":"https://api.gonitro.dev/openapi.json delete /sign/envelopes/{envelopeID}","href":"/api-reference/sign/delete-envelope-by-id"},{"title":"Update Envelope","deprecated":null,"version":null,"openapi":"https://api.gonitro.dev/openapi.json patch /sign/envelopes/{envelopeID}","href":"/api-reference/sign/update-envelope"},{"title":"Create Envelope","deprecated":null,"version":null,"openapi":"https://api.gonitro.dev/openapi.json post /sign/envelopes","href":"/api-reference/sign/create-envelope"},{"title":"Cancel Envelope by ID","deprecated":null,"version":null,"openapi":"https://api.gonitro.dev/openapi.json put /sign/envelopes/{envelopeID}:cancel","href":"/api-reference/sign/cancel-envelope-by-id"},{"title":"Send Envelope for Signing","deprecated":null,"version":null,"openapi":"https://api.gonitro.dev/openapi.json post /sign/envelopes/{envelopeID}:send-for-signing","href":"/api-reference/sign/send-envelope-for-signing"},{"title":"Send Reminders for Envelope","deprecated":null,"version":null,"openapi":"https://api.gonitro.dev/openapi.json post /sign/envelopes/{envelopeID}:send-reminders","href":"/api-reference/sign/send-reminders-for-envelope"},{"title":"Download Sealed Envelope","deprecated":null,"version":null,"openapi":"https://api.gonitro.dev/openapi.json get /sign/envelopes/{envelopeID}:download-sealed","href":"/api-reference/sign/download-sealed-envelope"},{"title":"Download Original Envelope","deprecated":null,"version":null,"openapi":"https://api.gonitro.dev/openapi.json get /sign/envelopes/{envelopeID}:download-original","href":"/api-reference/sign/download-original-envelope"},{"title":"Download Audit Trail of Envelope","deprecated":null,"version":null,"openapi":"https://api.gonitro.dev/openapi.json get /sign/envelopes/{envelopeID}:download-audit-trail","href":"/api-reference/sign/download-audit-trail-of-envelope"}]},{"group":"Documents","icon":"file-pdf","expanded":false,"pages":[{"title":"List Documents by Envelope ID","deprecated":null,"version":null,"openapi":"https://api.gonitro.dev/openapi.json get /sign/envelopes/{envelopeID}/documents","href":"/api-reference/sign/list-documents-by-envelope-id"},{"title":"Create Document by Envelope ID","deprecated":null,"version":null,"openapi":"https://api.gonitro.dev/openapi.json post /sign/envelopes/{envelopeID}/documents","href":"/api-reference/sign/create-document-by-envelope-id"},{"title":"Reorder Documents by Envelope ID","deprecated":null,"version":null,"openapi":"https://api.gonitro.dev/openapi.json put /sign/envelopes/{envelopeID}/documents:reorder","href":"/api-reference/sign/reorder-documents-by-envelope-id"},{"title":"Get Document by ID","deprecated":null,"version":null,"openapi":"https://api.gonitro.dev/openapi.json get /sign/envelopes/{envelopeID}/documents/{documentID}","href":"/api-reference/sign/get-document-by-id"},{"title":"Delete Document by ID","deprecated":null,"version":null,"openapi":"https://api.gonitro.dev/openapi.json delete /sign/envelopes/{envelopeID}/documents/{documentID}","href":"/api-reference/sign/delete-document-by-id"},{"title":"Update Document by ID","deprecated":null,"version":null,"openapi":"https://api.gonitro.dev/openapi.json patch /sign/envelopes/{envelopeID}/documents/{documentID}","href":"/api-reference/sign/update-document-by-id"},{"title":"Download Sealed Document by ID","deprecated":null,"version":null,"openapi":"https://api.gonitro.dev/openapi.json get /sign/envelopes/{envelopeID}/documents/{documentID}:download-sealed","href":"/api-reference/sign/download-sealed-document-by-id"}]},{"group":"Fields","icon":"signature","expanded":false,"pages":[{"title":"Create Field(s) by Document ID","deprecated":null,"version":null,"openapi":"https://api.gonitro.dev/openapi.json post /sign/envelopes/{envelopeID}/documents/{documentID}/fields","href":"/api-reference/sign/create-fields-by-document-id"},{"title":"List Fields by Document ID","deprecated":null,"version":null,"openapi":"https://api.gonitro.dev/openapi.json get /sign/envelopes/{envelopeID}/documents/{documentID}/fields","href":"/api-reference/sign/list-fields-by-document-id"},{"title":"Delete Field by ID","deprecated":null,"version":null,"openapi":"https://api.gonitro.dev/openapi.json delete /sign/envelopes/{envelopeID}/documents/{documentID}/fields/{fieldID}","href":"/api-reference/sign/delete-field-by-id"},{"title":"Delete Fields by Field IDs","deprecated":null,"version":null,"openapi":"https://api.gonitro.dev/openapi.json post /sign/envelopes/{envelopeID}/documents/{documentID}/fields:batch-delete","href":"/api-reference/sign/delete-fields-by-field-ids"},{"title":"Update Field by ID","deprecated":null,"version":null,"openapi":"https://api.gonitro.dev/openapi.json patch /sign/envelopes/{envelopeID}/documents/{documentID}/fields/{fieldID}","href":"/api-reference/sign/update-field-by-id"}]},{"group":"Participants","icon":"users","expanded":false,"pages":[{"title":"Delete Participant by ID","deprecated":null,"version":null,"openapi":"https://api.gonitro.dev/openapi.json delete /sign/envelopes/{envelopeID}/participants/{participantID}","href":"/api-reference/sign/delete-participant-by-id"},{"title":"List Participants by Envelope ID","deprecated":null,"version":null,"openapi":"https://api.gonitro.dev/openapi.json get /sign/envelopes/{envelopeID}/participants","href":"/api-reference/sign/list-participants-by-envelope-id"},{"title":"List Participant Signing URLs by Envelope ID","deprecated":null,"version":null,"openapi":"https://api.gonitro.dev/openapi.json get /sign/envelopes/{envelopeID}/participants/signing-urls","href":"/api-reference/sign/list-participant-signing-urls-by-envelope-id"},{"title":"Create Participant(s) by Envelope ID","deprecated":null,"version":null,"openapi":"https://api.gonitro.dev/openapi.json post /sign/envelopes/{envelopeID}/participants","href":"/api-reference/sign/create-participants-by-envelope-id"},{"title":"Delete Participants by Participant IDs","deprecated":null,"version":null,"openapi":"https://api.gonitro.dev/openapi.json post /sign/envelopes/{envelopeID}/participants:batch-delete","href":"/api-reference/sign/delete-participants-by-participant-ids"},{"title":"Update Participant by ID","deprecated":null,"version":null,"openapi":"https://api.gonitro.dev/openapi.json patch /sign/envelopes/{envelopeID}/participants/{participantID}","href":"/api-reference/sign/update-participant-by-id"}]},{"group":"Webhook configs","icon":"bolt","expanded":false,"pages":[{"title":"List webhook configs for the authenticated application","deprecated":null,"version":null,"openapi":"https://api.gonitro.dev/openapi.json get /webhooks/configs","href":"/api-reference/webhooks/list-webhook-configs-for-the-authenticated-application"},{"title":"Create webhook config","deprecated":null,"version":null,"openapi":"https://api.gonitro.dev/openapi.json post /webhooks/configs","href":"/api-reference/webhooks/create-webhook-config"},{"title":"Get webhook config by ID","deprecated":null,"version":null,"openapi":"https://api.gonitro.dev/openapi.json get /webhooks/configs/{id}","href":"/api-reference/webhooks/get-webhook-config-by-id"},{"title":"Update webhook config","deprecated":null,"version":null,"openapi":"https://api.gonitro.dev/openapi.json patch /webhooks/configs/{id}","href":"/api-reference/webhooks/update-webhook-config"},{"title":"Delete webhook config","deprecated":null,"version":null,"openapi":"https://api.gonitro.dev/openapi.json delete /webhooks/configs/{id}","href":"/api-reference/webhooks/delete-webhook-config"},{"title":"Send a test event to a webhook endpoint","deprecated":null,"version":null,"openapi":"https://api.gonitro.dev/openapi.json post /webhooks/configs/test","href":"/api-reference/webhooks/send-a-test-event-to-a-webhook-endpoint"},{"title":"List supported webhook event types","deprecated":null,"version":null,"openapi":"https://api.gonitro.dev/openapi.json get /webhooks/configs/event-types","href":"/api-reference/webhooks/list-supported-webhook-event-types"}]}]},{"group":"Reference","icon":"book","pages":[{"title":"Good Development Practices","href":"/build-nitro/good-practices"},{"title":"API Error Codes","href":"/build-nitro/errors"},{"title":"Rotate Credentials","href":"/authentication/credential-rotation"},{"title":"Changelog","href":"/api-reference/changelog"}]}]},{"tab":"Power Automate","icon":"microsoft","pages":[{"title":"Power Automate","href":"/integrations/power-automate/overview"}]},{"tab":"Zapier","icon":"bolt","pages":[{"title":"Zapier","href":"/integrations/zapier/overview"}]},{"tab":"MCP","icon":"plug","hidden":true,"pages":[{"title":"MCP","href":"/integrations/mcp/overview"}]},{"tab":"Automate Workflows","icon":"diagram-project","hidden":true,"pages":[{"title":"Automate Workflows","href":"/integrations/automate-workflows/overview"}]}]},{"product":"Nitro Sign Enterprise Verified","icon":"badge-check","pages":[{"title":"Nitro Sign Enterprise Verified","href":"/nsev/getting-started/overview"}]}]},"basePath":"","title":"Optimize PDF Tutorial - Nitro APIs","buildId":"dpl_4UDxC3erAcBDHX8QT9FjyxxnLZSQ","deploymentId":"dpl_4UDxC3erAcBDHX8QT9FjyxxnLZSQ","dynamics":[],"chunks":[]}