YouTube
Money Explainers
A true money story told by its numbers: gold counters that climb and charts that draw themselves
- From
- 212 crper ad
- Endpoint
POST /api/v1/studio/explainer/runs- Workflow id
explainer
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/explainer/estimate \
-H "Authorization: Bearer $STAGLIGHT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"card": "explain",
"inputs": {"plan": "{\"title\": \"The loaf that cost 200 billion marks\", \"check\": \"A loaf of bread in Berlin cost around 160 marks at the end of 1922 and 200 billion marks by late 1923 (Wikipedia: Hyperinflation in the Weimar Republic)\\nIn January 1923 French and Belgian troops occupied the Ruhr valley, Germany'\''s main industrial region\\nRuhr workers were told to resist passively; the government paid them by printing more and more banknotes, which made the hyperinflation even worse\\nBy November 1923, one US dollar was worth 4,210,500,000,000 marks\\nThe chart: 4.2 marks to the dollar in 1914, 7.9 in 1918, 48 by late 1919, about 90 in the first half of 1921, 320 in mid-1922, 7,400 by December 1922\\nAfter 12 November 1923 the central bank (Reichsbank) could no longer discount government Treasury bills, so its issue of paper marks ceased\\nA new currency, the Rentenmark, came in on 16 November 1923; by 1924 the currency had stabilised\", \"beats\": [{\"kind\": \"counter\", \"line\": \"At the end of 1922, a loaf of bread in Berlin cost about 160 marks.\", \"fields\": {\"label\": \"A LOAF OF BREAD · BERLIN\", \"from\": 160.0, \"to\": 160.0, \"unit\": \"MARKS · END OF 1922\", \"mood\": \"smile\"}}, {\"kind\": \"counter\", \"line\": \"By late 1923, that same loaf cost 200 billion.\", \"fields\": {\"label\": \"THE SAME LOAF\", \"from\": 160.0, \"to\": 200000000000.0, \"unit\": \"MARKS · LATE 1923\", \"mood\": \"worried\", \"mood_end\": \"shock\"}}, {\"kind\": \"title\", \"line\": \"So how does money lose its value that fast?\", \"fields\": {\"text\": \"HOW?\"}}, {\"kind\": \"office\", \"line\": \"In January 1923, French and Belgian troops occupied the Ruhr, Germany'\''s main industrial region.\", \"fields\": {\"board\": \"THE RUHR\", \"calendar\": \"JANUARY | 1923\"}}, {\"kind\": \"swarm\", \"line\": \"Workers there were told to resist passively, and the government paid them by printing more and more banknotes, which made the inflation even worse.\", \"fields\": {\"label\": \"PRINTING MORE MONEY\"}}, {\"kind\": \"chart\", \"line\": \"By November 1923, one US dollar was worth over 4.2 trillion marks.\", \"fields\": {\"label\": \"MARKS FOR ONE US DOLLAR\", \"points\": [[1914.0, 4.2], [1918.0, 7.9], [1919.9, 48.0], [1921.25, 90.0], [1922.5, 320.0], [1922.95, 7400.0], [1923.85, 4210500000000.0]], \"ticks\": [[1914.0, \"1914\"], [1923.85, \"NOV 1923\"]], \"end_label\": \"4,210,500,000,000\", \"end_unit\": \"MARKS · NOVEMBER 1923\"}}, {\"kind\": \"street\", \"line\": \"Then the central bank was barred from issuing marks for the government, a new currency arrived, and by 1924 the money was stable again.\", \"fields\": {\"label\": \"NOVEMBER 1923 · A NEW CURRENCY\"}}, {\"kind\": \"night\", \"line\": \"Would you have kept your savings in cash?\", \"fields\": {\"text\": \"WOULD YOU KEEP YOUR SAVINGS IN CASH?\"}}]}"}
}' | 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/explainer/runs \
-H "Authorization: Bearer $STAGLIGHT_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"card": "explain",
"inputs": {"plan": "{\"title\": \"The loaf that cost 200 billion marks\", \"check\": \"A loaf of bread in Berlin cost around 160 marks at the end of 1922 and 200 billion marks by late 1923 (Wikipedia: Hyperinflation in the Weimar Republic)\\nIn January 1923 French and Belgian troops occupied the Ruhr valley, Germany'\''s main industrial region\\nRuhr workers were told to resist passively; the government paid them by printing more and more banknotes, which made the hyperinflation even worse\\nBy November 1923, one US dollar was worth 4,210,500,000,000 marks\\nThe chart: 4.2 marks to the dollar in 1914, 7.9 in 1918, 48 by late 1919, about 90 in the first half of 1921, 320 in mid-1922, 7,400 by December 1922\\nAfter 12 November 1923 the central bank (Reichsbank) could no longer discount government Treasury bills, so its issue of paper marks ceased\\nA new currency, the Rentenmark, came in on 16 November 1923; by 1924 the currency had stabilised\", \"beats\": [{\"kind\": \"counter\", \"line\": \"At the end of 1922, a loaf of bread in Berlin cost about 160 marks.\", \"fields\": {\"label\": \"A LOAF OF BREAD · BERLIN\", \"from\": 160.0, \"to\": 160.0, \"unit\": \"MARKS · END OF 1922\", \"mood\": \"smile\"}}, {\"kind\": \"counter\", \"line\": \"By late 1923, that same loaf cost 200 billion.\", \"fields\": {\"label\": \"THE SAME LOAF\", \"from\": 160.0, \"to\": 200000000000.0, \"unit\": \"MARKS · LATE 1923\", \"mood\": \"worried\", \"mood_end\": \"shock\"}}, {\"kind\": \"title\", \"line\": \"So how does money lose its value that fast?\", \"fields\": {\"text\": \"HOW?\"}}, {\"kind\": \"office\", \"line\": \"In January 1923, French and Belgian troops occupied the Ruhr, Germany'\''s main industrial region.\", \"fields\": {\"board\": \"THE RUHR\", \"calendar\": \"JANUARY | 1923\"}}, {\"kind\": \"swarm\", \"line\": \"Workers there were told to resist passively, and the government paid them by printing more and more banknotes, which made the inflation even worse.\", \"fields\": {\"label\": \"PRINTING MORE MONEY\"}}, {\"kind\": \"chart\", \"line\": \"By November 1923, one US dollar was worth over 4.2 trillion marks.\", \"fields\": {\"label\": \"MARKS FOR ONE US DOLLAR\", \"points\": [[1914.0, 4.2], [1918.0, 7.9], [1919.9, 48.0], [1921.25, 90.0], [1922.5, 320.0], [1922.95, 7400.0], [1923.85, 4210500000000.0]], \"ticks\": [[1914.0, \"1914\"], [1923.85, \"NOV 1923\"]], \"end_label\": \"4,210,500,000,000\", \"end_unit\": \"MARKS · NOVEMBER 1923\"}}, {\"kind\": \"street\", \"line\": \"Then the central bank was barred from issuing marks for the government, a new currency arrived, and by 1924 the money was stable again.\", \"fields\": {\"label\": \"NOVEMBER 1923 · A NEW CURRENCY\"}}, {\"kind\": \"night\", \"line\": \"Would you have kept your savings in cash?\", \"fields\": {\"text\": \"WOULD YOU KEEP YOUR SAVINGS IN CASH?\"}}]}"},
"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/explainer/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/explainer/runs/$ID/outputs.zip" -H "Authorization: Bearer $STAGLIGHT_API_KEY" import os, time, uuid, requests
BASE = "https://staglight.ai"
HEADERS = {"Authorization": f"Bearer {os.environ['STAGLIGHT_API_KEY']}"}
# 1. Price it. Free, nothing is charged.
estimate = {
"card": "explain",
"inputs": {"plan": "{\"title\": \"The loaf that cost 200 billion marks\", \"check\": \"A loaf of bread in Berlin cost around 160 marks at the end of 1922 and 200 billion marks by late 1923 (Wikipedia: Hyperinflation in the Weimar Republic)\\nIn January 1923 French and Belgian troops occupied the Ruhr valley, Germany's main industrial region\\nRuhr workers were told to resist passively; the government paid them by printing more and more banknotes, which made the hyperinflation even worse\\nBy November 1923, one US dollar was worth 4,210,500,000,000 marks\\nThe chart: 4.2 marks to the dollar in 1914, 7.9 in 1918, 48 by late 1919, about 90 in the first half of 1921, 320 in mid-1922, 7,400 by December 1922\\nAfter 12 November 1923 the central bank (Reichsbank) could no longer discount government Treasury bills, so its issue of paper marks ceased\\nA new currency, the Rentenmark, came in on 16 November 1923; by 1924 the currency had stabilised\", \"beats\": [{\"kind\": \"counter\", \"line\": \"At the end of 1922, a loaf of bread in Berlin cost about 160 marks.\", \"fields\": {\"label\": \"A LOAF OF BREAD · BERLIN\", \"from\": 160.0, \"to\": 160.0, \"unit\": \"MARKS · END OF 1922\", \"mood\": \"smile\"}}, {\"kind\": \"counter\", \"line\": \"By late 1923, that same loaf cost 200 billion.\", \"fields\": {\"label\": \"THE SAME LOAF\", \"from\": 160.0, \"to\": 200000000000.0, \"unit\": \"MARKS · LATE 1923\", \"mood\": \"worried\", \"mood_end\": \"shock\"}}, {\"kind\": \"title\", \"line\": \"So how does money lose its value that fast?\", \"fields\": {\"text\": \"HOW?\"}}, {\"kind\": \"office\", \"line\": \"In January 1923, French and Belgian troops occupied the Ruhr, Germany's main industrial region.\", \"fields\": {\"board\": \"THE RUHR\", \"calendar\": \"JANUARY | 1923\"}}, {\"kind\": \"swarm\", \"line\": \"Workers there were told to resist passively, and the government paid them by printing more and more banknotes, which made the inflation even worse.\", \"fields\": {\"label\": \"PRINTING MORE MONEY\"}}, {\"kind\": \"chart\", \"line\": \"By November 1923, one US dollar was worth over 4.2 trillion marks.\", \"fields\": {\"label\": \"MARKS FOR ONE US DOLLAR\", \"points\": [[1914.0, 4.2], [1918.0, 7.9], [1919.9, 48.0], [1921.25, 90.0], [1922.5, 320.0], [1922.95, 7400.0], [1923.85, 4210500000000.0]], \"ticks\": [[1914.0, \"1914\"], [1923.85, \"NOV 1923\"]], \"end_label\": \"4,210,500,000,000\", \"end_unit\": \"MARKS · NOVEMBER 1923\"}}, {\"kind\": \"street\", \"line\": \"Then the central bank was barred from issuing marks for the government, a new currency arrived, and by 1924 the money was stable again.\", \"fields\": {\"label\": \"NOVEMBER 1923 · A NEW CURRENCY\"}}, {\"kind\": \"night\", \"line\": \"Would you have kept your savings in cash?\", \"fields\": {\"text\": \"WOULD YOU KEEP YOUR SAVINGS IN CASH?\"}}]}"}
}
price = requests.post(f"{BASE}/api/v1/studio/explainer/estimate", headers=HEADERS, json=estimate, timeout=60).json()["credits"]
print(price)
# 2. Start it. max_credits refuses anything above that price; the Idempotency-Key stops a double charge.
body = {
"card": "explain",
"inputs": {"plan": "{\"title\": \"The loaf that cost 200 billion marks\", \"check\": \"A loaf of bread in Berlin cost around 160 marks at the end of 1922 and 200 billion marks by late 1923 (Wikipedia: Hyperinflation in the Weimar Republic)\\nIn January 1923 French and Belgian troops occupied the Ruhr valley, Germany's main industrial region\\nRuhr workers were told to resist passively; the government paid them by printing more and more banknotes, which made the hyperinflation even worse\\nBy November 1923, one US dollar was worth 4,210,500,000,000 marks\\nThe chart: 4.2 marks to the dollar in 1914, 7.9 in 1918, 48 by late 1919, about 90 in the first half of 1921, 320 in mid-1922, 7,400 by December 1922\\nAfter 12 November 1923 the central bank (Reichsbank) could no longer discount government Treasury bills, so its issue of paper marks ceased\\nA new currency, the Rentenmark, came in on 16 November 1923; by 1924 the currency had stabilised\", \"beats\": [{\"kind\": \"counter\", \"line\": \"At the end of 1922, a loaf of bread in Berlin cost about 160 marks.\", \"fields\": {\"label\": \"A LOAF OF BREAD · BERLIN\", \"from\": 160.0, \"to\": 160.0, \"unit\": \"MARKS · END OF 1922\", \"mood\": \"smile\"}}, {\"kind\": \"counter\", \"line\": \"By late 1923, that same loaf cost 200 billion.\", \"fields\": {\"label\": \"THE SAME LOAF\", \"from\": 160.0, \"to\": 200000000000.0, \"unit\": \"MARKS · LATE 1923\", \"mood\": \"worried\", \"mood_end\": \"shock\"}}, {\"kind\": \"title\", \"line\": \"So how does money lose its value that fast?\", \"fields\": {\"text\": \"HOW?\"}}, {\"kind\": \"office\", \"line\": \"In January 1923, French and Belgian troops occupied the Ruhr, Germany's main industrial region.\", \"fields\": {\"board\": \"THE RUHR\", \"calendar\": \"JANUARY | 1923\"}}, {\"kind\": \"swarm\", \"line\": \"Workers there were told to resist passively, and the government paid them by printing more and more banknotes, which made the inflation even worse.\", \"fields\": {\"label\": \"PRINTING MORE MONEY\"}}, {\"kind\": \"chart\", \"line\": \"By November 1923, one US dollar was worth over 4.2 trillion marks.\", \"fields\": {\"label\": \"MARKS FOR ONE US DOLLAR\", \"points\": [[1914.0, 4.2], [1918.0, 7.9], [1919.9, 48.0], [1921.25, 90.0], [1922.5, 320.0], [1922.95, 7400.0], [1923.85, 4210500000000.0]], \"ticks\": [[1914.0, \"1914\"], [1923.85, \"NOV 1923\"]], \"end_label\": \"4,210,500,000,000\", \"end_unit\": \"MARKS · NOVEMBER 1923\"}}, {\"kind\": \"street\", \"line\": \"Then the central bank was barred from issuing marks for the government, a new currency arrived, and by 1924 the money was stable again.\", \"fields\": {\"label\": \"NOVEMBER 1923 · A NEW CURRENCY\"}}, {\"kind\": \"night\", \"line\": \"Would you have kept your savings in cash?\", \"fields\": {\"text\": \"WOULD YOU KEEP YOUR SAVINGS IN CASH?\"}}]}"},
"max_credits": 212
}
body["max_credits"] = price
r = requests.post(f"{BASE}/api/v1/studio/explainer/runs", json=body, timeout=60,
headers={**HEADERS, "Idempotency-Key": str(uuid.uuid4())})
r.raise_for_status()
start = r.json()
# 3. Wait until it finishes.
while True:
run = requests.get(f"{BASE}/api/v1/studio/explainer/runs/{start['id']}", headers=HEADERS, timeout=60).json()
if run["status"] in ("succeeded", "partial", "failed"):
break
time.sleep(10)
# 4. Download every file in one zip.
with open("result.zip", "wb") as out:
out.write(requests.get(f"{BASE}/api/v1/studio/explainer/runs/{start['id']}/outputs.zip", headers=HEADERS, timeout=300).content) // Node 18 or newer. Save as run.mjs: top-level await needs a module.
const BASE = "https://staglight.ai";
const headers = { Authorization: `Bearer ${process.env.STAGLIGHT_API_KEY}` };
const json = { ...headers, "Content-Type": "application/json" };
// 1. Price it. Free, nothing is charged.
const estimate = {
"card": "explain",
"inputs": {"plan": "{\"title\": \"The loaf that cost 200 billion marks\", \"check\": \"A loaf of bread in Berlin cost around 160 marks at the end of 1922 and 200 billion marks by late 1923 (Wikipedia: Hyperinflation in the Weimar Republic)\\nIn January 1923 French and Belgian troops occupied the Ruhr valley, Germany's main industrial region\\nRuhr workers were told to resist passively; the government paid them by printing more and more banknotes, which made the hyperinflation even worse\\nBy November 1923, one US dollar was worth 4,210,500,000,000 marks\\nThe chart: 4.2 marks to the dollar in 1914, 7.9 in 1918, 48 by late 1919, about 90 in the first half of 1921, 320 in mid-1922, 7,400 by December 1922\\nAfter 12 November 1923 the central bank (Reichsbank) could no longer discount government Treasury bills, so its issue of paper marks ceased\\nA new currency, the Rentenmark, came in on 16 November 1923; by 1924 the currency had stabilised\", \"beats\": [{\"kind\": \"counter\", \"line\": \"At the end of 1922, a loaf of bread in Berlin cost about 160 marks.\", \"fields\": {\"label\": \"A LOAF OF BREAD · BERLIN\", \"from\": 160.0, \"to\": 160.0, \"unit\": \"MARKS · END OF 1922\", \"mood\": \"smile\"}}, {\"kind\": \"counter\", \"line\": \"By late 1923, that same loaf cost 200 billion.\", \"fields\": {\"label\": \"THE SAME LOAF\", \"from\": 160.0, \"to\": 200000000000.0, \"unit\": \"MARKS · LATE 1923\", \"mood\": \"worried\", \"mood_end\": \"shock\"}}, {\"kind\": \"title\", \"line\": \"So how does money lose its value that fast?\", \"fields\": {\"text\": \"HOW?\"}}, {\"kind\": \"office\", \"line\": \"In January 1923, French and Belgian troops occupied the Ruhr, Germany's main industrial region.\", \"fields\": {\"board\": \"THE RUHR\", \"calendar\": \"JANUARY | 1923\"}}, {\"kind\": \"swarm\", \"line\": \"Workers there were told to resist passively, and the government paid them by printing more and more banknotes, which made the inflation even worse.\", \"fields\": {\"label\": \"PRINTING MORE MONEY\"}}, {\"kind\": \"chart\", \"line\": \"By November 1923, one US dollar was worth over 4.2 trillion marks.\", \"fields\": {\"label\": \"MARKS FOR ONE US DOLLAR\", \"points\": [[1914.0, 4.2], [1918.0, 7.9], [1919.9, 48.0], [1921.25, 90.0], [1922.5, 320.0], [1922.95, 7400.0], [1923.85, 4210500000000.0]], \"ticks\": [[1914.0, \"1914\"], [1923.85, \"NOV 1923\"]], \"end_label\": \"4,210,500,000,000\", \"end_unit\": \"MARKS · NOVEMBER 1923\"}}, {\"kind\": \"street\", \"line\": \"Then the central bank was barred from issuing marks for the government, a new currency arrived, and by 1924 the money was stable again.\", \"fields\": {\"label\": \"NOVEMBER 1923 · A NEW CURRENCY\"}}, {\"kind\": \"night\", \"line\": \"Would you have kept your savings in cash?\", \"fields\": {\"text\": \"WOULD YOU KEEP YOUR SAVINGS IN CASH?\"}}]}"}
};
const price = await (await fetch(`${BASE}/api/v1/studio/explainer/estimate`, { method: "POST", headers: json, body: JSON.stringify(estimate) })).json();
console.log(price.credits);
// 2. Start it. max_credits refuses anything above that price; the Idempotency-Key stops a double charge.
const body = {
"card": "explain",
"inputs": {"plan": "{\"title\": \"The loaf that cost 200 billion marks\", \"check\": \"A loaf of bread in Berlin cost around 160 marks at the end of 1922 and 200 billion marks by late 1923 (Wikipedia: Hyperinflation in the Weimar Republic)\\nIn January 1923 French and Belgian troops occupied the Ruhr valley, Germany's main industrial region\\nRuhr workers were told to resist passively; the government paid them by printing more and more banknotes, which made the hyperinflation even worse\\nBy November 1923, one US dollar was worth 4,210,500,000,000 marks\\nThe chart: 4.2 marks to the dollar in 1914, 7.9 in 1918, 48 by late 1919, about 90 in the first half of 1921, 320 in mid-1922, 7,400 by December 1922\\nAfter 12 November 1923 the central bank (Reichsbank) could no longer discount government Treasury bills, so its issue of paper marks ceased\\nA new currency, the Rentenmark, came in on 16 November 1923; by 1924 the currency had stabilised\", \"beats\": [{\"kind\": \"counter\", \"line\": \"At the end of 1922, a loaf of bread in Berlin cost about 160 marks.\", \"fields\": {\"label\": \"A LOAF OF BREAD · BERLIN\", \"from\": 160.0, \"to\": 160.0, \"unit\": \"MARKS · END OF 1922\", \"mood\": \"smile\"}}, {\"kind\": \"counter\", \"line\": \"By late 1923, that same loaf cost 200 billion.\", \"fields\": {\"label\": \"THE SAME LOAF\", \"from\": 160.0, \"to\": 200000000000.0, \"unit\": \"MARKS · LATE 1923\", \"mood\": \"worried\", \"mood_end\": \"shock\"}}, {\"kind\": \"title\", \"line\": \"So how does money lose its value that fast?\", \"fields\": {\"text\": \"HOW?\"}}, {\"kind\": \"office\", \"line\": \"In January 1923, French and Belgian troops occupied the Ruhr, Germany's main industrial region.\", \"fields\": {\"board\": \"THE RUHR\", \"calendar\": \"JANUARY | 1923\"}}, {\"kind\": \"swarm\", \"line\": \"Workers there were told to resist passively, and the government paid them by printing more and more banknotes, which made the inflation even worse.\", \"fields\": {\"label\": \"PRINTING MORE MONEY\"}}, {\"kind\": \"chart\", \"line\": \"By November 1923, one US dollar was worth over 4.2 trillion marks.\", \"fields\": {\"label\": \"MARKS FOR ONE US DOLLAR\", \"points\": [[1914.0, 4.2], [1918.0, 7.9], [1919.9, 48.0], [1921.25, 90.0], [1922.5, 320.0], [1922.95, 7400.0], [1923.85, 4210500000000.0]], \"ticks\": [[1914.0, \"1914\"], [1923.85, \"NOV 1923\"]], \"end_label\": \"4,210,500,000,000\", \"end_unit\": \"MARKS · NOVEMBER 1923\"}}, {\"kind\": \"street\", \"line\": \"Then the central bank was barred from issuing marks for the government, a new currency arrived, and by 1924 the money was stable again.\", \"fields\": {\"label\": \"NOVEMBER 1923 · A NEW CURRENCY\"}}, {\"kind\": \"night\", \"line\": \"Would you have kept your savings in cash?\", \"fields\": {\"text\": \"WOULD YOU KEEP YOUR SAVINGS IN CASH?\"}}]}"},
"max_credits": 212
};
body.max_credits = price.credits;
const res = await fetch(`${BASE}/api/v1/studio/explainer/runs`, {
method: "POST", headers: { ...json, "Idempotency-Key": crypto.randomUUID() }, body: JSON.stringify(body),
});
if (!res.ok) throw new Error((await res.json()).error.message);
const start = await res.json();
// 3. Wait until it finishes.
let run = start;
while (!["succeeded", "partial", "failed"].includes(run.status)) {
await new Promise((r) => setTimeout(r, 10000));
run = await (await fetch(`${BASE}/api/v1/studio/explainer/runs/${start.id}`, { headers })).json();
}
// 4. Download every file in one zip.
console.log(`${BASE}/api/v1/studio/explainer/runs/${start.id}/outputs.zip`); Use the Staglight API to run the workflow "Money Explainers" from server code.
Docs: https://staglight.ai/llms.txt
This workflow: https://staglight.ai/en/api/workflows/explainer
Key: read it from the STAGLIGHT_API_KEY environment variable. Never put it in browser code.
1. Price it for free first: POST /api/v1/studio/explainer/estimate
2. Start it: POST /api/v1/studio/explainer/runs, with an Idempotency-Key header and max_credits.
Body: {"card": "explain", "inputs": {"plan": "{\"title\": \"The loaf that cost 200 billion marks\", \"check\": \"A loaf of bread in Berlin cost around 160 marks at the end of 1922 and 200 billion marks by late 1923 (Wikipedia: Hyperinflation in the Weimar Republic)\\nIn January 1923 French and Belgian troops occupied the Ruhr valley, Germany's main industrial region\\nRuhr workers were told to resist passively; the government paid them by printing more and more banknotes, which made the hyperinflation even worse\\nBy November 1923, one US dollar was worth 4,210,500,000,000 marks\\nThe chart: 4.2 marks to the dollar in 1914, 7.9 in 1918, 48 by late 1919, about 90 in the first half of 1921, 320 in mid-1922, 7,400 by December 1922\\nAfter 12 November 1923 the central bank (Reichsbank) could no longer discount government Treasury bills, so its issue of paper marks ceased\\nA new currency, the Rentenmark, came in on 16 November 1923; by 1924 the currency had stabilised\", \"beats\": [{\"kind\": \"counter\", \"line\": \"At the end of 1922, a loaf of bread in Berlin cost about 160 marks.\", \"fields\": {\"label\": \"A LOAF OF BREAD · BERLIN\", \"from\": 160.0, \"to\": 160.0, \"unit\": \"MARKS · END OF 1922\", \"mood\": \"smile\"}}, {\"kind\": \"counter\", \"line\": \"By late 1923, that same loaf cost 200 billion.\", \"fields\": {\"label\": \"THE SAME LOAF\", \"from\": 160.0, \"to\": 200000000000.0, \"unit\": \"MARKS · LATE 1923\", \"mood\": \"worried\", \"mood_end\": \"shock\"}}, {\"kind\": \"title\", \"line\": \"So how does money lose its value that fast?\", \"fields\": {\"text\": \"HOW?\"}}, {\"kind\": \"office\", \"line\": \"In January 1923, French and Belgian troops occupied the Ruhr, Germany's main industrial region.\", \"fields\": {\"board\": \"THE RUHR\", \"calendar\": \"JANUARY | 1923\"}}, {\"kind\": \"swarm\", \"line\": \"Workers there were told to resist passively, and the government paid them by printing more and more banknotes, which made the inflation even worse.\", \"fields\": {\"label\": \"PRINTING MORE MONEY\"}}, {\"kind\": \"chart\", \"line\": \"By November 1923, one US dollar was worth over 4.2 trillion marks.\", \"fields\": {\"label\": \"MARKS FOR ONE US DOLLAR\", \"points\": [[1914.0, 4.2], [1918.0, 7.9], [1919.9, 48.0], [1921.25, 90.0], [1922.5, 320.0], [1922.95, 7400.0], [1923.85, 4210500000000.0]], \"ticks\": [[1914.0, \"1914\"], [1923.85, \"NOV 1923\"]], \"end_label\": \"4,210,500,000,000\", \"end_unit\": \"MARKS · NOVEMBER 1923\"}}, {\"kind\": \"street\", \"line\": \"Then the central bank was barred from issuing marks for the government, a new currency arrived, and by 1924 the money was stable again.\", \"fields\": {\"label\": \"NOVEMBER 1923 · A NEW CURRENCY\"}}, {\"kind\": \"night\", \"line\": \"Would you have kept your savings in cash?\", \"fields\": {\"text\": \"WOULD YOU KEEP YOUR SAVINGS IN CASH?\"}}]}"}, "max_credits": 212}
Files are media ids from POST /api/v1/uploads.
3. After a timeout, check the job list before you retry, and retry with the same Idempotency-Key.
4. Poll the run until it finishes, then download its outputs.zip. What it costs
| Template | Final, best text |
|---|---|
| Money explainer | 212 cr |
Prices from the server at the default settings. The estimate call gives the exact price for your inputs, for free.
Inputs
| Name | Type | Allowed |
|---|---|---|
cardThe template | string | explain |
inputs.ideaYour topic | string | |
inputs.planThe plan | string | |
inputs.languageLanguage | enum | auto, en, es |
qualityQuality | enum | final |
aspectShape | enum | 9:16 |
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.
More workflows
- Real output YouTube
Ranking Shorts
Five crazy levels, ranked #5 to #1, in one vertical Short
per ad, from190 cr
- Real output YouTube
Glow-up Series
An animated series in your language where your audience votes what changes each day
per ad, from216 cr
- Real output YouTube
Motion Math
Any idea becomes a neon maths Short, with the real number worked out and shown happening
per ad, from100 cr