Save Talonic Schema
talonic_save_schemaSave a reusable schema to the workspace for consistent data extraction across documents. Provide a name and definition as JSON Schema or flat field-type map.
Instructions
Save a reusable schema to the workspace for use across future extractions.
USE WHEN: the user confirms a schema/template they want to reuse across documents.
NOT FOR: a single one-off extraction (pass the schema inline to talonic_extract instead).
ARGS: name; definition — a JSON Schema ({type:'object',properties:{...}}) or a flat {field:'type'} map.
RETURNS: the saved schema with id and short_id. Pass either to talonic_extract as schema_id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Human-readable name for the schema, e.g. 'Standard Invoice'. | |
| definition | Yes | Schema definition. Most reliable: full JSON Schema {type:'object', properties:{...}}. Also accepted: a flat key-type map {field_name:'string', amount:'number'} which the API normalises. | |
| description | No | Optional description of what this schema extracts and when to use it. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | UUID of the newly saved schema. | |
| short_id | No | Human-readable short id (SCH-XXXXXXXX). | |
| name | Yes | ||
| description | No | Schema description, or null when the schema was saved without one. The API explicitly maps the absent case to null (see SchemaResponse in openapi.yaml). | |
| definition | No | Final schema definition as stored, normalised by the API. | |
| field_count | No | ||
| version | No | Schema version (1 for new schemas; increments on update). | |
| created_at | No | ||
| updated_at | No | ||
| links | No |