Skip to main content
Every photo past your plan’s included ones costs US$0.20 from your credit balance. An agent can top that balance up by itself, with a card a person saved once and a monthly cap that person agreed to. Through the API every feature (condition, expected object) works on any plan; credits only pay for the photos.

Save a card, once

A person has to do this step: the agent asks for a link and hands it over.
The Stripe page shows the cap above the button: saving the card is agreeing to it. Nothing changes until they finish, and the link expires after an hour. To change the card or the cap, ask for a new link; the API can’t raise the cap on its own.

Buy a pack

Packs are 50, 250 or 1000 photos (US$10, US$50, US$200). The card is charged with nobody present and the credits land at once. Send the same idempotencyKey to retry the same purchase: it is charged at most once, even days later. A different pack under a used key is refused (409 idempotency_key_reused). Leave the key out and the SDK makes one per call.

Check the balance

When a purchase is refused

Nothing is charged in any of these. If Stripe doesn’t answer, you get 503 payment_status_unknown with the idempotency_key to retry with: the card may have been charged, and retrying with that key never charges twice.

From an AI agent

The Rial MCP server exposes the same flow as tools: get_credit_balance, buy_credits and setup_credit_payment_method. buy_credits is marked as spending, so clients like ChatGPT ask before charging.