gemma4api.comGet API key

Gemma API: What it costs

Our pricing is straightforward: pay only for the tokens you use, with no monthly fees or hidden costs. You load credit into your account, and requests are processed until that balance is exhausted.

per 1M input tokens
$0.25
Output tokens / 1M
$1.00
token context
100,000
trial credit
$0.50
requests per minute
300

No subscription. Prepaid credit never expires.

Cost calculator

$0.00

Worked examples

Long-form creative writing session

A 50,000-token prompt generates 2,000 tokens of story content. Cost: (50,000 / 1,000,000 * $0.25) + (2,000 / 1,000,000 * $1.00) = $0.0125 + $0.002 = $0.0145.

Code completion and refactoring

A 10,000-token code block prompts a 500-token refactor. Cost: (10,000 / 1,000,000 * $0.25) + (500 / 1,000,000 * $1.00) = $0.0025 + $0.0005 = $0.003.

Data summarization batch

Processing 100,000 tokens of input data to generate 5,000 tokens of summary. Cost: (100,000 / 1,000,000 * $0.25) + (5,000 / 1,000,000 * $1.00) = $0.025 + $0.005 = $0.03.

Token Pricing

We charge strictly per token used. Input tokens cost $0.25 per million, and output tokens cost $1.00 per million. This reflects the compute cost of processing your prompt and generating the response. There are no base fees or subscription tiers. You only pay for what you consume. This model scales naturally with your usage, whether you send a few requests or thousands. The ratio between input and output costs encourages efficient prompt design, as input tokens are significantly cheaper than generated output tokens.

Prepaid Credit

Our service operates on a prepaid credit system. You add funds to your account, and these credits are deducted as you make requests. This ensures that your usage never exceeds what you have already paid for. If your balance reaches zero, new requests will fail immediately. You can top up your account from $10 using crypto (USDT or USDC). There are no monthly fees, and your paid credit never expires. This approach gives you complete control over your spending and eliminates surprise charges at the end of a billing cycle.

Bonus Credits

We reward larger upfront deposits with bonus credits. When you top up $50 or more, you receive a 5% bonus added to your balance. For top-ups of $100 or more, the bonus increases to 10%. These bonus credits function exactly like your regular prepaid balance and are deducted at the same rate as your input and output tokens. This effectively reduces your cost per token for larger workloads. The bonus is applied instantly upon successful payment, allowing you to start using the API immediately with more capacity.

Limits and what is included

One price list, one set of limits, all features on every key.

SpecValue
Context window100,000 tokens, input and output combined
Structured outputresponse_format: {"type": "json_object"}
Function callingYes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool
Max output16,000 tokens max; 2,048 if max_tokens is not set
Concurrencyup to 8 in parallel per key
Rate limit300 requests per minute per key
Credit expiryno monthly fee; paid credit does not expire
Volume bonus+5% from $50, +10% from $100
Free trial$0.50 for 7 days, no card
Top-upUSDT (TRC20) or USDC (Base), any whole amount from $10 to $500
Price$0.25 per 1M input tokens · $1.00 per 1M output tokens

All limits and error codes are listed in the docs.

Questions and answers

Does the prepaid credit expire?

No, your prepaid credit does not expire. Once you have purchased credits, they remain in your account until you use them. There is no monthly fee or subscription to maintain access. This allows you to top up when convenient and use the credits over any timeframe without pressure.

What happens when my balance is zero?

When your balance reaches zero, new requests will fail immediately. You must add more credit to your account before you can send another request. Unlike some services that might send the request and then charge later, our system ensures you never go into debt or incur charges beyond your loaded balance.

Can I get the trial credit again?

The $0.50 trial credit is available once per person. While it is tied to a person rather than a specific account, you could theoretically create a second account if you have a different email address. However, each person is limited to one trial credit to prevent abuse.

Are there any hidden fees for API usage?

There are no hidden fees. You only pay for the tokens you consume. There are no costs for connections, requests, or features like streaming and tool calling. The only costs are the input and output token rates. Your total spend is strictly limited to the amount of prepaid credit you have loaded into your account.

Your key is one form away

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

Get API key