PopNowAPI Docs
Agents and MCP
Main content

Your recipes, workflows and skills

Run saved recipes and workflows through the API or MCP. Quote and approve a USD budget, follow each step, and resume paused runs with the original API key.

Reuse what you saved on popnow.ai: a recipe saved from Studio with its model, prompt, settings and files; a canvas workflow whose steps use earlier results; or a Poppie skill containing instructions another assistant can follow.

Items stay private to you and the teams you share them with. A teammate's recipe prompt is not returned; the server assembles it at run time. Runs through the REST API or the developer MCP spend your PopNow balance in USD. A new account starts at $0; add funds in API billing.

At a glance

ListGET /api/v1/recipes for recipes and workflows; GET /api/v1/skills for skills
InspectGET /api/v1/recipes/{id} returns inputs and, when available, estimated_usd
Quote and runPOST /api/v1/recipes/{id}/run: quote first, then approve currency, max_usd and quote_id
FollowGET /api/v1/recipes/runs/{runId} with the key that started it
ResumePOST /api/v1/recipes/runs/{runId}/resume: quote a paused run, then approve its total budget
Over MCPlist_my_recipes, run_my_recipe, get_recipe_run, resume_recipe_run, list_my_skills, use_my_skill on the developer MCP
Find IDsDeveloper console / Recipes & skills

Find what you can run

List recipes and workflows
curl "https://api.popnow.ai/api/v1/recipes?kind=recipe" \
  -H "Authorization: Bearer $POPNOW_API_KEY"

Omit kind to list both recipes and workflows. Your own items appear first, followed by items shared with your teams (mine: false, with teamId). Each item describes its inputs:

Response
{
  "code": 200,
  "msg": "success",
  "data": {
    "items": [{
      "id": "svd_01jbq8x4m2c7d9f3h5k6n8p0rt",
      "kind": "recipe",
      "name": "Weekly post",
      "mine": true,
      "media": "image",
      "currency": "USD",
      "inputs": [
        { "id": "image_urls", "label": "Product", "media": "image", "multiple": false, "required": false },
        { "id": "prompt", "label": "Prompt", "media": "text", "multiple": false, "required": false }
      ],
      "steps": 1,
      "updatedAt": "2026-10-23T09:12:00Z"
    }]
  }
}

Read an item for its current estimate with the saved files:

Inspect one recipe
curl https://api.popnow.ai/api/v1/recipes/svd_01jbq8x4m2c7d9f3h5k6n8p0rt \
  -H "Authorization: Bearer $POPNOW_API_KEY"

Metadata uses currency: "USD" and an optional estimated_usd. This estimate is not execution approval: send the actual inputs to POST /run to obtain a quote_id.

Run it

First send the intended inputs and count without approval fields. A quote creates no run and holds no funds; it needs no Idempotency-Key.

Quote a recipe
curl https://api.popnow.ai/api/v1/recipes/svd_01jbq8x4m2c7d9f3h5k6n8p0rt/run \
  -H "Authorization: Bearer $POPNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{},"count":1}'
Quote response
{
  "code": 200,
  "msg": "success",
  "data": {
    "currency": "USD",
    "cost_usd": "0.048",
    "available_usd": "5",
    "spent_usd": "0",
    "quote_id": "quote_from_server",
    "needs_confirmation": true
  }
}

After reviewing and approving the amount, repeat the same inputs and count with currency: "USD", a decimal-string max_usd and the returned quote_id. Execution needs an Idempotency-Key of 1–100 characters; reuse that key when retrying the same submission.

