Generates a brand-new presentation from a natural-language prompt using AI, the same way Storydoc's editor creates a document with AI: it writes an outline from the prompt (8–10 slides unless the prompt asks for another count), then builds every slide from Storydoc's layout library with pictures, in the brand of the supplied website (else the look of the sender's recent documents or the account's theme).
The request is answered at once (202) with the story's links and a jobId; the deck is built into them in one to three minutes. Poll statusUrl (GET /v2/stories/generate/{jobId}) every few seconds: when its status is done the links show the finished deck and the story is Live. Until then the live link shows an empty document.
Use pageId as storyId in POST /v2/versions to create personalized variants of the generated story once it is done.
Rate Limit
150 requests per minute per organization. Every response includes x-rate-limit-counter and x-rate-limit-maximum headers. Polling the status does not count.
Busy
When Storydoc is already building several decks, or two for your organization, the request is refused with 503 before anything is created; retry after a minute.
Body
Required
-
Natural-language description of the presentation you want to generate. The more concrete the prompt (topic, audience, structure, tone, key points), the better the output. Cannot be empty or whitespace-only.
-
Email of the user that owns the generated story (becomes the story creator and the sender on the live link). Must belong to a user in the authenticated organization, otherwise the request is rejected with 400.
-
Optional company name to use as the subject of the presentation. If omitted and
websiteis provided, the name is inferred from Brandfetch. -
Optional company website used to derive brand colors, fonts, and logo for the generated story's design system. Accepts a bare domain (
acme.com) or a full URL (https://acme.com/about); the hostname is extracted automatically. If the brand pipeline fails or returns unusable data, the story falls back to scaffold defaults (the request still succeeds). -
Optional classification that selects an AI template tuned for that document class. Must be one of the supported subtypes (see enum). Defaults to
General presentationwhen omitted. Unsupported values return 400 with the full allowed list underallowedPresentationTypes.Values are
Agency pitch deck,Annual report,Brand guidelines,Brand proposal,Brochure,Business Plan,Business report,Case study one-pager,Company presentation,Construction proposal,Customer onboarding meeting,E-book,ESG report,Event proposal,Film pitch deck,Gaming pitch deck,General presentation,HR recruitment,Invest pitch deck,Investor report,Marketing case study,Marketing plan,Marketing proposal,Music event sponsorship proposal,NGO report,New employee onboarding,One pager,Partnership proposal,Pre-interview deck,Product launch,Product newsletter,Product pitch deck,Product roadmap,Project proposal,Quarterly Business Review,Quarterly report,Real estate listing,Research report,Restaurant proposal deck,Sales deck,Sales kickoff meeting,Sales proposal,Service pitch deck,Sports sponsorship,Startup pitch deck,Student case study,Student report,Video case study,Webinar,White paper, orWorkshop proposal. Default value isGeneral presentation.
Responses
-
The story and its live link are created; the deck is being built into them. Poll
statusUrluntilstatusisdone. -
Invalid request body or unsupported presentation type
-
Missing or invalid authorization token
-
Account not found for the authenticated organization
-
Rate limit exceeded
-
The deck could not be started
-
Storydoc is already building several decks, or two for your organization. Nothing was created; retry after a minute.
curl \
--request POST 'https://api.storydoc.com/v2/stories/generate' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"prompt": "A sales deck pitching our analytics product to enterprise marketing teams. Highlight ROI, ease of integration, and customer success stories.",
"senderEmail": "sender@company.com"
}'
{
"prompt": "A sales deck pitching our analytics product to enterprise marketing teams. Highlight ROI, ease of integration, and customer success stories.",
"senderEmail": "sender@company.com"
}
{
"prompt": "A pitch deck for our seed round: founding team, the problem, our unique solution, traction, and the ask.",
"senderEmail": "sender@company.com",
"company": "ACME Corporation",
"website": "acme.com"
}
{
"prompt": "Quarterly business review for our key enterprise account: revenue trends, product adoption, support metrics, and roadmap for next quarter.",
"senderEmail": "sender@company.com",
"company": "ACME Corporation",
"website": "https://acme.com",
"presentation type": "Quarterly Business Review"
}
{
"jobId": "3b241101-e2bb-4255-8caf-4136c566a962",
"status": "building",
"statusUrl": "https://api.storydoc.com/v2/stories/generate/3b241101-e2bb-4255-8caf-4136c566a962",
"url": "https://www.storydoc.com/5d7d8922e00d9265/2e91b144-092f-456b-8f2e-0bae9f7f3355",
"shortUrl": "https://view.storydoc.com/4GdDGt",
"pageId": "672a1c50223b713000a41ca74",
"versionId": "672a1f40a3a86b7a96d0d8ccc",
"editorUrl": "https://app.storydoc.com/pages/editor/672a1c50223b713000a41ca74/672a1f40a3a86b7a96d0d8ccc",
"versionUrl": "https://app.storydoc.com/pages/editor/672a1c50223b713000a41ca74/versions/672a1f40a3a86b7a96d0d8ccc"
}
{
"error": "Missing or empty \"prompt\" in request body"
}
{
"error": "Missing or invalid \"senderEmail\" in request body"
}
{
"error": "senderEmail \"sender@company.com\" not found in this organization"
}
{
"error": "Invalid \"presentation type\". Must be one of the supported classifications.",
"allowedPresentationTypes": [
"Agency pitch deck",
"Sales deck",
"Quarterly Business Review",
"..."
]
}
{
"error": "Invalid token: missing orgId"
}
{
"error": "Missing authorization token"
}
{
"error": "Access denied"
}
{
"error": "Account not found"
}
# Headers
x-rate-limit-counter: 42
x-rate-limit-maximum: 42
# Payload
{
"error": "Too many requests"
}
{
"error": "Failed to generate story",
"errorId": "a1b2c3d4e5f60718"
}
{
"error": "Storydoc is busy generating other decks. Try again in a minute."
}