Optimized for Dark Mode

The website is optimized for dark mode to enhance your user experience. Switch to dark mode to enjoy it.

OpenAI JSON Schema Builder

Build strict JSON schemas for OpenAI Structured Outputs. The response_format updates live as you edit.

Have a schema already? Visualize it →
complaintorderappointment
items
{
  "type": "json_schema",
  "json_schema": {
    "name": "email_classification",
    "strict": true,
    "schema": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "complaint",
            "order",
            "appointment"
          ],
          "description": "Return the type of the email that is one of: complaint, order, appointment"
        },
        "ordered_products": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "item_id": {
                "type": "string",
                "description": "The item id of the product"
              },
              "amount": {
                "type": "number",
                "description": "The amount of the product"
              }
            },
            "required": [
              "item_id",
              "amount"
            ],
            "additionalProperties": false,
            "description": "The item id and the amount of the ordered product"
          },
          "description": "If the mail contains an order return the products and amount"
        }
      },
      "required": [
        "type",
        "ordered_products"
      ],
      "additionalProperties": false
    }
  }
}

Pass this as response_format in the API request. strict: true — every property is required and additional properties are rejected.