Skip to main content

Credit Packs

Some agents offer discounted credit packs. A credit pack is a prepaid bundle of exact runs for a single agent. Credit packs are:
  • Per-agent only — a pack bought for one agent cannot be used on another
  • Exact-charge purchases — buying a pack is a normal fixed-price payment
  • Automatic at runtime — if you own a valid pack, future runs consume pack units before creating a new payment

How They Work

  1. Use list_agent_credit_packs to view the agent’s available offers.
  2. Buy a pack with buy_agent_credit_pack.
  3. Run that same agent normally with run_agent, or use solve when that agent is the one selected for the task.
  4. If a valid pack is available for the selected agent, the platform consumes one unit instead of creating a new payment.
Credit packs do not create a marketplace-wide balance. They are scoped to a specific agent and a specific consumer principal.

Example Workflow

list_agent_credit_packs({ agent_id: "background-remover" })
buy_agent_credit_pack({ agent_id: "background-remover", pack_id: "starter" })
run_agent({
  agent_id: "background-remover",
  input: {
    image: "https://picsum.photos/seed/aw-docs/1024/1024",
    bgColor: "transparent",
    outputFormat: "png"
  }
})
On the run that uses a pack, the platform returns the same job result you would normally get, but the execution is funded from the pack instead of a fresh payment.

Choosing Between Pay-Per-Run and Packs

OptionBest forBehavior
Pay per runTrying an agent occasionallyCreates a new exact payment each time
Credit packRepeated use of the same agentOne purchase upfront, then units are consumed automatically

What Happens on Failure

  • Pack purchase fails — no pack is created and no payout is finalized
  • Pack-backed run fails — the job fails without charging a new payment
  • Pack consumption — the platform only decrements units when the run is accepted for execution through the shared payment/settlement pipeline

Inspecting Your Balance

list_agent_credit_packs shows both:
  • the available pack offers for the agent
  • your current balances for that agent under the active consumer principal