API Get key

YouTube

3D Toon Explainers

A curious true story, how something works or a what if, told by a narrator in a bright 3D cartoon world

From
248 crper ad
Endpoint
POST /api/v1/studio/toon3d/runs
Workflow id
toon3d

Real outputs of this workflow.

The request

# 1. Price it. Free, nothing is charged.
PRICE=$(curl -s -X POST https://staglight.ai/api/v1/studio/toon3d/estimate \
  -H "Authorization: Bearer $STAGLIGHT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "card": "explain",
    "inputs": {"plan": "{\"title\": \"The summer London'\''s river stank\", \"world\": \"Victorian London in the hot summer of 1858: the brown river Thames, a stone bridge, the Houses of Parliament\", \"hero\": \"a Victorian engineer in a brown bowler hat, a dark green frock coat and a grey waistcoat\", \"check\": \"Hot July and August 1858; untreated sewage in the Thames (Wikipedia: Great Stink)\\nParliament'\''s river-side curtains were soaked in chloride of lime\\nThe bill was tabled 15 June 1858 and passed into law on 2 August 1858\\nBazalgette'\''s sewers still work in the 21st century\", \"shots\": [{\"shows\": \"the engineer and other Londoners stand on a stone bridge over the brown Thames under a blazing sun, holding their noses while wavy green stink lines rise from the water.\", \"line\": \"In 1858, London'\''s river smelled so bad that Parliament could barely work.\"}, {\"shows\": \"old brick sewer pipes along the riverbank pour brown water straight into the Thames, flies buzz over the mud and the sun beats down on the city.\", \"line\": \"It was a scorching summer, and the Thames was full of raw sewage.\"}, {\"shows\": \"inside a grand wood-panelled hall of Parliament, cartoon lawmakers in dark coats cough, gag and fan themselves with papers beside tall open windows facing the same brown, smelly river.\", \"line\": \"The stench drifted straight into the lawmakers'\'' halls.\"}, {\"shows\": \"workers dip long heavy curtains into wooden buckets of white chloride of lime and hang them, dripping, over the tall windows on the river side, while the engineer watches hopefully.\", \"line\": \"So they soaked the curtains in chloride of lime.\"}, {\"shows\": \"a busy building site by the river: workers lay curved brick walls of a huge round sewer tunnel while the engineer unrolls a long paper plan of tunnels.\", \"line\": \"Within weeks, a new law paid for a giant network of sewers.\"}, {\"shows\": \"the engineer stands proudly in a clean, softly lit brick sewer tunnel as fresh water flows past, then the camera rises through the street to London at dusk.\", \"line\": \"Those tunnels still serve London today. Would you have held your breath?\"}]}"}
  }' | jq .credits)
echo "$PRICE"

# 2. Start it. max_credits refuses anything above that price; the Idempotency-Key stops a double charge.
START=$(curl -s -X POST https://staglight.ai/api/v1/studio/toon3d/runs \
  -H "Authorization: Bearer $STAGLIGHT_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "card": "explain",
    "inputs": {"plan": "{\"title\": \"The summer London'\''s river stank\", \"world\": \"Victorian London in the hot summer of 1858: the brown river Thames, a stone bridge, the Houses of Parliament\", \"hero\": \"a Victorian engineer in a brown bowler hat, a dark green frock coat and a grey waistcoat\", \"check\": \"Hot July and August 1858; untreated sewage in the Thames (Wikipedia: Great Stink)\\nParliament'\''s river-side curtains were soaked in chloride of lime\\nThe bill was tabled 15 June 1858 and passed into law on 2 August 1858\\nBazalgette'\''s sewers still work in the 21st century\", \"shots\": [{\"shows\": \"the engineer and other Londoners stand on a stone bridge over the brown Thames under a blazing sun, holding their noses while wavy green stink lines rise from the water.\", \"line\": \"In 1858, London'\''s river smelled so bad that Parliament could barely work.\"}, {\"shows\": \"old brick sewer pipes along the riverbank pour brown water straight into the Thames, flies buzz over the mud and the sun beats down on the city.\", \"line\": \"It was a scorching summer, and the Thames was full of raw sewage.\"}, {\"shows\": \"inside a grand wood-panelled hall of Parliament, cartoon lawmakers in dark coats cough, gag and fan themselves with papers beside tall open windows facing the same brown, smelly river.\", \"line\": \"The stench drifted straight into the lawmakers'\'' halls.\"}, {\"shows\": \"workers dip long heavy curtains into wooden buckets of white chloride of lime and hang them, dripping, over the tall windows on the river side, while the engineer watches hopefully.\", \"line\": \"So they soaked the curtains in chloride of lime.\"}, {\"shows\": \"a busy building site by the river: workers lay curved brick walls of a huge round sewer tunnel while the engineer unrolls a long paper plan of tunnels.\", \"line\": \"Within weeks, a new law paid for a giant network of sewers.\"}, {\"shows\": \"the engineer stands proudly in a clean, softly lit brick sewer tunnel as fresh water flows past, then the camera rises through the street to London at dusk.\", \"line\": \"Those tunnels still serve London today. Would you have held your breath?\"}]}"},
    "max_credits": '"$PRICE"'
  }')

ID=$(echo "$START" | jq -r .id)

# 3. Wait until it finishes.
while :; do
  STATUS=$(curl -s "https://staglight.ai/api/v1/studio/toon3d/runs/$ID" -H "Authorization: Bearer $STAGLIGHT_API_KEY" | jq -r .status)
  case "$STATUS" in succeeded|partial|failed) break ;; esac; sleep 10
done

# 4. Download every file in one zip.
curl -s -L -o result.zip "https://staglight.ai/api/v1/studio/toon3d/runs/$ID/outputs.zip" -H "Authorization: Bearer $STAGLIGHT_API_KEY"

What it costs

TemplateFinal, best textDraft, fast and cheap
Explainer Short488 cr248 cr

Prices from the server at the default settings. The estimate call gives the exact price for your inputs, for free.

Inputs

NameTypeAllowed
cardThe template string explain
inputs.ideaYour topic string
inputs.planThe plan string
inputs.drawSurprise story string
inputs.topicKind of Short enum story, how, whatif
inputs.lengthLength enum 30, 60
inputs.languageLanguage enum auto, en, es
qualityQuality enum final, draft
aspectShape enum 9:16, 16:9

Files are media ids from POST /api/v1/uploads. View documentation

Try it by hand

The same workflow runs in the studio, on the same balance. Use it to see the result before you write code.

Sign up to try it

More workflows