Notice: GPT Image 2.6 Flare and Sunburst are newly launched with a limited-time 20% off, try it now
HiAPI

HiAPI Tools · API Cost Calculator

AI Token & Model Cost Calculator

Estimate per-request and monthly API spend for text, image, and video models at current HiAPI rates.

Prices come from HiAPI's current public billing configuration.

Build your monthly estimate

Pick a model type, then enter your usage. No sign-in required.

Prompt caching (optional)
Prompt caching (optional)Estimated reads and writes cannot exceed 100% of input in total.

What drives AI API cost?

Text, image and video APIs each have distinct pricing structures. These factors explain how the estimate is calculated.

Tokens in and out

Text models bill input and output tokens at different rates. Output is usually several times more expensive.

Prompt caching

Repeated prompt prefixes are billed at a discounted cache-read rate. Some models also charge for writing to the cache.

Resolution and duration

Image and video models price by output configuration; video often bills per second of output.

How to use the calculator

  1. 01 Pick a model

    Choose text, image, or video, then find the model you plan to call.

  2. 02 Enter your usage

    Type token counts or output settings and your monthly volume. Results update as you type.

  3. 03 Copy the request

    Take the matching cURL or Python request and run it with your API key.

Text, image, and video pricing compared

Each model type charges differently. Use the calculator to estimate costs across text, image and video APIs side by side.

Text

Text: Bill by token (input and output at separate rates), with optional prompt caching discounts for repeated prefixes.

Image

Image: Bill per generation, with resolution and quality as the main cost drivers. Some models offer separate text-to-image and image-to-image pricing.

Video

Video: Bill per second or per generation, with duration and resolution affecting the final cost. Longer videos and higher resolutions increase spend proportionally.

AI API cost calculator FAQ

How accurate is this estimate?

It uses current public HiAPI rates. Actual charges depend on real token counts, account group, and the request log, which stays authoritative.

How do I count tokens for my prompt?

As a rough guide, 1,000 English tokens is about 750 words. The usage field in each API response reports the exact count.

Does the calculator include prompt caching?

Fields appear only when the current context tier publishes the corresponding cache rate. Writes use the default or 5-minute rate; 1-hour caching is not estimated. Read and write shares are assumptions and the example request does not guarantee a cache hit.

Why does the price change with long prompts?

Some models charge higher rates once input passes a context threshold. The calculator switches to that tier automatically and tells you when it does.

How do credits relate to dollars?

2,000 HiAPI credits equal $1. The calculator shows the monthly estimate in both so you know how much to top up.

Do I need an account to use it?

No. The calculator is free and needs no sign-in. You only need an API key to send the generated request.