This repository provides production-ready examples and tools for integrating with the Nitro Platform API and Nitro Sign API, enabling document conversion, extraction, transformation, workflow automation, and eSignature capabilities.
This repository contains everything you need to start integrating with Nitro's APIs:
- API Client SDKs (Python & TypeScript) - Production-quality clients with OAuth2 authentication
- Postman Collection - Complete API reference with pre-configured examples for all endpoints
- Production Workflow Examples - Real-world CLI tools demonstrating complete business workflows
- Documentation - Comprehensive guides covering workflows, API reference, and setup instructions
- Test Files - Sample documents for testing all API operations
The Nitro Platform API provides programmatic access to document processing capabilities including:
- Document Conversions: Convert between formats (Word↔PDF, Excel→PDF, PowerPoint→PDF, Image→PDF, PDF→Word/Excel/Image)
- Data Extraction: Extract text, form data, tables, and detect PII from documents
- Document Transformations: Compress, merge, split, redact, password protect, rotate, flatten, and more
- Async Processing: Handle large documents with job-based workflows
The Nitro Sign API provides eSignature capabilities including:
- Envelope Management: Create, send, track, and manage signature envelopes
- Document Upload: Add multiple documents to envelopes
- Participant Management: Add signers with roles and routing
- Field Placement: Programmatically place signature fields on documents
- Workflow Automation: Send reminders, track status, download signed documents
├── samples/
│ ├── python/ # Python SDK and CLI workflow examples
│ └── typescript/ # TypeScript SDK and examples
├── postman/ # Postman collection for API testing
├── docs/ # API documentation and workflow guides
└── test_files/ # Sample documents for testing
-
API Access: Get OAuth2 client credentials:
- Go to https://admin.gonitro.com
- Navigate to Settings → API
- Click Create Application
- Name your application and save the Client ID and Client Secret
-
Environment Setup: Set the following variables:
export PLATFORM_BASE_URL=https://api.gonitro.dev export PLATFORM_CLIENT_ID=<YOUR_CLIENT_ID> export PLATFORM_CLIENT_SECRET=<YOUR_CLIENT_SECRET>
- Import the collection from
postman/Platform-API.postman_collection.json - Configure collection variables (see
postman/README.md) - Get a bearer token
- Select test files for each request
- Run the sample requests
The Postman collection includes pre-configured examples for:
- Document conversions (Word↔PDF, Excel→PDF, PowerPoint→PDF, Image→PDF)
- Data extraction (text, forms, tables, PII detection)
- Document transformations (compress, merge, split, redact, password protection)
- Sign API operations (create envelopes, add participants, send for signing)
See samples/python/README.md for setup instructions. Key example scripts include:
See samples/typescript/ for TypeScript/Node.js integration examples with the same functionality as Python.
The API uses OAuth2 authentication:
- Exchange client credentials for an access token via
POST /oauth/token - Include the token in requests:
Authorization: Bearer <ACCESS_TOKEN>
See the authentication documentation for details.
This repository demonstrates complete business workflows through working code examples:
- quickstart.py - Validates API credentials and tests OAuth2 authentication
- convert_cli.py - Single document conversion with CLI for any supported format
- batch_process.py - Processes entire folders with pattern matching and progress tracking
- extract_data.py - Extracts form fields, tables, or plain text from PDFs as structured JSON
- smart_redact_pii.py - AI-powered detection and redaction of PII (SSN, emails, addresses) for GDPR/HIPAA compliance
- redact_by_keyword.py - Finds and permanently redacts specific keywords across documents
- bulk_password_protect.py - Adds password protection to multiple PDFs in batch
- prepare_pdf_for_distribution.py - Marketing workflow that converts Word to PDF, compresses files, and removes metadata for external sharing
- employee_policy_onboarding.py - HR workflow that reads employee data from CSV, creates signature envelopes with policy documents, sends for signing, tracks status, and downloads signed documents organized by employee
See docs/workflow-examples.md for detailed implementation guides.
The repository includes production-ready SDKs in both Python and TypeScript:
- BaseOAuthClient - Shared OAuth2 authentication with automatic token refresh
- PlatformAPIClient - Document conversion, extraction, and transformation operations
- SignAPIClient - Complete eSignature and envelope workflow management
Both SDKs provide identical functionality, allowing you to choose your preferred language.
The test_files/ directory contains sample documents for testing all API operations:
- Office documents (Word, Excel, PowerPoint) for conversion testing
- PDFs with forms, tables, and text for extraction testing
- Sample policies and employee data for eSignature workflow testing
All example scripts include references to these test files for immediate hands-on testing.
For API documentation and support, visit the developer portal.