The math you actually do as an agent

OpenAI's gpt-4o costs roughly $2.50 per million input tokens and $10 per million output. Sounds cheap. Until you try to plan a 12-step agent loop where step 4 might pass step 3's full output as context and step 7 branches on something you can't predict.

Here's the move every agent builder ends up making. You estimate worst-case token counts per step, sum them, multiply by the per-token price, and pad 30% because you're guessing. That's your budget. Now you've over-quoted the user, or under-budgeted yourself, or both.

Wordmint flips the bill. A summarize call is $0.005. Period. A translate-en-es call is $0.003. A classify-intent call costs $0.001. Pay once per outcome. The math behind it is Wordmint's problem.

What "named task" actually means

A Wordmint endpoint hits /v1/tasks/{task_name} with a JSON body and 402-pays. The task name is the contract. The contract says: you send a blob of text under 50KB, you get a summary under 300 tokens, the price is $0.005.

POST /v1/tasks/summarize HTTP/1.1
X-PAYMENT: <x402 payload, $0.005 USDC>
Content-Type: application/json

{ "text": "long_input_here" }

Response:

{
  "task": "summarize",
  "result": "Three-sentence summary of input.",
  "tokens_in": 4812,
  "tokens_out": 187,
  "price_usd": 0.005
}

Notice tokens_in sits in the response. It's there for your logs, not your bill. You paid $0.005 the moment x402 settled. The 4,812 tokens of input never moved the price.

Why this matters for planning loops

Agents that route across multiple tools need cost-of-step to be a constant. Otherwise the planner can't compare options without doing arithmetic at runtime.

Say your agent has two ways to extract entities from a doc. Option A is a classify-entities call to Wordmint for $0.001. Option B is a raw OpenAI completion that might cost $0.002, or might cost $0.015, depending on doc length. With Wordmint, the planner picks Option A and keeps moving. With raw token billing, the planner either does math at runtime (slow, brittle) or guesses (wrong).

And constant pricing makes budget enforcement trivial. Set a per-task wallet to $1.00, divide by $0.005, you get 200 summarize calls. Done. No "well, if inputs stay under 2k tokens we can do 350 of them" arithmetic, no defensive padding.

The catch

Wordmint loses on small inputs. A 300-token summarize on gpt-4o-mini costs roughly $0.0008 at raw rates. Paying $0.005 for that is a 6x markup. So the honest rule: short, predictable inputs that you'd run on a cheap model directly, raw token billing still wins there. Wordmint earns its keep on inputs over ~1.5k tokens, and on planning-overhead reduction when an agent chains many calls.

There's also no model choice. Wordmint picks the model behind each task. If you've got an opinion about which family should answer, that's not the endpoint for you.

Try it

The current task list and their flat prices live at wordmint.agentutility.ai/tasks. Most tasks sit between $0.001 and $0.01. The X-PAYMENT header format follows x402 spec exactly, so any agent that already speaks x402 can call Wordmint without new plumbing.

Build something that calls four named tasks in sequence. Add up the prices. That number is what you charge the user. The math is finally easy.