Skip to main content
curl "https://api.chroniclehq.com/api/v1/presentations/generate" \
  -X POST \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "template_id": "tpl_123",
    "prompt": "Create a sales pitch deck for Chronicle aimed at agencies",
    "attachments": [
      {
        "id": "att_123",
        "url": "https://chronicle-attachments.s3.us-east-1.amazonaws.com/...",
        "file_name": "agency-research.pdf",
        "type": "application/pdf"
      }
    ]
  }'
{
  "generation_id": "gen_123",
  "status": "generating",
  "poll_url": "/api/v1/presentations/generate/gen_123/status"
}
curl "https://api.chroniclehq.com/api/v1/presentations/generate" \
  -X POST \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "template_id": "tpl_123",
    "prompt": "Create a sales pitch deck for Chronicle aimed at agencies",
    "attachments": [
      {
        "id": "att_123",
        "url": "https://chronicle-attachments.s3.us-east-1.amazonaws.com/...",
        "file_name": "agency-research.pdf",
        "type": "application/pdf"
      }
    ]
  }'

Parameters

prompt
string
required
Instruction for what to generate.
template_id
string
Template that seeds the generation. If omitted, Chronicle uses the Standalone flow — a storyline outline is generated first, then slides. This is the same path the product UI uses when a user creates a deck from a prompt without picking a template.
selected_section_ids
string[]
Optional subset of section IDs from the template to include. If omitted, all sections are included. Ignored on the Standalone path.
attachments
object[]
Optional list of files to ground the generation in. Each attachment is uploaded via POST /uploads/create-target first; the returned download_url becomes this object’s url. When provided, every field on each entry (id, url, file_name, type) is required.
non_interactive
boolean
default:"false"
When true, Chronicle never pauses to ask clarifying questions and auto-proceeds end-to-end. Required for automation integrations like n8n, Zapier, Make, or MCP — anything that can’t pause mid-workflow to answer follow-up questions. When false (default), Chronicle may return awaiting_input and wait for a reply via POST /presentations/generate/:generationId/message.
narrative_type
string
Storyline archetype. One of Pitch, Showcase, Sales, Proposal, Research, Guide, Meeting, Portfolio, Auto. Defaults to Auto (Chronicle picks). Only honored on the Standalone path (no template_id) with non_interactive: true.
rewrite_style
string
How aggressively Chronicle rewrites your input prompt and any attachment content. One of Strong, Subtle, Preserve. Defaults to Subtle. Only honored on the Standalone path with non_interactive: true.
section_count
number | string
Target number of sections in the storyline. Pass a positive integer (for example 5) or the string "auto" to let Chronicle decide. Defaults to "auto". Only honored on the Standalone path with non_interactive: true.
language
string
Output language. One of us, uk, es, fr, de, it, pt, cn, in, ja, ko, ar, hi, bn. Defaults to us (American English). Only honored on the Standalone path with non_interactive: true.

Response

A successful request returns 202 Accepted. The workspace is inferred from your API key.
{
  "generation_id": "gen_123",
  "status": "generating",
  "poll_url": "/api/v1/presentations/generate/gen_123/status"
}
generation_id
string
Generation job ID
status
string
Current generation status
poll_url
string
Relative URL for checking generation status

FAQs

No. Generation is asynchronous. The endpoint starts a generation job and returns a generation_id. Use that ID to check status.
Use POST /api/v1/presentations to create from a template.Use POST /api/v1/presentations/generate to generate a presentation from a prompt.
Yes — by default. Chronicle can pause generation and return awaiting_input with a clarifying question.Set non_interactive: true on the request to skip this entirely. Chronicle will pick reasonable defaults and proceed silently. Required for automation tools that can’t pause mid-workflow.
No. When template_id is omitted, Chronicle uses the Standalone flow — it generates a storyline outline first, then slides. This is the same path the product UI uses when you create a deck from a prompt without picking a template.Pass template_id when you want Chronicle to stamp out a deck that matches a specific template’s structure.
Only when non_interactive: true AND template_id is omitted (the Standalone path).Outside that combination, Chronicle ignores narrative_type, rewrite_style, section_count, and language — the template defines structure in template-mode, and the interactive flow lets users clarify their preferences in chat.
Yes. Chronicle can reject a generation request before processing begins, including when usage limits are exceeded.Handle these responses separately from authentication errors.
Yes. Upload each file via POST /uploads/create-target first, then pass the captured download_url (with id, file_name, and type) in the attachments array.