EN ▾
Get API key

Moonshot AI API Pricing: How to Compare Token Costs

Comparing per-token prices only works if you price the same workload on both sides. This page shows the math for our flat rate and a method for checking any other price list against it.

Updated

Two balance scales weighing token blocks against coins to illustrate API price comparison

Key points

  • Our rate is $0.15 per 1M input tokens and $0.50 per 1M output tokens, billed from prepaid credit.
  • Output tokens cost about 3.3 times as much as input tokens, so reply length drives your bill.
  • Compare vendors with your own token mix, not with the headline number alone.
  • Refused or failed requests are not charged, and credit never expires.

The short answer on price

If you searched for moonshot ai api pricing, you probably want a number to put next to your budget. Here is ours: $0.15 per 1M input tokens and $0.50 per 1M output tokens. There is no subscription and no seat fee. You top up prepaid credit, and each request subtracts its token cost from the balance.

I will not quote Moonshot's prices here. They publish their own price list, it can change, and a number copied into a blog post goes stale. Check their current pricing page, write down the input and output figures, and then run them through the method below. The method matters more than any single number.

One thing to know before you compare: this service is not Moonshot's API and not a reseller of it. It is a hosted, OpenAI-compatible endpoint for one open-weight model, uncensored, tuned to answer without content refusals for lawful adult use. If you need a specific vendor's official model, a price comparison is the wrong first question.

How per-token billing works

Almost every hosted LLM API bills in tokens, and almost all of them split the price in two. Input tokens are everything you send: system prompt, chat history, retrieved documents, tool definitions. Output tokens are what the model writes back. The two have different prices because generating text costs more compute than reading it.

At our rates the ratio is $0.50 to $0.15, which is about 3.3 to 1. A request that sends 1,000 tokens and receives 1,000 tokens spends roughly three quarters of its money on the reply. A request that sends 50,000 tokens of context and receives 200 tokens spends almost everything on input. Knowing which of these shapes your traffic takes is the first step in any price comparison.

The formula is simple:

cost = input_tokens / 1,000,000 * 0.15 + output_tokens / 1,000,000 * 0.50

The API returns a usage object with prompt and completion token counts on every response, and a streamed response sends usage at the end. You never have to guess your token counts after the fact.

Worked cost examples

These examples use round numbers so you can check them by hand. Each one multiplies tokens by the price per million.

WorkloadInputOutputCost
One chat turn, 10,000 tokens in, 1,000 out$0.0015$0.0005$0.0020
10,000 turns, 2,000 in and 500 out each20M tokens = $3.005M tokens = $2.50$5.50
One long-context call, 90,000 in, 2,000 out$0.0135$0.0010$0.0145
50,000 requests a month, 1,500 in and 400 out each75M tokens = $11.2520M tokens = $10.00$21.25

The last row is a realistic small product: a companion app or an internal tool handling about 1,700 requests a day. It costs a little over $21 a month, and the output side is almost half of it even though the model writes far fewer tokens than it reads. If you cut the average reply from 400 tokens to 300, you save $2.50 on that month, which is more than a 10% cut in the bill. Shortening the prompt by the same 100 tokens would save $0.75.

The top-up minimum is $20, so the second row of the table, $5.50, is a good picture of what a first top-up buys: about three and a half such batches of 10,000 turns.

How to compare against any other price list

When you open another provider's pricing page, write down these items before you look at the headline rate.

  1. Input and output prices separately. A cheap input price with an expensive output price can lose to a flat pair, depending on your reply length.
  2. Cached or discounted input. Some vendors discount repeated prompt prefixes. If your system prompt is large and constant, that matters. Our price list is the two token rates above and nothing else.
  3. Context tiers. Some price lists change the rate above a certain prompt length. Our window is 100,000 tokens, prompt plus completion.
  4. Minimum purchase and expiry. Our minimum top-up is $20 and credit never expires. Check whether their balance or any monthly allowance expires.
  5. Extra charges. Look for tool fees, search fees, fine-tuning fees and minimum monthly commitments. Our side of the comparison is the two token rates, and we do not offer fine-tuning, embeddings or media generation.
  6. Refusals. Ask whether a refused request is billed. On our side, failed or refused requests are not charged.

Then take a real sample of your traffic, say a hundred requests, count the average input and output tokens, and compute the monthly cost on both price lists with the formula above. The result is the only comparison that counts. Two lists that look 20% apart on the headline can end up 5% apart or 40% apart on your actual mix.

