Documentation Index
Fetch the complete documentation index at: https://mintlify.com/reductoai/reducto-python-sdk/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The Reducto SDK provides comprehensive job management capabilities for tracking asynchronous document processing operations. You can retrieve individual jobs, list all jobs, and cancel running jobs.Get a Specific Job
Retrieve the status and results of a specific job using its job ID:Job Response
The job response includes:job_id: Unique identifier for the jobstatus: Current status (pending, processing, completed, failed, cancelled)result: The processing result (when status is completed)error: Error details (when status is failed)created_at: Job creation timestampcompleted_at: Job completion timestamp (when applicable)
Get All Jobs
Retrieve a list of all your jobs with pagination support:Pagination
Use thecursor parameter to fetch subsequent pages:
Exclude Configurations
Reduce response size by excluding configuration details:Parameters
Maximum number of jobs to return per page (max 500)
Cursor for pagination. Use the
next_cursor from the previous response to fetch the next page.Exclude raw_config from response to reduce size
Cancel a Job
Cancel a running or pending job:You can only cancel jobs that are in
pending or processing status. Completed, failed, or already cancelled jobs cannot be cancelled.Async Job Management
All job operations work with the async client:Complete Example: Job Polling
Here’s a complete example of submitting a job and polling for completion:Job Lifecycle
Jobs progress through the following states:- Pending: Job is queued and waiting to start
- Processing: Job is currently being processed
- Completed: Job finished successfully
- Failed: Job encountered an error
- Cancelled: Job was cancelled by user request
Best Practices
Use Webhooks for Production
Use Webhooks for Production
Instead of polling for job completion, configure webhooks to receive notifications when jobs complete. See Webhooks for details.
Implement Exponential Backoff
Implement Exponential Backoff
When polling for job status, use exponential backoff to reduce API calls:
Clean Up Old Jobs
Clean Up Old Jobs
Periodically retrieve and clean up old completed jobs to keep your job list manageable:
Handle Pagination
Handle Pagination
When retrieving all jobs, always handle pagination to ensure you process all results:
Related
- Webhooks - Configure webhooks for job completion notifications
- Async Support - Learn about async patterns in the SDK
- Error Handling - Handle job failures gracefully