API Get key

YouTube

Motion Math

Any idea becomes a neon maths Short, with the real number worked out and shown happening

From
100 crper ad
Endpoint
POST /api/v1/studio/counter/runs
Workflow id
counter

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/counter/estimate \
  -H "Authorization: Bearer $STAGLIGHT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "card": "stack"
  }' | 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/counter/runs \
  -H "Authorization: Bearer $STAGLIGHT_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "card": "stack",
    "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/counter/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/counter/runs/$ID/outputs.zip" -H "Authorization: Bearer $STAGLIGHT_API_KEY"

What it costs

TemplateFinal, best text
Stack it100 cr
Double it100 cr
Fall from it100 cr
Halve it100 cr
Fit it100 cr
Odds pile100 cr
Race100 cr
How long100 cr
Size line-up136 cr
Clacks100 cr
Surprise me100 cr

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

Inputs

NameTypeAllowed
cardrequiredThe template string stack, double, fall, halve, fit, odds, race, rate, compare, clacks, surprise
inputs.ideaYour idea string
inputs.itemStack what enum random, paper, bill, card, penny, lego, can, person
inputs.targetReach where enum random, eiffel, burj, everest, plane, space, iss, gps, ...
inputs.fall_fromFall from where enum random, eiffel, burj, everest, plane, space, iss, gps, ...
inputs.cut_itemCut what enum random, a4, card, person
inputs.smallDown to enum random, hair, cell, bacterium, virus, dna, atom
inputs.containerFill what enum random, basketball, earth, jupiter, sun
inputs.ballWith what enum random, earth, golf, moon, pingpong, tennis
inputs.own_smallYour tiny thing string
inputs.own_small_mmIts size (mm) string
inputs.own_ballWhat goes inside string
inputs.own_ball_mmIts width (mm) string
inputs.own_containerYour container string
inputs.own_container_lIts volume (litres) string
inputs.odds_whatWhat is rare string
inputs.odds_one_inOdds: 1 in string
inputs.odds_exactExact odds (a game of chance) bool
inputs.race_1Racer 1 string
inputs.race_1_kmhRacer 1 speed (km/h) string
inputs.race_2Racer 2 string
inputs.race_2_kmhRacer 2 speed (km/h) string
inputs.race_3Racer 3 string
inputs.race_3_kmhRacer 3 speed (km/h) string
inputs.race_4Racer 4 string
inputs.race_4_kmhRacer 4 speed (km/h) string
inputs.race_kmRace distance (km) string
inputs.rate_taskThe job string
inputs.rate_unitCounted in string
inputs.rate_totalHow much in all string
inputs.rate_perHow much each period string
inputs.rate_periodPeriod enum second, minute, hour, day, year
inputs.cmp_1Thing 1 string
inputs.cmp_1_mThing 1 size (m) string
inputs.cmp_1_byThing 1 size measures enum , height, length
inputs.cmp_1_picThing 1 picture (English words) string
inputs.cmp_2Thing 2 string
inputs.cmp_2_mThing 2 size (m) string
inputs.cmp_2_byThing 2 size measures enum , height, length
inputs.cmp_2_picThing 2 picture (English words) string
inputs.cmp_3Thing 3 string
inputs.cmp_3_mThing 3 size (m) string
inputs.cmp_3_byThing 3 size measures enum , height, length
inputs.cmp_3_picThing 3 picture (English words) string
inputs.cmp_4Thing 4 string
inputs.cmp_4_mThing 4 size (m) string
inputs.cmp_4_byThing 4 size measures enum , height, length
inputs.cmp_4_picThing 4 picture (English words) string
inputs.cmp_5Thing 5 string
inputs.cmp_5_mThing 5 size (m) string
inputs.cmp_5_byThing 5 size measures enum , height, length
inputs.cmp_5_picThing 5 picture (English words) string
inputs.cmp_6Thing 6 string
inputs.cmp_6_mThing 6 size (m) string
inputs.cmp_6_byThing 6 size measures enum , height, length
inputs.cmp_6_picThing 6 picture (English words) string
inputs.cmp_7Thing 7 string
inputs.cmp_7_mThing 7 size (m) string
inputs.cmp_7_byThing 7 size measures enum , height, length
inputs.cmp_7_picThing 7 picture (English words) string
inputs.cmp_8Thing 8 string
inputs.cmp_8_mThing 8 size (m) string
inputs.cmp_8_byThing 8 size measures enum , height, length
inputs.cmp_8_picThing 8 picture (English words) string
inputs.cmp_9Thing 9 string
inputs.cmp_9_mThing 9 size (m) string
inputs.cmp_9_byThing 9 size measures enum , height, length
inputs.cmp_9_picThing 9 picture (English words) string
inputs.cmp_10Thing 10 string
inputs.cmp_10_mThing 10 size (m) string
inputs.cmp_10_byThing 10 size measures enum , height, length
inputs.cmp_10_picThing 10 picture (English words) string
inputs.cmp_11Thing 11 string
inputs.cmp_11_mThing 11 size (m) string
inputs.cmp_11_byThing 11 size measures enum , height, length
inputs.cmp_11_picThing 11 picture (English words) string
inputs.clacks_digitsDigits of pi enum 1, 2, 3, 4, 5
inputs.themeColour enum random, blue, mint, red, amber, pink, violet, white
inputs.own_colorYour own colour string
inputs.handleChannel name on the video string
inputs.languageLanguage enum auto, en, es
inputs.questionYour own wording string
inputs.own_itemYour item string
inputs.own_size_mmIts height in mm string
inputs.own_targetYour place string
inputs.own_target_kmHow far in km string
inputs.own_aboutSizes are rough figures bool
inputs.drawSurprise question string
inputs.picturesPictures of each thing bool
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.

Sign up to try it

More workflows