TheDocumentation Index
Fetch the complete documentation index at: https://docs.doclo.ai/llms.txt
Use this file to discover all available pages before exploring further.
DocloClient is the main entry point for interacting with Doclo Cloud. It provides methods for executing flows, managing runs, and handling authentication.
Installation
Initialization
Configuration Options
| Option | Type | Default | Description |
|---|---|---|---|
apiKey | string | Required | API key (dc_live_... or dc_test_...) |
baseUrl | string | https://app.doclo.ai | Base URL for the API |
convexUrl | string | Same as baseUrl | URL for Convex data operations |
timeout | number | 300000 | Request timeout in ms (5 minutes) |
API keys must be at least 50 characters and start with
dc_live_ (production) or dc_test_ (test mode). Production keys cannot be used with localhost or private IP addresses.Resources
The client exposes several resource namespaces:| Resource | Description |
|---|---|
client.flows | Execute flows and retrieve flow information |
client.runs | Get execution status, poll for completion, cancel runs |
client.definitions | Flow definitions for local/hybrid execution |
client.prompts | Prompt assets management |
client.schemas | Schema assets management |
client.assets | Flow assets bundles |
client.observability | Observability event ingestion |
The
definitions, prompts, schemas, assets, and observability resources are used for advanced hybrid execution and asset management. See Hybrid Client for details.Flows Resource
flows.run(flowId, options)
Execute a flow with a document.
| Option | Type | Description |
|---|---|---|
input.document.base64 | string | Base64-encoded document content |
input.document.filename | string | Original filename |
input.document.mimeType | string | MIME type (application/pdf, image/png, etc.) |
input.variables | object | Optional variables to pass to the flow |
wait | boolean | Wait for completion before returning |
timeout | number | Timeout for sync mode in ms (default: 30000) |
webhookUrl | string | URL to receive completion notification |
metadata | object | Custom metadata to attach |
idempotencyKey | string | Prevent duplicate executions |
version | string | Specific flow version to run |
Execution<T>
flows.list(options?)
List flows available in your organization.
| Option | Type | Description |
|---|---|---|
limit | number | Max items to return (default: 20, max: 100) |
cursor | string | Cursor from previous response |
PaginatedResponse<FlowInfo>
flows.get(flowId, version?)
Get information about a specific flow.
FlowInfo
Runs Resource
runs.get(executionId)
Get the current status and result of an execution.
Execution<T>
runs.waitForCompletion(executionId, options?)
Poll until an execution completes.
| Option | Type | Default | Description |
|---|---|---|---|
interval | number | 1000 | Polling interval in ms |
timeout | number | 300000 | Max wait time in ms |
Execution<T>
Throws: TimeoutError if execution doesn’t complete within timeout.
runs.cancel(executionId)
Cancel a running execution.
Types
Execution
The result of a flow execution:FlowInfo
Information about a flow:DocumentInput
Document input structure:Properties
client.isTestMode
Check if using a test API key:
Next Steps
Error Handling
Handle errors gracefully
Webhooks
Receive completion notifications