Skip to main content
POST

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Idempotency-Key
string | null

Body

application/json

Body to generate a JSON schema from example documents, optionally steered by instructions.

documents
MIMEData · object[]
required
model
string
default:retab-small
instructions
string | null
background
boolean
default:false

If true, run asynchronously: returns immediately with status 'queued'. Poll GET /v1/schemas/generate/{schema_generation_id} until status is terminal.

Response

Successful Response

Public generated schema response.

id
string
required

Unique identifier of the schema generation.

object
string
default:schema
created_at
string<date-time> | null
json_schema
Json Schema · object
strict
boolean
default:true
status
enum<string>
default:pending

Lifecycle status. The synchronous path returns 'completed'. Background runs progress pending -> queued -> in_progress -> completed | failed | cancelled.

Available options:
pending,
queued,
in_progress,
completed,
failed,
cancelled
error
PrimitiveError · object | null

Error details when a background run fails; null otherwise. Always present so consumers can read it without an existence check.