packages/kilo-docs/pages/getting-started/rate-limits-and-costs.md
Understanding and managing API usage is crucial for a smooth and cost-effective experience with Kilo Code. This section explains how to track your token usage, costs, and how to configure rate limits.
Kilo Code interacts with AI models using tokens. Tokens are essentially pieces of words. The number of tokens used in a request and response affects both the processing time and the cost.
You can see the number of input and output tokens used for each interaction in the chat history.
Most AI providers charge based on the number of tokens used. Pricing varies depending on the provider and the specific model.
Kilo Code automatically calculates the estimated cost of each API request based on the configured model's pricing. This cost is displayed in the chat history, next to the token usage.
Note:
To prevent accidental overuse of the API and to help you manage costs, Kilo Code allows you to set a rate limit. The rate limit specifies the minimum time (in seconds) between API requests.
How to configure:
Example:
If you set the rate limit to 10 seconds, Kilo Code will wait at least 10 seconds after one API request completes before sending the next one.
@file.ts, @folder/) selectively. Only include the files that are directly relevant to the task.Architect can't modify code, which makes it a safe choice when analyzing a complex codebase, without worrying about accidentally allowing expensive operations.By understanding and managing your API usage, you can use Kilo Code effectively and efficiently.