POST
/
v1
/
teams
/
{teamId}
/
content
/
slideshows
/
generations
TypeScript client
import { OctosparkClient } from '@octospark/sdk'

const client = new OctosparkClient({
  token: process.env.OCTOSPARK_TOKEN
})

const response = await client.slideshows.createSlideshowGeneration({
  teamId: process.env.OCTOSPARK_TEAM_ID ?? "teamId",
  body: {},
})
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "contentItemId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "status": "<string>",
  "targetSlideId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "baseRevision": 123,
  "resultRevision": 123,
  "workflowId": "<string>",
  "renderJobId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "outputAssetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "errorCode": "<string>",
  "diagnostics": "<string>",
  "pauseReason": "<string>",
  "maxSpendDecimillicents": 123,
  "spentDecimillicents": 123,
  "activeDurationMs": 123,
  "links": {
    "self": "<string>",
    "events": "<string>",
    "slideshow": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

idempotency-key
string
required

a string at most 200 character(s) long

Required string length: 1 - 200

Path Parameters

teamId
string
required

Team (workspace) id (UUID). Discover ids via the list teams endpoint or the agent context.

Body

application/json
prompt
string
required

a string at most 8000 character(s) long

Required string length: 1 - 8000
maxSpendDecimillicents
integer

a number between 1 and 100000000

Required range: 1 <= x <= 100000000
defaultImageSource
object

Default background source for slides: stock search, generated image, upload or a named library pack. Individual slides can override it.

imageModelId
string

a string at most 256 character(s) long

Required string length: 1 - 256
slideCount
integer

a number between 2 and 20

Required range: 2 <= x <= 20
slideCountMode
enum<string>

Fixed uses the requested count. Automatic resolves a count from three to six from the brief.

Available options:
fixed,
automatic
aspectRatio
enum<string>

Requested output aspect ratio for every generated slide; defaults to 4:5.

Available options:
4:5,
9:16,
1:1,
16:9
brandId
string<uuid>

a Universally Unique Identifier

Pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
model
enum<string>

OpenRouter model to write the deck with. Omit to use the prompt registry default.

Available options:
google/gemini-3.8-flash,
anthropic/claude-opus-5.5,
openai/gpt-6-sol,
anthropic/claude-sonnet-5,
openai/gpt-6-luna,
x-ai/grok-4.7,
deepseek/deepseek-v4.1-flash,
qwen/qwen3.8-flash,
minimax/minimax-m3,
mistralai/mistral-small-2603,
moonshotai/kimi-k3,
xiaomi/mimo-v2.6-flash,
stepfun/step-3.7-flash,
google/gemini-3.7-flash,
anthropic/claude-opus-5,
openai/gpt-5.6-sol,
openai/gpt-5.6-terra,
x-ai/grok-4.6,
deepseek/deepseek-v4-flash-0731,
qwen/qwen3.7-plus,
moonshotai/kimi-k2.6,
xiaomi/mimo-v2.5,
google/gemini-3.5-flash,
anthropic/claude-opus-4.8,
google/gemini-3.1-pro-preview,
x-ai/grok-4.5
selectedSourceIds
string<uuid>[]

an array of at most 50 item(s)

Maximum array length: 50

a Universally Unique Identifier

Pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
tone
enum<string>

Narrative tone used for generated slide copy and visual direction. Defaults to educational.

Available options:
educational,
personal
language
enum<string>

Language used for generated on-slide text. Defaults to the language detected from the prompt.

Available options:
same_as_prompt,
en,
es,
fr,
de,
it,
pt,
nl,
ja,
zh-TW,
zh-CN,
ko,
hi,
ar,
ru,
pl,
tr,
id,
sv,
da,
no,
fi
captionDefaults
object

Default caption preset, font, size, and width applied to generated editable slide text.

backgroundOverlay
object

Dark background overlay defaults for generated slides. The hook can be controlled independently.

slideImageSources
maxItems(20) · object[]

an array of at most 20 item(s)

Required array length: 2 - 20 elements
referenceAssetIds
string<uuid>[]

an array of at most 64 item(s)

Maximum array length: 64

a Universally Unique Identifier

Pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
referenceSlideshowIds
string<uuid>[]

an array of at most 20 item(s)

Maximum array length: 20

a Universally Unique Identifier

Pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
styleBrief
string

a string at most 4000 character(s) long

Maximum string length: 4000
templateMode
enum<string>

Editable uses the structured renderer. Custom runs the bounded template builder with real render previews and a visual critic.

Available options:
editable,
custom
visualChecks
boolean

When true, render visual checks for the agent to inspect and polish the slideshow. Defaults to false; an interactive browser preview is still available.

autoRender
boolean

When true, export the generated slideshow as soon as generation completes. Defaults to false; generation leaves an editable draft.

Response

Success

id
string<uuid>
required

a Universally Unique Identifier

Pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
contentItemId
string<uuid>
required

a Universally Unique Identifier

Pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
kind
enum<string>
required
Available options:
generation,
slide_regeneration,
edit
status
string
required
targetSlideId
string<uuid> | null
required

a Universally Unique Identifier

Pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
regenerationScope
enum<string> | null
required
Available options:
text,
image,
layout,
style,
all
baseRevision
integer
required

an integer

resultRevision
integer | null
required

an integer

workflowId
string
required
renderJobId
string<uuid> | null
required

a Universally Unique Identifier

Pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
outputAssetId
string<uuid> | null
required

a Universally Unique Identifier

Pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
errorCode
string | null
required
diagnostics
string | null
required
pauseReason
string | null
required
maxSpendDecimillicents
number | null
required
spentDecimillicents
number
required
activeDurationMs
number
required