Documentation Index
Fetch the complete documentation index at: https://docs.reducto.ai/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Usage data from Reducto deployments in air-gapped environments can be exported as a compressed CSV file and sent to Reducto for billing purposes. When you invoke the/billing-usage API, usage data is exported from the database to a file and uploaded to the BUCKET/usage_for_billing prefix in object storage. A presigned URL is returned, which you can use to download the file and send it to Reducto.
Note: To avoid data loss, ensure that the exported file is downloaded and shared before any lifecycle rules expire and delete the object.
Enable usage persistence
To export usage data, it must first be persisted in the database. This can be enabled by setting the following environment variable:API reference
POST /billing-usage
Exports usage data to object storage and returns a presigned URL for download.
Request parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
count | integer | 1,000,000 | The number of records to fetch and export (minimum: 1) |
delete | boolean | false | Whether to delete the records after exporting |
Request example
Response format
Exported data format
The exported CSV file contains the following columns:idempotency_key: Unique identifier for each usage recordtype: Type of usage (e.g., “parse”)num_pages: Number of pages processedattributes: Additional metadata as JSONtimestamp: When the usage occurred (ISO format)
Usage workflow
- Enable persistence: Set
STORE_USAGE_FOR_BILLING="yes"in your environment - Process documents: Use Reducto normally; usage data will be automatically stored
- Export all data: Call the
/billing-usageAPI repeatedly with"delete": trueuntil the presigned URL is null - Download files: Use each returned presigned URL to download the compressed CSV files
- Send to Reducto: Share all downloaded files with Reducto for billing
Complete data export process
To ensure all usage data is exported, you must call the API repeatedly withdelete: true until no more data remains:
"delete": true when performing complete exports to avoid re-exporting the same data and to free up database storage.
Important notes
- Records are exported in chronological order (oldest first)
- The presigned URL expires after 6 days or until lifecycle rule deletes the object
- If
delete: trueis used, only successfully exported records are deleted from database - To regenerate presigned URL of already exported data visit
BUCKET/usage_for_billingprefix on cloud console for Bucket