OpenAI credits
Refill the balance behind GPT and the OpenAI API so completion, embedding and tool calls never stall mid-task. The agent tops up in the exact amount it needs.
A long-running agent burns through the API credits that keep it alive. AgentRefills lets it notice a low balance and refill its own OpenAI, Anthropic or Perplexity account through one call. Small top-ups clear automatically, large ones wait for a human, and every dollar is governed by caps you set.
Buy prepaid credit for the model and search providers your agent depends on, redeemable straight into the account it already uses. All priced in integer minor units, so there is never a rounding surprise.
Refill the balance behind GPT and the OpenAI API so completion, embedding and tool calls never stall mid-task. The agent tops up in the exact amount it needs.
Keep Claude API usage funded for reasoning-heavy, long-horizon work. When usage climbs, the agent buys more credit rather than hitting a hard wall.
Top up Perplexity so retrieval and live-search steps stay online. Research agents keep querying without a human refilling the account by hand.
The catalog keeps growing across model, search and infrastructure providers. Call list_brands to see what is available in your region right now.
The agent watches its own balance, buys more credit when it runs low, and hands off to a human only when the amount crosses your threshold. Same six tools over MCP or REST, same semantics.
# 1. The agent notices it is running low bal = client.check_balance() if bal.remaining_minor < 2000: # 2. Buy more of the credit it runs on. # amount in integer minor units (cents). task = client.buy_giftcard( brand="openai-credits", amount_minor=2500, # $25.00 client_ref="refill-2026-07-08", # idempotent ) # 3. Small top-up? It clears now. # Over the threshold? Parked for approval, # a human is pinged in Slack. if task.status == "APPROVAL_REQUIRED": client.request_approval(task.task_id) # 4. Redeem the code once, then keep working. code = client.get_code(task.task_id)
client_ref means a retried refill returns the same task and never charges twice.Handing an agent the ability to refuel itself sounds risky. It is not, because every refill runs inside caps, approvals and a ledger you control.
Long-running and overnight jobs no longer die when a balance hits zero. The agent refills the credit it runs on and carries on with the task.
You set the daily cap, the monthly cap and the approval line. The agent operates freely inside those limits and cannot spend past them.
Agents draw from a pre-funded balance with per-agent keys, not a human card pasted into a config. Revoke one key without touching the rest.
Every refill lands in a double-entry ledger and an OpenTelemetry trace. Reconstruct exactly what was bought, when, and under whose approval.
Small refills never bother anyone. Large ones stop and wait, pinged to Slack, so a person signs off before real money moves.
A free sandbox mode lets the whole refill loop run end to end with no real money, so you can prove the behavior before flipping to live.
Issue a per-agent key, set your caps and approval line, and let the agent keep its own credits topped up. Start free in sandbox.