Skip to content
Last updated

🔨 In Development — This section is still being developed and may change.
Represents a reusable JSON schema definition for structured assistant outputs. JSON schemas enable assistants to return validated, type-safe responses in a specific format.

Properties

id string

Unique identifier for the JSON schema. Format: schema_ followed by alphanumeric characters.

name string

Human-readable name for the schema. Used for identification in lists and UI.

description string optional

Description of what this schema is used for and what data it represents.

schemaObject object

The actual JSON schema definition following the JSON Schema specification. Defines the structure, types, and validation rules for the output.

organizationId string

The organization this schema belongs to.

createdBy string

User ID of the person who created this schema.

isActive boolean

Whether this schema is active and available for use.

version integer

Version number of the schema. Increments with each update.

createdAt integer

Unix timestamp (seconds) when the schema was created.

updatedAt integer

Unix timestamp (seconds) when the schema was last modified.

Example JSON Schema

{
  "id": "schema_abc123",
  "name": "Product Information",
  "description": "Schema for structured product data",
  "schemaObject": {
    "type": "object",
    "properties": {
      "name": {
        "type": "string",
        "description": "Product name"
      },
      "price": {
        "type": "number",
        "description": "Product price in USD"
      },
      "category": {
        "type": "string",
        "enum": ["electronics", "clothing", "food", "other"]
      },
      "inStock": {
        "type": "boolean",
        "description": "Whether product is in stock"
      },
      "tags": {
        "type": "array",
        "items": {
          "type": "string"
        }
      }
    },
    "required": ["name", "price", "category"]
  },
  "organizationId": "org_xyz789",
  "createdBy": "user_abc123",
  "isActive": true,
  "version": 1,
  "createdAt": 1728057600,
  "updatedAt": 1728057600
}

Usage

JSON schemas are referenced by assistants to enable structured output mode. When an assistant has outputMode set to json_schema, it will validate its responses against the specified schemas.