Workflow Definition
The node graph behind every Onepin workflow — node types, voice mapping, script inputs, and export formats.
Every workflow is a definition: a graph of typed nodes connected by edges, plus execution settings. When you clone a template you get a ready-made graph; to change what it says, who speaks, or what format comes out, you edit node config objects. This page documents that structure.
Definitions are validated when saved — invalid configs are rejected at save time, and running a workflow whose required configs are empty (e.g. a cloned template with no script) fails with 422.
The authoritative, always-current schema is available from the platform itself — see Discovering schemas below. This page explains the concepts; the API is the source of truth.
Node types
Script Input (source_script)
To use a file instead: upload it (client.uploads.create → PUT bytes → client.uploads.confirm with context_type="workflow"), then reference the confirmed upload’s ID in upload_ids. See Uploads for the three-step flow.
Voice Generator (processing_generator)
The generator’s voice_map assigns a voice per locale:
Two identifier traps live here:
voice_idis the provider’s voice ID (provider_voice_idon a voice object), not the Onepin voice UUID you see invoices list.modelis the provider’s native model ID (e.g.eleven_multilingual_v2,sonic-2) — not the Onepin catalog model IDs shown on Voices & Models. Get valid pairs from the provider catalog:client.providers.list_catalog_provider_models(provider)and.list_catalog_provider_model_voices(provider, model).
Workflows that translate into multiple locales have one generator per locale (or one voice_map entry per locale) — each needs its own voice assignment.
Word Accuracy (validator_error_rate)
This is the validation step that makes output “production-ready”: lines below the accuracy threshold are regenerated automatically before export.
Export (sink_preview)
The run’s downloadable export is a ZIP of the generated audio files plus a manifest.csv.
Discovering schemas
Never guess a config shape — ask the platform:
The same data is available over the API (GET /api/v1/nodes, GET /api/v1/nodes/{node_type}) and is what the canvas node-config panels are built from.
Editing a definition
The reliable pattern is read → modify → write back (definitions are replaced whole, not merged):
The Python SDK Tutorial walks this end to end. Authoring a definition from scratch (client.workflows.create_workflow / onepin workflows create --definition @file.json) follows the same schema — start from onepin workflows definition-schema.
Estimating cost before running
Also available per template (GET /api/v1/templates/{id}/estimate) and via the SDK (client.workflows.preview_run, client.workflows.estimate_workflow).
Related
- Quickstart — clone, configure, run, download
- Python SDK Tutorial — edit a definition entirely in code
- Voices & Models — the model catalog
- API Reference — every endpoint and schema

