EN ▾
Get API key

AI Agent Pricing Models: Per Token vs Subscription

Most ai agent pricing models come down to four shapes: a flat subscription, a free tier, a per-seat plan, or pay per token. An agent rereads its own history on every step, so the token meter is the number to model first.

Updated

Isometric illustration of an agent loop where each pass adds more blocks, beside a small balance scale of coins

Key points

  • An agent bills for every step it takes, and each step resends the whole history as input.
  • A ten-step run with 2,000 tokens of setup costs about $0.0099 at $0.15 input and $0.50 output per 1M tokens.
  • Pay per token beats a flat plan when your volume is uneven, and loses only when usage is steady and heavy.
  • Trimming tool output is the cheapest way to lower an agent bill, and it cut the example by about 20%.

The four pricing shapes agent builders run into

When you price out an agent project, the providers you compare will usually sell one of four things. Knowing which one you are looking at tells you what to measure before you commit.

  • Flat subscription. You pay a fixed amount each month and get a usage allowance. It is predictable, but the allowance is often defined in messages, not tokens, and agents burn through message-based allowances fast because one task can make dozens of calls.
  • Free tier. Good for a prototype. The limits are the catch: a low requests-per-minute cap, a small daily quota, or a shared queue. Agents fire requests in bursts, so they hit those caps early.
  • Per seat. Common in finished products where a human logs in. It tells you little about what a headless agent will cost, because an agent has no seat count to scale with.
  • Pay per token. You are billed for tokens read and tokens written, at separate rates. Cost follows the work done, and idle time costs nothing.

This site uses the last model. You top up credit, and each request draws it down at $0.15 per 1M input tokens and $0.50 per 1M output tokens. There is no monthly fee, and the credit does not expire. The rest of this article is about how to estimate what that means for an agent in particular.

Why an agent costs more than a chat window

A chat message is one request with a short prompt. An agent is a loop. It sends the task, receives a tool call, runs the tool, appends the result and sends everything again. Each pass is a new request, and the request carries the entire conversation so far.

That has two consequences for cost. First, input tokens grow with every step, because the history only gets longer. Second, input usually dominates the bill by volume even though output tokens are priced higher per unit. In the example below, input is more than eighteen times the output by token count, and still about 85% of the total cost.

Three things set the size of the loop: the fixed prefix (system prompt plus tool definitions), the number of steps, and how much each tool result adds. You control all three, which is why the pricing model matters less than your own agent design once you can see the numbers.

Where the tokens come from

A tool schema is text, and it is sent on every call. Ten tools with long descriptions can add 1,500 tokens to every single step. A scraper that returns a full web page instead of an extract can add several thousand. Neither shows up in your prompt, so developers are often surprised by the first invoice. Printing the usage field on every call, as shown further down, removes the surprise.

A worked example: one ten-step agent run

Take an agent with a 2,000-token prefix (system prompt, tool definitions and the task). Each step the model writes 300 tokens, a tool returns 500 tokens, and both are appended to the history. That is 800 new tokens per step. The input size at step k is 2,000 plus 800 times (k minus 1).

StepInput tokensOutput tokens
12,000300
22,800300
33,600300
55,200300
109,200300
Total, 10 steps56,0003,000

The input total is ten steps at an average of 5,600 tokens, which is 56,000. Now price it:

  • Input: 56,000 / 1,000,000 x $0.15 = $0.0084
  • Output: 3,000 / 1,000,000 x $0.50 = $0.0015
  • One run: $0.0084 + $0.0015 = $0.0099

So one full ten-step run costs a little under a cent. A thousand such runs cost $9.90. If your agent runs 1,000 times a day for 30 days, that is $297 for the month. The same math scales down just as well: a hobby agent that runs 20 times a day costs about $0.20 a day.

Break-even against a flat plan

A flat plan is a bet that your usage lands above the price. To test the bet, divide the plan price by your cost per run. With the example above, each dollar of monthly plan price is worth about 101 runs of pay-per-token usage (1 divided by 0.0099). If a plan costs F dollars a month, it only wins when you run the agent more than F x 101 times and the plan actually lets you do that many.

The second condition matters more than the first. Check how the plan counts usage. If it counts messages or requests, a ten-step agent consumes ten of them per run. If it throttles you to a few requests per minute, a loop that needs to finish in seconds will stall. With this API the limits are stated: a full key allows 8 concurrent requests and 300 requests per minute, and a trial key allows 2 and 60. Ask any other provider for the same two numbers before you compare.

Pay per token also wins when demand is spiky. A flat plan charges you for the quiet weeks. A prepaid balance does not, and since credit never expires, an unused balance stays available next month. It loses only when you run steady, heavy volume and a provider offers a flat price that really covers it. In that case, check their current pricing and terms, and run the numbers with your own token counts.

What a free tier is good for

