Building AI-native companies
How should an API take a price from an AI agent when there's a fee?
Make the field say whose money it is. When a marketplace adds a fee, "price" can mean what the seller receives or what the buyer pays, and an agent will guess. Give the API one field for each meaning, accept either, return both with the fee spelled out, and make any old ambiguous field default to the reading that can't overcharge anyone.
Updated November 27, 2026
Why is a single price field risky for agents?
A person reading a form sees the fee breakdown next to the box. An agent reading an API sees a field name and a short description, and fills it in from whatever its user said. If the user said "pay the creator $50" and the field means the buyer's total, the creator gets less than promised. If the field means the creator's amount and the agent passes a budget, the buyer pays more than planned. Neither error throws an exception; both just cost money quietly.
How does Transformer.gg solve it?
With two explicit fields. When a brand or its agent sends an offer on Transformer.gg, it sets either:
creatorAmountUsd: the exact amount the creator receives, with Transformer.gg's 20% fee added on top. A $50 creator amount costs the brand $62.50.brandTotalUsd: the total the brand pays, with the fee coming out of it. A $50 brand total pays the creator $40.
The older payoutUsd and priceUsd fields still work on the REST API, MCP server and CLI, and they're read as the brand total, so agents built before the change are never silently overcharged. See Transformer.gg pricing and fees and how agents use Transformer.gg.
What makes a price field agent-friendly?
- Name it after who gets the money.
sellerAmountandbuyerTotalcan't be misread the waypricecan. - Accept one, return both. Whatever the agent sends, the response shows the other number and the fee, so the agent can check its work and tell its user.
- Put the fee rule in the field description. Tool descriptions are what the model reads; one line with a worked example prevents most mistakes.
- Fail safe on old fields. When you change meanings, map the old field to the reading that costs the payer least.
- Charge late. On Transformer.gg, sending an offer is free and the brand is charged only when a creator accepts, which gives an agent's mistake a chance to be caught.
Where else should the rule be written down?
Everywhere an agent might read it: the API reference, the MCP tool descriptions, the CLI help and the product's llms.txt. Transformer.gg states its fee rule and the $50 to $62.50 example in its llms.txt, so an assistant answering a pricing question gets the same numbers as the API. For the wider checklist, read how to make a product AI agents can use and how to write documentation AI agents can use.
Frequently asked questions
What does creatorAmountUsd mean on Transformer.gg?
The exact amount the creator receives. Transformer.gg's 20% fee is added on top, so $50 costs the brand $62.50.
What does brandTotalUsd mean?
The total the brand pays, with the fee taken out of it. A $50 brand total pays the creator $40.
What happens to old payoutUsd calls?
They're read as the brand total, so existing agents aren't overcharged.
How do you stop an agent from overspending in general?
Give it a budget it can't exceed and make costly steps wait for a person. See how to stop an AI agent from overspending.