What else changes the real bill

Refusals and retries

If a model refuses a prompt and you rephrase and retry, you pay for every attempt on a provider that bills refusals. For fiction, roleplay and companion apps this can add up. We do not charge refused or failed requests, and the model is tuned to answer without content refusals for lawful adult use. Minors are the hard limit: no sexual content involving minors, ever.

Bonuses on larger top-ups

Any whole amount from $20 to $500 works. From $50 you get +5% extra credit, from $100 +10%, and from $200 +15%. So $50 becomes $52.50 of credit, $100 becomes $110, and $200 becomes $230. Because credit never expires, a bigger top-up is simply a lower effective rate with no deadline.

Payment friction

You can pay with crypto (USDT on TRC20, USDC on Base). See the pricing page for the current top-up table.

Trial credit

New users can claim $0.50 of trial credit with one click on the API key page after sign-up. It needs no card and is valid for 7 days. At our rates that is 1M output tokens or 3.3M input tokens, enough to run a real sample of your own traffic through the API before you decide anything. The API key page walks through the steps.

A sizing exercise you can finish in ten minutes

A price list tells you nothing until it meets your traffic. Here is a short exercise that produces a number you can defend in a budget meeting.

  1. Pull 50 to 100 real prompts from your logs, or write them to match what users will send. Include the longest ones, since they dominate the cost.
  2. Send them through the API and record prompt_tokens and completion_tokens for each. Use the snippet in the next section.
  3. Compute the average of each column. Suppose you get 1,800 input and 350 output.
  4. Price one request: 1,800 / 1,000,000 x $0.15 = $0.00027, and 350 / 1,000,000 x $0.50 = $0.000175. That is $0.000445 per request.
  5. Multiply by monthly volume. At 100,000 requests that is $44.50.
  6. Add a margin for growth and for retries, say 30%, which brings the budget to $57.85.

Repeat steps 3 to 5 with the other vendor's input and output prices. Because you used one set of measured tokens, the two results are directly comparable. If one vendor tokenizes the same text into noticeably more or fewer tokens, measure with that vendor's own usage numbers as well, since token counts differ between models.

The exercise also shows where to optimize. If the input column is far larger than the output column, trim system prompts and chat history. If the output column dominates, ask for shorter replies or set max_tokens.

Measure your own costs from the response

Do not rely on a calculator alone. Log the usage from real calls and add up the cost. This snippet does it with the openai SDK.

from openai import OpenAI

client = OpenAI(
    base_url="https://api.moonshotapi.cc/v1",
    api_key="YOUR_KEY",
)

resp = client.chat.completions.create(
    model="uncensored",
    messages=[{"role": "user", "content": "Summarize the plot of Hamlet in 5 lines."}],
)

u = resp.usage
cost = u.prompt_tokens / 1e6 * 0.15 + u.completion_tokens / 1e6 * 0.50
print(u.prompt_tokens, u.completion_tokens, round(cost, 6))

Each response also carries an X-Balance-USD header with your remaining credit, so you can watch the balance fall in a dashboard or a log line without a second API call. The quickstart covers the request format.

Run this against a sample of your prompts and you will have a measured average. Multiply by your expected monthly volume and compare with the figure you computed from the other vendor's price list.

When another provider is the better choice

A lower price is not always the right reason to pick an API. Another provider fits better in these cases:

  • You need the vendor's own flagship model, with its exact behavior and its own safety tuning.
  • You need a context window larger than 100,000 tokens.
  • You need embeddings, image, audio or video generation, or fine-tuning. This service is text only.
  • Your compliance process requires a specific vendor contract.

If your use is lawful adult fiction, roleplay, a companion app, or any text workload where content refusals break the product, a flat, predictable rate for a model that does not refuse is the thing to price. Everything else in this article is arithmetic you can redo in five minutes with your own numbers.

Questions and answers

How much does the API cost per request?

It depends on tokens. A request with 2,000 input tokens and 500 output tokens costs $0.0003 plus $0.00025, which is $0.00055 in total.

Is there a monthly fee or minimum commitment?

No. You pay as you go from prepaid credit. The smallest top-up is $20, and credit never expires.

Do I pay for refused or failed requests?

No. Failed or refused requests are not charged, only completed ones.

Can I try it before topping up?

Yes. After sign-up you can claim $0.50 of trial credit with one click on the API key page. It needs no card and is valid for 7 days.

Your key is one form away

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