infer_schema
Infer a JSON Schema (draft 2020-12) from an example JSON value. Free and deterministic. Set as_samples=true when the input is an array of example objects of the same shape to merge them into one schema. Turns sample agent/tool output into a reusable schema.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | A JSON value (or array of samples) to infer a schema from | |
| as_samples | No | Treat a top-level array as multiple samples of one shape |