Create schema from sample
create_schema_from_sampleGenerate and auto-save a schema from reviewed samples, returning schema_id, schema content and record links. Supply entity_samples (or samples_csv), sample_record_id, or both; explicit samples override stored JSON while attachment inheritance is preserved. Samples must describe one entity type in one language. Generation combines their fields and annotates relationships; it does not redesign the approved structure. Resolve consequential modeling choices and whether to generate semantic IDs before calling; semantic IDs need an organization embedding model and add cost. Requires editor; synchronous and billed. Review returned suggestions before applying edits with property tools. Sample review and canonicalizations: enricher://docs/schema-from-sample; schema format: enricher://docs/schema-reference.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Model composite key; leave it on auto (the default). auto is YOUR model, or with use_platform_models=true the organization's best model for this task from its benchmark scores (quality/speed/cost weights), within the run's constraints (attachments, web search, thinking) — the result reports the pick as model_selection. Name a provider::model only when the user named one; that runs the job on the platform (billed). Keys: list_models. | auto |
| language | No | Language of schema type names/descriptions and annotations; defaults to the sample-key language. Sample property names are not translated. Separate from enrichment output languages. | |
| samples_csv | No | Samples as CSV text instead of entity_samples (never both): the first row is ALWAYS the header, each data row one sample. Delimiter ',', ';' or tab; headers become identifier keys ('Author Name' -> author_name); each column gets one type (integer, number, boolean or text; empty cell = null; decimal commas read in ';'/tab text). Over 20 rows, 20 are kept, covering every column. Read the result's csv_import and relay the kept rows and renamed headers. | |
| attachment_ids | No | UUIDs used as source context and persisted for regeneration. With sample_record_id, omit to inherit its linked attachments; pass [] to deliberately use none, or a non-empty list to override. | |
| entity_samples | No | 1..20 reviewed instances of one entity type. Required without sample_record_id. Explicit samples override stored JSON while keeping attachment inheritance. Fields are unioned; missing/null observations become nullable. Use consistent names across samples and array items. Single-language data only; set multilingual flags after generation with update_schema_property. | |
| timeout_seconds | No | Wall-clock cap; returns a timeout error past this. | |
| reasoning_effort | No | Thinking (reasoning) opt-in: low, medium or high; omitted = off. On the platform, auto then picks only a model whose reasoning the platform can pilot, and the effort is translated per provider. On YOUR model, apply the effort yourself when you run the requests. | |
| sample_record_id | No | UUID of a successful sample_generation record. Its stored sample(s) are used when entity_samples is omitted, and its linked attachments are inherited when attachment_ids is omitted. | |
| use_platform_models | No | false (default): every LLM call of this job runs on YOUR model — the job parks each call as a pending request you answer with answer_llm_request; no credits are consumed. true: the job runs on the platform (billed) and, with the model left on auto, on the organization's best model for the task — its highest blended benchmark score under the organization's quality/speed/cost weights, among the models that satisfy the run (attachments, web search, thinking). Naming a platform model also runs the job there, bypassing that pick: do it only when the user named one. Protocol: enricher://docs/llm-delegation. | |
| generate_semantic_ids | No | Add semantic IDs to eligible keyed objects. Requires an organization embedding model and adds resolution cost. Recommend for reusable identities without stable machine keys; obtain agreement before enabling unless already authorized. Defaults false. Modeling guidance: enricher://docs/schema-from-sample. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||