Skip to main content

Workflows Client

The Workflows client lets you explore workflow definitions, fetch metadata, and validate input payloads before executing a run. Use it to inspect schemas and prevent invalid submissions.

Setup

Listing All Workflows

Retrieve all workflows accessible by your API key:

Workflow Object

Getting Workflow Metadata

Fetch detailed metadata for a specific workflow, including its input schema:

Metadata Object

Input Schema Structure

The input_schema follows JSON Schema format:

Validating Workflow Input

Validate input payloads against a workflow’s schema before starting a run:
When you call client.runs.start(), the SDK automatically validates the input against the workflow’s schema. Manual validation is useful when you want to check inputs before making the API call.

Validation Checks

The validator checks:

InputValidationError

When validation fails, an InputValidationError is raised with details:

Combining with Runs

Use workflow metadata to build dynamic UIs or validate inputs before execution: