POST /v1/schema-from-sampleJSON Schema generator from sample
Agent Tools lf-agent-tools
Works out the shape and rules of a data structure from one example of it. Returns schema, properties, required, and inferred_types.
Request Body
Content-Type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
sample | object | Yes | Sample JSON object to infer schema from |
Response Schema
schema (object): Generated JSON Schema
properties (object): Inferred properties
required (array): Required field list
inferred_types (array): Types detected
cURL Example
curl -X POST 'https://lf-agent-tools.laminarforge.dev/v1/schema-from-sample' -H 'Authorization: Bearer lf_YourApiKey' -H 'Content-Type: application/json' -d '{}'Python Example
import requests
url = 'https://lf-agent-tools.laminarforge.dev/v1/schema-from-sample'
headers = {'Authorization': 'Bearer lf_YourApiKey'}
data = {}
response = requests.post(url, headers=headers, json=data)
print(response.json())