Tuna.ai

Billing

Tuna is prepaid. Your organization keeps a balance of credits, and each serverless request is paid from it. You pay per token, and there is no charge for idle time or for keeping a model running.

Pricing

Token prices vary by model and token type:

Token type What it is
Input The tokens in your messages, including images and tool definitions.
Cached input Input tokens the model processed recently, such as a long system prompt reused across requests. They are billed at the model's cached input price. See Input caching.
Output The tokens the model writes, including the thinking of reasoning models.

Prices are quoted per million tokens, but billing is based on the exact number of tokens used. Usage is never rounded up to a full million. Charges are deducted from your organization's balance of credits.

The usage field of each response shows how many tokens the request used. See Models & pricing for each model's prices.

For example, suppose a model costs $1.00 per million input tokens and $4.00 per million output tokens. A request with 2,000 input tokens and 500 output tokens then costs $0.002 for input and $0.002 for output, which is $0.004 in total. The amount is paid from the organization's balance of credits. These prices are only an example.

Precision

Charges are calculated and internal amounts are kept with $0.000000001 precision.

Amounts shown in the UI are rounded to the nearest penny ($0.01). This rounding is only for display and does not change the internal amounts.

Monetary amounts returned by Tuna's APIs may also be rounded. Charges are calculated from the full-precision internal amounts.

Usage Tracking & Accounting

Tuna uses Metronome, a usage billing service, to track usage and balances. After each request, Tuna sends Metronome the model, the token counts, the cost, and the time. It never sends the text of your prompts or replies.

Adding Credit

Credit is added to the organization's balance, which is shared by its projects. The organization's Owner is responsible for billing.

Credits are denominated in US dollars. You can pay in US dollars or in your local currency, and the payment is converted into credits. Credits have no cash value and are non-refundable, unless the law requires otherwise.

Payment Methods

Payments are processed by Stripe. You can pay with all major credit cards. Stripe handles your card details, and Tuna doesn't store your card number.

Paying with crypto and with x402 is coming soon.

When the Balance Runs Out

What happens to new requests?

They return status 402 until someone adds credit. After credit is added, new requests work again without any other change. See Errors.

What happens to a request that is already running?

A streaming reply can stop early if the balance runs out partway through. Tokens are counted as they stream, and the request stops once the balance is used up. The stream then ends with a 402 error chunk. See Errors during a stream.

Why did a large request fail when I still had some balance?

Before a request runs, its cost is estimated from the size of the input. If the estimate is more than the balance, the request fails with 402 without being charged. Adding credit fixes it, and so does sending a shorter input.