Skip to content

Chrome Local AI

Color mode

JSON generator

Describe the data you need and get it back as JSON that follows a schema.

Prompt API …

What it does

The Prompt API can be forced to answer in the shape of a JSON Schema (structured output). The answer is data your code can use directly, not free text that needs parsing.

Good to know: Try editing the schema: add a field, or remove it from “required”. The model has to follow whatever you write.

How to use it

  1. Describe the data you need (“Three fictional users with name, email and age”).
  2. Pick a schema preset, or edit the JSON Schema yourself. It must be valid JSON.
  3. Press Generate.
  4. The result appears as formatted JSON. Copy it with the Copy button.
The model's answer is forced to follow this schema.