Confirm the quoted budget
# Set QUOTE_ID to the quote_id returned above, after reviewing the quote.
curl https://api.popnow.ai/api/v1/recipes/svd_01jbq8x4m2c7d9f3h5k6n8p0rt/run \
  -H "Authorization: Bearer $POPNOW_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d "{\"inputs\":{},\"count\":1,\"currency\":\"USD\",\"max_usd\":\"0.048\",\"quote_id\":\"$QUOTE_ID\"}"

A successful start returns needs_confirmation: false, run_id, state and the approved max_usd. If the price exceeds the limit or the quote no longer matches, the response instead has needs_confirmation: true and a new quote; no run starts. Show the new amount and ask again. HTTP 200 alone does not mean work started.

max_usd is a nonnegative decimal string with up to nine decimal places. JSON numbers, negatives, exponent notation, unknown fields and old maxCredits / max_credits approvals are rejected rather than converted. Supplying max_usd without quote_id is invalid. A zero-price quote still needs explicit approval.

What the inputs are

Input IDsAccepts
RecipeSaved model file fields such as image_urls, first_frame_url or refs; prompt replaces the saved promptA file reference, a list of references, or plain text
Workflowin1, in2 … in the listed order; text inputs fill a step without its own promptThe same

Files can be an https URL, popnow://g/<job>/<n> from an earlier result, popnow://f/<file> from an upload, or popnow://a/<asset> from an API asset. Omitted inputs reuse saved files. count is 1–4 for recipes; workflows run once. Invalid inputs return 400 with param: inputs.<id>.

A workflow may need an earlier output before a step can be priced. Its quote then includes unpriced_steps: cost_usd covers only the steps currently priced, not the complete workflow. Unpriced steps cannot execute. Once their inputs are ready, the run pauses for a fresh resume quote and approval. Unpriced does not mean free.

Follow a run

Use the same API key that started it. Another key on the same account cannot read or resume the run.

Check progress
curl https://api.popnow.ai/api/v1/recipes/runs/sfg_01jbq9a3d5f7g9h2k4m6n8p0qs \
  -H "Authorization: Bearer $POPNOW_API_KEY"
Completed run
{
  "code": 200,
  "msg": "success",
  "data": {
    "currency": "USD",
    "run_id": "sfg_01jbq9a3d5f7g9h2k4m6n8p0qs",
    "state": "done",
    "cost_usd": "0.048",
    "available_usd": "4.952",
    "spent_usd": "0.048",
    "max_usd": "0.048",
    "needs_confirmation": false,
    "items": [
      { "stepId": "r1", "state": "succeeded", "jobId": "job_01jbq9a6v8w0x2y4z6a8b0c2d4", "uri": "popnow://g/job_01jbq9a6v8w0x2y4z6a8b0c2d4/0" }
    ]
  }
}

state is draft, running, paused, done, stopped or failed. Poll while it is draft or running. For paused, inspect pause_reason and obtain a resume quote once the issue is resolved. items retains stepId, state, jobId and uri; recordInfo returns each task's download links.

spent_usd is the net actual charge to the API balance, including returned funds. cost_usd is an estimate, not the settled charge. All amounts are USD decimal strings.

Resume a paused run

Send {} to get a new quote:

Quote a resume
curl https://api.popnow.ai/api/v1/recipes/runs/sfg_01jbq9a3d5f7g9h2k4m6n8p0qs/resume \
  -H "Authorization: Bearer $POPNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

After review, repeat with currency: "USD", max_usd and the new quote_id. This is the total budget for the whole run, including spent funds and in-flight commitments, not an additional allowance. Original inputs and count cannot change.

Resume needs no Idempotency-Key. Concurrent requests cannot resume work twice; an already resumed run returns a conflict. The original key, payment account and source context remain attached. If the key's IP policy changes, start a new run from an allowed source rather than bypassing the pause.

Skills

Read a skill
curl https://api.popnow.ai/api/v1/skills/skl_01jbpz7c9e1g3j5m7q9s1v3x5z \
  -H "Authorization: Bearer $POPNOW_API_KEY"

GET /api/v1/skills lists your skills and those shared with your teams. GET /api/v1/skills/{id} adds their Markdown body. A team skill shared as use only (shareMode: "use") has no body: it works in PopNow while its instructions stay hidden.

Over the developer MCP

Connect the developer MCP and ask your coding agent to “run my recipe Weekly post with this image”. The same API key, USD balance and rules apply as on REST.

ToolWhat it doesParameters
list_my_recipesLists recipes and workflows, including shared itemsnone
run_my_recipeQuotes first, then starts with the approved budgetrecipe_id, inputs, count; to approve: max_usd, quote_id, idempotency_key
get_recipe_runReads state, costs and resultsrun_id
resume_recipe_runQuotes and resumes a paused runrun_id, then max_usd, quote_id
list_my_skillsLists your skills and your teams' skillsnone
use_my_skillReturns readable skill instructionsskill_id

The quote, approval, total-budget and same-key rules above apply unchanged; currency is optional and can only be USD. Confirming run_my_recipe also requires an idempotency_key string of 1–100 characters; quoting does not. If the response is lost, retry with the same key and all the same parameters to recover the accepted run, even if the recipe or price has since changed. Use a new key only for a separately approved run. Changing parameters under the same key returns a conflict. resume_recipe_run needs no new idempotency key; it uses the original run's state to prevent duplicate work.

Limits and errors

Each USD step rechecks key status, expiry, model permissions, spending limits and API balance. The budget includes spent funds, in-flight holds and reserved work; technical retries count too. A price change as small as $0.000000001 pauses execution for approval. Total budgets are limited to $10,000, with $1,000 per step.

Status or resultWhen
needs_confirmation: trueInitial quote, changed price or quote mismatch; review and approve
400Invalid inputs or USD approval, an old integer cap (maxCredits / max_credits), or an over-limit budget
402Insufficient API funds or an applicable spending cap would be exceeded
403The key or its permissions do not allow the work
404The saved item or run is unavailable to this caller
409The run cannot resume in its current state, workflow inputs are not ready, or the saved model was retired

Can other people see or run my recipes?

Only you and teams you share with can access saved items. There is no public catalog or access by guessing an ID. A shared recipe's prompt is never returned to a teammate.

Who pays when I run a recipe my team shared?

You do. Runs are billed to your own API balance in USD. Review the quote and approve the budget first.

Do I need to upload my files again for each run?

No. Use an https URL or a popnow:// reference from a result, upload or API asset. Omitted inputs reuse saved files.

What happens when the model a recipe used is retired?

The run cannot start. Open the recipe on popnow.ai, choose an available model and save it again, then request a fresh quote.

Is there an SDK for recipes?

Use these JSON-over-HTTPS examples or an HTTP client, preserving USD as strings. Older SDK examples that approve runs with an integer maxCredits cap no longer work.

On this page