Skip to main content

Installation & Setup

Get up and running with DocuDevs in just a few minutes. This guide covers everything you need to start processing documents with our platform.

Prerequisites

  • Python 3.9+ (for SDK usage)
  • API Key from DocuDevs platform
  • Internet connection for API access

Step 1: Get Your API Key

Your API key is required to authenticate with the DocuDevs platform.

Creating an API Key

  1. Sign up at DocuDevs.ai (currently in private beta)
  2. Navigate to Settings → API Keys after login
  3. Create a new API key for your project
  4. Copy the API key (it looks like: 1234567890abcdef1234567890abcdef)
Security Note
  • Store your API key securely like a password
  • Never commit API keys to code repositories
  • Don't include API keys in client-side code
  • Revoke and regenerate if compromised

Managing API Keys

  • Multiple Keys: Create separate keys for different projects/environments
  • Revocation: Revoke keys anytime from the portal
  • Regeneration: Generate new keys as needed
  • Monitoring: Track usage per API key

Step 2: Install the SDK

# Install the latest version
pip install docu-devs-api-client

# Or install a specific version
pip install docu-devs-api-client==1.0.1

Verify Installation

# Test your installation
from docudevs.docudevs_client import DocuDevsClient
print("DocuDevs SDK installed successfully!")

Step 3: Configure Your Environment

Set up your API key for easy access across your projects.

Linux / macOS:

export API_KEY="your-api-key-here"

Windows (Command Prompt):

set API_KEY=your-api-key-here

Windows (PowerShell):

$env:API_KEY="your-api-key-here"

Step 4: Test Your Connection

Verify everything is working with a quick test:

import asyncio
import os
from docudevs.docudevs_client import DocuDevsClient

async def test_connection():
# Initialize client
client = DocuDevsClient(token=os.getenv('API_KEY'))

try:
# Test connection by listing configurations
response = await client.list_configurations()
print("✅ Connection successful!")
print(f"Status code: {response.status_code}")
return True

except Exception as e:
print("❌ Connection failed!")
print(f"Error: {e}")
return False

# Run the test
success = asyncio.run(test_connection())
if success:
print("🎉 You're ready to start processing documents!")
else:
print("🔧 Please check your API key and network connection.")

Alternative Integration Methods

Direct API Usage (cURL)

If you prefer direct API calls without the SDK:

# Test your API key
curl -X GET https://api.docudevs.ai/configuration \
-H "Authorization: Bearer $API_KEY"

# Upload and process a document
curl -X POST https://api.docudevs.ai/document/upload-files \
-H "Authorization: Bearer $API_KEY" \
-F "document=@your-document.pdf"

CLI Tool

The CLI tool is included with the SDK installation and provides convenient command-line access to all DocuDevs functionality:

# CLI is included with SDK installation
pip install docu-devs-api-client

# Set up authentication (choose one method)
export DOCUDEVS_TOKEN=your-api-key-here
# OR
export API_KEY=your-api-key-here
# OR pass token with each command using --token

# High-level document processing (upload + process + wait for result)
docudevs process document.pdf --prompt="Extract invoice data"

# OCR-only processing
docudevs ocr document.pdf --format=markdown

# Upload and process with a saved configuration
docudevs process-with-config document.pdf my-invoice-config

# Case management
docudevs create-case "Invoice Batch 2024-01"
docudevs list-cases
docudevs upload-case-document 123 document.pdf

# Configuration management
docudevs list-configurations
docudevs save-configuration my-config config.json

# Template management
docudevs list-templates
docudevs fill template-name data.json

# Operations (error analysis, etc.)
docudevs error-analysis job-guid-here

# Low-level commands (for advanced usage)
docudevs upload-document document.pdf # Upload only
docudevs process-document GUID config.json # Process uploaded doc
docudevs status GUID # Check job status
docudevs result GUID # Get job result
docudevs wait GUID # Wait for completion

CLI Authentication

The CLI supports multiple authentication methods:

  1. Environment Variable (Recommended):

    export DOCUDEVS_TOKEN=your-api-key-here
    docudevs process document.pdf
  2. Legacy Environment Variable:

    export API_KEY=your-api-key-here
    docudevs process document.pdf
  3. Command Line Option:

    docudevs --token=your-api-key-here process document.pdf

CLI Features

  • High-level Commands: process, ocr, process-with-config handle the full workflow
  • Case Management: Create and manage document cases
  • Configuration Management: Save and reuse processing configurations
  • Template Operations: Fill and manage document templates
  • Operations: Submit and monitor advanced operations like error analysis
  • Automatic Waiting: Commands automatically wait for results by default
  • Environment Integration: Respects environment variables for authentication

For complete CLI documentation including all commands and options, see the CLI Reference.

Configuration Options

API Endpoint Configuration

# Default endpoint (production)
client = DocuDevsClient(token=api_key)

# Custom endpoint (if using different environment)
client = DocuDevsClient(
api_url="https://api.staging.docudevs.ai",
token=api_key
)

Timeout Configuration

# Configure custom timeouts
client = DocuDevsClient(
token=api_key,
timeout=30 # 30 seconds timeout
)

Troubleshooting

Common Issues

Authentication Errors

401 Unauthorized - Invalid API key

Solution: Verify your API key is correct and active

Network Errors

Connection timeout or network unreachable

Solutions:

  • Check internet connection
  • Verify firewall settings
  • Try different network if behind corporate firewall

Import Errors

ModuleNotFoundError: No module named 'docudevs'

Solutions:

  • Reinstall the SDK: pip install --upgrade docu-devs-api-client
  • Check Python environment: pip list | grep docudevs
  • Verify Python version: python --version

Environment Variable Issues

API key not found or None

Solutions:

  • Check environment variable: echo $API_KEY
  • Restart terminal/IDE after setting variables
  • Use absolute path for .env files

Getting Help

If you encounter issues:

  1. Check the Troubleshooting Guide
  2. Review Common Error Codes
  3. Contact Support: support@docudevs.ai

Next Steps

Now that you have DocuDevs installed and configured:

Quick Start

Learn Core Features

Explore Advanced Features

Ready to process your first document? Continue with the Quick Start tutorial!