Token math before comparing AI API prices
Comparing AI API prices takes more than putting rate tables side by side. The units differ, input and output are priced separately, and the same content is billed again and again as a conversation grows. This article walks through how to work out your monthly cost from your own usage pattern first.
Updated

Key takeaways
- Compare after matching all prices to two numbers: input/output per 1,000,000 tokens.
- In conversational apps, the previous conversation is re-sent as input at every turn, increasing input costs.
- This API costs $0.15 for input and $0.50 for output (per 1,000,000 tokens), and failed or refused requests are not charged.
- Besides unit price, minimum top-up amount, expiration, subscription status, and rate limits also affect total costs.
First, standardize price units
Price tables often list prices per 1,000 tokens or per 1 million tokens. It is also common to list input (prompt) and output (model response) prices separately. When creating a comparison table, convert all to input price / output price per 1 million tokens.
If the price is per 1,000 tokens, multiply by 1,000 to get the price per 1 million tokens. This guide does not list other providers' prices. Since prices change frequently, check the current pricing page of the provider you are comparing directly. Our reference value is this API's unit price.
| Item | This API |
|---|---|
| Input (per 1,000,000 tokens) | $0.15 |
| Output (per 1,000,000 tokens) | $0.50 |
| Billing method | Prepaid credit deduction, no subscription |
| Credit expiration | None |
| Failed/Rejected requests | Not charged |
Formula for calculating costs
The cost of a single request is as follows.
Cost = Input tokens × Input unit price ÷ 1,000,000 + Output tokens × Output unit price ÷ 1,000,000
For example, with 2,000 input tokens and 500 output tokens, the input cost is 2,000 × 0.15 ÷ 1,000,000 = $0.0003, and the output cost is 500 × 0.50 ÷ 1,000,000 = $0.00025. The total is $0.00055, or $0.55 for 1,000 requests. Even though the numbers are small, unit price differences accumulate with volume, so it is important to convert to monthly costs.
You can get the exact token count from the usage field in the response. The code below calculates the cost of a single actual request directly.
import os
from openai import OpenAI
IN_PRICE = 0.15 # 입력 100만 토큰당 USD
OUT_PRICE = 0.50 # 출력 100만 토큰당 USD
client = OpenAI(base_url="https://api.mugeomyeolapi.com/v1", api_key=os.environ["MUGEOMYEOL_API_KEY"])
res = client.chat.completions.create(
model="uncensored",
messages=[{"role": "user", "content": "토큰 비용 계산 테스트용 문장을 세 줄로 써 줘."}],
)
u = res.usage
cost = u.prompt_tokens * IN_PRICE / 1_000_000 + u.completion_tokens * OUT_PRICE / 1_000_000
print(f"입력 {u.prompt_tokens} / 출력 {u.completion_tokens} / 비용 ${cost:.6f}")
When comparing with other providers, calculate the token count for the same prompt in the same way. Note that token counts may vary slightly for the same text due to different tokenizers.
Monthly cost examples by usage pattern
Example 1: Q&A chatbot
Let's assume 10,000 requests per month, with 1,500 input tokens and 300 output tokens per request. The total input is 15,000,000 tokens, which is 15,000,000 / 1,000,000 × $0.15 = $2.25. The total output is 3,000,000 tokens, which is 3,000,000 / 1,000,000 × $0.50 = $1.50. The monthly total is $3.75.
Example 2: Long document summarization
That is 20 requests per day, or 600 requests in 30 days. With 60,000 input tokens and 1,000 output tokens per document, the input of 36,000,000 tokens costs 36 × $0.15 = $5.40, and the output of 600,000 tokens costs 0.6 × $0.50 = $0.30. The monthly total is $5.70. For long-input tasks, the input unit price determines the total cost. Since a context window allows up to 100,000 tokens combined for prompt and output, you can fit this length in one request.
Example 3: 50-turn roleplay conversation
Conversational apps are the most complex to calculate. Since the model does not remember previous conversations, you must resend the entire conversation history as input at every turn. Assuming a 500-token system prompt, 100-token user utterance, and 300-token model response, the input for the k-th turn is 400k + 200 tokens. The total input for 50 turns is 400 × (1+2+…+50) + 200 × 50 = 400 × 1,275 + 10,000 = 520,000 tokens. The total output is 300 × 50 = 15,000 tokens.
The cost is input 520,000 × 0.15 ÷ 1,000,000 = $0.078, output 15,000 × 0.50 ÷ 1,000,000 = $0.0075, totaling $0.0855. The total output tokens are less than 3% of the input, yet the input accounts for over 90% of the cost. In conversational apps, input unit price and conversation history reduction methods (e.g., summarizing older turns) are the biggest cost-saving factors.
Conditions to compare besides unit price
Even with the same unit price per 1,000,000 tokens, the total cost varies depending on the conditions. Add the following row to the comparison table.
- Minimum top-up amount and unit. This API allows top-ups in integer amounts from $20 to $500.
- Credit expiration. With expiring credits, unused amounts are lost. Here, there is no expiration.
- Subscription status. If there is a monthly fixed fee, you pay even in months you don't use. Here, it is prepaid credit without a subscription.
- Billing for failed requests. Check whether requests that result in errors or rejections are charged. Here, they are not.
- Request limits. A standard key allows 8 concurrent requests and 300 requests per minute. If limits cause retries, your development time becomes cost.
- Context length. This API supports 100,000 tokens. With a short context window, you must split long documents and send them multiple times, increasing input usage.
- Delivery method. Policies and support differ depending on whether it is an official API from a company or a model hosted by an independent provider. This API is the latter and is not an official API from another company.
Other vendors may offer cache discounts or batch discounts. If they do, check whether they actually apply to your usage patterns.
Actual unit price with top-up bonus
If a bonus is applied based on the top-up amount, the effective unit price decreases. This API offers a 5% bonus for top-ups of $50 or more, 10% for $100 or more, and 15% for $200 or more. For example, if you top up $200, you receive $230 in credit. Since you get more value for the same $200, the effective unit price becomes input 0.15 × 200 ÷ 230 ≈ $0.13, output 0.50 × 200 ÷ 230 ≈ $0.43 (per 1 million tokens). If you top up $100, you receive $110; if you top up $50, you receive $52.50 in credit.
Top-up payment methods are USDT (TRC20) and USDC (Base). However, topping up a large amount at once is not always beneficial. Credits never expire, but if you don't know your usage, it is safer to start with a small amount, check your monthly usage, and then increase it. See the full table on the pricing page.
Try for free before signing up
The most reliable way to verify the calculation is with a real call. New users can receive $0.50 in trial credit with a single click on the API key page. It is limited to one per person, valid for 7 days, and requires no payment information. Although the trial key is limited to 2 concurrent requests and 60 requests per minute, this is sufficient for cost measurement.
Send about 20 of your usual prompts with the code above to calculate the average input/output tokens, then multiply by the number of monthly requests to estimate your monthly cost. Refer to the API documentation for connection methods. Since this API is text-only, image or audio generation costs cannot be included in the comparison.
More guides
Frequently asked questions
What is the first thing to look at when comparing AI API prices?
Set the unit to per 1,000,000 tokens and list the input and output prices separately. Then, plug in the average number of input/output tokens for your usage pattern to calculate the monthly cost.
Why does cost increase quickly as conversations get longer?
Because the entire previous conversation is sent as input again at every turn. As the number of turns increases, the total input tokens grow almost quadratically.
What is the unit price of this API?
Input is $0.15 per 1,000,000 tokens, and output is $0.50 per 1,000,000 tokens. Charges are deducted from prepaid credit, which does not expire, and failed or rejected requests are not charged.
Do you provide prices for other vendors?
No. Prices for other vendors change frequently, so check the current pricing page of each vendor directly.
API key is available just by signing up
Create an account, copy the key, and change the base URL. That's all the setup you need.