Skip to main content
The 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

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:
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.
Parameters: Returns: Execution<T>

flows.list(options?)

List flows available in your organization.
Parameters: Returns: PaginatedResponse<FlowInfo>

flows.get(flowId, version?)

Get information about a specific flow.
Returns: FlowInfo

Runs Resource

runs.get(executionId)

Get the current status and result of an execution.
Returns: Execution<T>

runs.waitForCompletion(executionId, options?)

Poll until an execution completes.
Parameters: Returns: 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