> ## 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 a presentation from JSON

> Discover a Standard template's layouts and schemas, inspect its example content, and create a presentation from validated JSON.

Use this workflow when your application already owns the slide content and
needs Presenton to render it with a Standard template. Each slide selects a
template layout and supplies a `content` object that satisfies that layout's
JSON schema.

## Before you begin

Create a Cloud API key and pass it as a Bearer token on every request:

```http theme={null}
Authorization: Bearer YOUR_API_KEY
```

## 1. Get Standard templates

List the templates available to the authenticated Cloud account:

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

```json theme={null}
{
  "items": [
    {
      "id": "neo-modern",
      "name": "Neo Modern",
      "description": "A clean, modern presentation template",
      "layout_count": 12,
      "thumbnail": "https://example.com/templates/neo-modern.png",
      "is_default": true,
      "created_at": "2026-08-07T08:30:00Z",
      "updated_at": "2026-08-07T08:30:00Z"
    }
  ],
  "total": 1,
  "page": 1,
  "page_size": 20
}
```

Save the selected template's `id`. You will use it in the next three requests.
Use the optional `default` query parameter to filter the list: `true` returns
default templates and `false` returns custom templates.

See [List Standard templates](../api-reference/v3-standard-template/list-standard-templates).

## 2. Get the template and its schemas

Retrieve the selected template by ID:

```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 includes one entry in `schemas` for each template layout. The
schema's `title` is the layout ID to send as `slides[].layout`. The entire
`slides[].content` object must validate against the corresponding schema.

```json theme={null}
{
  "id": "neo-modern",
  "name": "Neo Modern",
  "description": "A clean, modern presentation template",
  "layout_count": 12,
  "thumbnail": "https://example.com/templates/neo-modern.png",
  "is_default": true,
  "created_at": "2026-08-07T08:30:00Z",
  "updated_at": "2026-08-07T08:30:00Z",
  "merged_components": {},
  "layouts": {
    "layouts": [
      {
        "id": "title-and-bullets",
        "description": "A title followed by a concise list"
      }
    ]
  },
  "fonts": {
    "Inter": "https://fonts.googleapis.com/css2?family=Inter"
  },
  "schemas": [
    {
      "title": "title-and-bullets",
      "type": "object",
      "properties": {
        "main": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string",
              "minLength": 8,
              "maxLength": 80
            },
            "bullets": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "minItems": 2,
              "maxItems": 5
            }
          },
          "required": ["title", "bullets"]
        }
      },
      "required": ["main"]
    }
  ]
}
```

<Note>
  The response above illustrates the shape of `schemas`. Layout IDs, component
  names, fields, types, and constraints vary by template. Always use the live
  response for the selected template.
</Note>

See [Get a Standard template](../api-reference/v3-standard-template/get-a-standard-template).

## 3. Get the template example

The example endpoint returns representative `layout` and `content` pairs that
already conform to the selected template's schemas:

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

```json theme={null}
{
  "standard_template": "neo-modern",
  "slides": [
    {
      "layout": "title-and-bullets",
      "content": {
        "main": {
          "title": "Quarterly customer health",
          "bullets": [
            "Enterprise retention remained above target",
            "Time to first value improved",
            "Support response time needs attention"
          ]
        }
      }
    }
  ]
}
```

Use the example to understand the expected nesting and content density. Do not
assume the example fields apply to a different template or layout.

See [Get a template example](../api-reference/v3-standard-template/get-a-template-example).

## 4. Create the presentation from JSON

Build each slide with a layout from the selected template and content that
validates against that layout's schema. Then send the result to the synchronous
from-JSON endpoint:

```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",
    "export_as": "pptx",
    "slides": [
      {
        "layout": "title-and-bullets",
        "content": {
          "main": {
            "title": "Quarterly customer health",
            "bullets": [
              "Enterprise retention remained above target",
              "Time to first value improved",
              "Support response time needs attention"
            ]
          }
        },
        "speaker_note": "Introduce the purpose and reporting period."
      }
    ]
  }'
```

```json theme={null}
{
  "presentation_id": "d3000f96-096c-4768-b67b-e99aed029b57",
  "path": "https://example.com/presentations/quarterly-customer-health.pptx",
  "edit_path": "https://presenton.ai/presentation?id=d3000f96-096c-4768-b67b-e99aed029b57",
  "credits_consumed": 1
}
```

See [Create from JSON synchronously](../api-reference/v3-presentation/create-from-json-synchronously).

Before submitting the request, validate each `content` object against its live
schema. This catches missing fields, incorrect value types, length violations,
and invalid array sizes before the rendering request.