Use it to prove that the agent works, not to size the business. Free tiers tell you nothing about cost per run and often change without notice. Measure your token counts on a paid or trial key instead, since that is the number you will actually live with.

Measuring real cost in code

Estimates like the table above are only a starting point. The API returns token counts with every response, and it returns your remaining balance in the X-Balance-USD header. This loop prints both, and adds up the cost of the run using the published rates.

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.uncensoredaimodels.cc/v1",
    api_key=os.environ["UNCENSORED_KEY"],
)

IN_PRICE = 0.15 / 1_000_000   # dollars per input token
OUT_PRICE = 0.50 / 1_000_000  # dollars per output token

def run_agent(task, max_steps=10):
    messages = [{"role": "system", "content": "You are a research agent."},
                {"role": "user", "content": task}]
    spent = 0.0
    for step in range(max_steps):
        raw = client.chat.completions.with_raw_response.create(
            model="uncensored",
            messages=messages,
            max_tokens=400,
        )
        resp = raw.parse()
        u = resp.usage
        spent += u.prompt_tokens * IN_PRICE + u.completion_tokens * OUT_PRICE
        print(step, u.prompt_tokens, u.completion_tokens,
              "balance:", raw.headers.get("X-Balance-USD"))
        messages.append(resp.choices[0].message)
        # ... run tools here, append their results as role "tool" ...
    return spent

print("run cost: $%.4f" % run_agent("Summarise the open issues"))

Run it on a real task three or four times and compare the numbers with your estimate. If the cost per run is far above the table, the usual causes are long tool results, a bloated tool schema, or an agent that keeps retrying a failing call. Failed or refused requests are not charged here, but a retry loop that succeeds on the fifth attempt still pays for the four earlier successes that went nowhere.

For streaming agents, set stream: true and read the usage chunk at the end of the stream. A streamed request keeps its concurrency slot until the stream ends, so a long streamed answer counts against your limit of 8 concurrent requests for its whole duration.

Lowering the bill without changing the agent

Most savings come from keeping the history small. Four changes, in order of effort:

  1. Truncate tool output. If the tool result in our example shrinks from 500 to 200 tokens, each step adds 500 tokens instead of 800. Input over ten steps becomes 20,000 + 500 x 45 = 42,500 tokens, which costs $0.006375. Add $0.0015 for output and the run costs about $0.0079, roughly 20% less than $0.0099.
  2. Summarise old steps. After five steps, replace the first four with a short summary. The model loses detail it rarely needs and the input stops growing linearly.
  3. Cap max_tokens. The completion can use the whole 100,000-token window by default. A cap of a few hundred tokens stops a looping model from writing pages of output you pay for at the higher rate.
  4. Ask for structured output. JSON mode (response_format: {"type":"json_object"}) keeps replies short and parseable, which reduces both output tokens and retry calls.

Pass temperature low for tool-heavy agents. High temperature makes tool arguments wobble, and every malformed call is another request in the loop. If you build coding agents in particular, the checklist for an uncensored coding LLM covers prompt and tool-schema habits that keep runs short.

Prepaid credit, bonuses and the trial

Top-ups are any whole amount from $20 to $500. Bonuses apply from $50 (+5%), $100 (+10%) and $200 (+15%). In credit terms, a $100 top-up becomes $110 and a $200 top-up becomes $230. At $0.0099 per run, $20 buys about 2,020 runs and $110 of credit buys about 11,111. You can pay by crypto (USDT on TRC20, USDC on Base).

New users can claim $0.50 of trial credit with one click on the API key page after sign-up. It needs no card, is valid for 7 days and covers roughly 50 runs of the example agent. That is enough to measure your own token counts before you put real money in. Start on the API key page, check the full pricing table, and follow the quickstart to point your existing OpenAI SDK at the new base URL.

The API is OpenAI-compatible, so an agent framework that accepts a custom base URL needs only the URL, your key and the model ID uncensored. It supports tool calling and streaming, but it is text only: no embeddings and no image generation, so an agent that needs those must get them elsewhere.

Questions and answers

Is pay per token cheaper than a subscription for AI agents?

It depends on volume. At about $0.0099 for a ten-step run, pay per token is cheaper whenever your usage is spiky or modest. A flat plan can win only when your usage is steady, high, and the plan counts it in a way that does not penalise many small requests.

Why do my agent costs grow faster than the number of tasks?

Each step resends the whole history, so input tokens rise with every loop. Long tool results and large tool schemas make this worse. Truncating results and summarising old steps flattens the curve.

Do failed or refused requests cost money?

No. Failed or refused requests are not charged. Requests that return a normal completion are billed for the tokens used, even if your agent later discards the answer.

How much can I test before paying?

A new account can claim $0.50 of trial credit with one click on the API key page. It lasts 7 days, needs no card, and is limited to 2 concurrent requests and 60 requests per minute.

Your key is one form away

Create an account, copy the key, change the base URL. That is the whole setup.