Skip to main content
POST
generate_domain

Authorizations

X-API-Key
string
header
required

Body

application/json

Ask the model for an unsaved taxonomy + ontology draft.

Nothing is persisted: the caller edits the draft, then posts it to POST /v1/domains. Optional display_name / slug only seed the suggested identity fields returned alongside the vocabularies.

description
string
required

What kinds of files belong in this domain — the classifier-facing brief.

Required string length: 1 - 4000
display_name
string | null

Optional name hint used when suggesting a display name and slug.

Required string length: 1 - 200
slug
string | null

Optional slug hint. When omitted, one is derived from the display name or description.

Maximum string length: 64
Pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$

Response

Successful Response

An unsaved draft ready for the authoring UI to edit and then create.

ontology
Ontology · object
required

The graph shape. Closed node and edge types with declared domain/range.

allow_other is the ontology's counterpart to :attr:Taxonomy.allow_other, and unlike it, this one can be turned off: a file must always be classifiable, but an entity need not always be extractable.

suggested_display_name
string
required
Required string length: 1 - 200
suggested_slug
string
required
Maximum string length: 64
Pattern: ^[a-z0-9]+(?:_[a-z0-9]+)*$
taxonomy
Taxonomy · object
required

The classification vocabulary.

validation
DomainValidation · object
required

Publish-gate check on the normalized draft — always run so the UI knows it can create cleanly.