Knowledge Base Billing
Knowledge base pricing includes token subscription fees and infrastructure costs for the underlying OpenSearch database. This article explains how charges are calculated, how tokens are consumed, and what affects the total cost.
How Price is Calculated Copy link
The cost of a knowledge base consists of two components:
-
Token Subscription Fee. When a knowledge base is created, $5.63 is charged for 10 million tokens. These tokens are used for indexing the knowledge base and for all queries to it. This charge repeats monthly.
-
Hourly Fee for the OpenSearch Database. The knowledge base runs on a cloud database. After the database is created, hourly billing starts. The cost depends on the selected configuration.
When creating the database, choose the smallest suitable configuration. You can increase it later if needed, but downgrading is not supported.
Pricing Example
When creating a knowledge base with the minimum configuration:
- $5.63 is charged immediately for 10 million tokens (monthly charge).
- $0.06831 per hour is charged for the database while it is running throughout the month.
Additional Tokens Copy link
If needed, you can add tokens at a price of $0.75 per 1,000,000 tokens by clicking Add Tokens on the knowledge base Dashboard:

Additional tokens are valid only until the end of the current billing period. For example, if the next billing date is in two days, the added tokens will expire in two days.
Token Usage During Indexing Copy link
Indexing uses the text-embedding-3-large embedding model, which converts text into vector representations. This is required for indexing data and enabling search and retrieval.
Token usage during indexing depends on the format of the uploaded file. Below is an approximate estimate of token consumption for documents of different sizes:
|
Format |
1 MB |
10 MB |
100 MB |
500 MB |
|
.txt |
240,000 |
2,400,000 |
24,000,000 |
120,000,000 |
|
.csv |
450,000 |
4,500,000 |
45,000,000 |
225,000,000 |
|
.xml |
62,000 |
620,000 |
6,200,000 |
31,000,000 |
|
.htm, .html |
39,000 |
390,000 |
3,900,000 |
19,500,000 |
|
.md |
221,000 |
2,210,000 |
22,100,000 |
110,500,000 |
Actual token usage may vary depending on the structure and content of the file.