A step is one stage of document processing. In the Studio editor, each step appears as a node. Save the steps and their connections together in a Config. Start with the complete Parse → Extract example, then adjust the steps for your documents.
Read a step definition
| Field | Meaning |
|---|---|
name | A unique name used to connect steps. |
type | Processing type, such as document-parse. |
data | Settings for that type. |
is_first | Set true for the one starting step. |
next_steps | Names of subsequent steps and optional conditions. |
The examples below are individual objects for the Config’s steps list, not complete requests. Connect them before saving. This guide covers six commonly used processing types.
Parse
Parse reads the document content. Put it first when used. model="default" selects the default model for this processing type.
Classify
Classify assigns a category such as invoice or receipt. json_schema lists allowed category names; the example uses invoice and receipt. Set split=true to separate documents by category before the next step.
Extract
Extract returns selected values as structured data. A JSON Schema describes the field names and types: string for text, number for amounts. Each path can contain at most one Extract step.
Instruct
Instruct follows written instructions, such as summarizing the document or answering a question about it. Put non-empty instructions in queries.
Merge
Merge combines documents previously separated by Classify so the following step can process them together. It cannot start a workflow and can occur once per path. Connect one following step without a condition, or use next_steps=null when Merge is the last step.
Validate
Validate checks earlier results against rules. Each check has a unique name, a condition, and severity: error for a required check or warning for a caution. The result is red when an error check fails, yellow when only warning checks fail, and green when all checks pass. The example checks that the preceding step named Parse found at least one page; gt means greater than.
Connect steps
To run Extract after Parse, set Parse’s next_steps to the following array. step_name must match the next step’s name. Mark only Parse as is_first=true.
For a split Classify step, run Extract only for invoices with the following connection. The condition compares the classification text with the actual category name invoice defined above.
Connections cannot loop back to an earlier step. Models must be available to your API key; model_access_denied means the selected model is not permitted. See Config validation errors when settings are rejected.