> ## Documentation Index
> Fetch the complete documentation index at: https://docs.presenton.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create from structured JSON

> Select template layouts, satisfy their JSON schemas, and create deterministic Cloud presentations.

Use `POST /presentation/from-json` when your application already owns the slide data and needs predictable placement in a standard template. Unlike AI-planned generation, every slide selects a layout and supplies a structured `content` object that matches that layout's JSON schema.

## When to use structured JSON

This workflow fits recurring reports, dashboards, account reviews, and other presentations whose data structure is known in advance. Use prompt-based [presentation generation](/cloud/guides/generate-a-presentation) when Presenton should plan the narrative for you.

## 1. List templates

```bash theme={null}
curl --request GET \
  --url "https://api.presenton.ai/api/v3/standard-template/all?include_defaults=true" \
  --header "Authorization: Bearer YOUR_API_KEY"
```

Choose a template `id` and store it as `standard_template`.

## 2. Inspect its layouts

```bash theme={null}
curl --request GET \
  --url https://api.presenton.ai/api/v3/standard-template/neo-modern \
  --header "Authorization: Bearer YOUR_API_KEY"
```

The response contains a `slides` array. Each layout includes:

* `id`: the value to send as the slide's `layout`
* `name` and `description`: optional human-readable context
* `json_schema`: the required content fields, types, and constraints

Example layout shape:

```json theme={null}
{
  "id": "neo-modern:title-and-bullets",
  "name": "Title and bullets",
  "description": "A title followed by a concise list",
  "json_schema": {
    "type": "object",
    "properties": {
      "title": { "type": "string" },
      "bullets": {
        "type": "array",
        "items": { "type": "string" }
      }
    },
    "required": ["title", "bullets"]
  }
}
```

<Note>
  The example above illustrates the response structure. Always use the live `json_schema` returned for your chosen layout; field names and constraints vary by template.
</Note>

You can also request `GET /standard-template/{id}/example` to see example slide content for the template.

## 3. Validate slide content

Before calling Presenton, validate every slide `content` object against its layout schema. Check:

* Required properties are present.
* Values use the expected JSON types.
* Strings and arrays remain within any declared limits.
* No unsupported properties are added when the schema disallows them.
* The layout belongs to the selected standard template.

Client-side schema validation produces faster, clearer feedback than waiting for an API validation error.

## 4. Create the presentation

```bash theme={null}
curl --request POST \
  --url https://api.presenton.ai/api/v3/presentation/from-json \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "title": "Quarterly customer health review",
    "language": "English",
    "standard_template": "neo-modern",
    "theme": "professional-blue",
    "export_as": "pptx",
    "slides": [
      {
        "layout": "REPLACE_WITH_LAYOUT_ID",
        "content": {
          "title": "REPLACE WITH CONTENT MATCHING THE LIVE SCHEMA"
        },
        "speaker_note": "Introduce the purpose and reporting period."
      }
    ]
  }'
```

Replace the layout identifier and content object with values from the live template schema. A successful response contains `presentation_id`, `path`, `edit_path`, and `credits_consumed`.

## Create asynchronously

Send the same request body to `POST /presentation/from-json/async` when the job should run in the background. Poll `GET /async-task/status/{id}` or enable webhook delivery, just as you would for prompt-based generation.

## Keep recurring decks stable

* Pin the template identifier in each report configuration.
* Cache layout schemas only for a controlled period and refresh them when a template changes.
* Store the layout identifier beside your data-to-layout mapping.
* Validate generated files in a staging workflow after changing templates or themes.
* Treat missing layouts or new schema constraints as configuration errors, not retryable network failures.
* Use speaker notes for presenter context that should not appear on the slide.

<CardGroup cols={2}>
  <Card title="Templates and themes" icon="palette" href="/cloud/guides/templates-and-themes">
    Discover resource identifiers and understand how layouts and themes differ.
  </Card>

  <Card title="Generate asynchronously" icon="clock-rotate-left" href="/cloud/guides/async-generation">
    Run structured presentation creation as a background task.
  </Card>
</CardGroup>
