Skip to content

Commit 3dafd28

Browse files
authored
Update API billing page (datapoints) (#719)
* Update API query pricing: change Plus plan to Analyst plan * chore: improve formatting for datapoint and credits formula in billing section * Update billing page with clarified datapoint and spillover calculation section --------- Co-authored-by: Karim Hassan <[email protected]>
1 parent 64e1fc6 commit 3dafd28

File tree

1 file changed

+31
-4
lines changed

1 file changed

+31
-4
lines changed

api-reference/overview/billing.mdx

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,37 @@ If your execution fails, then no credits are charged. If you execute a query but
1717
| Queries Endpoint | Available on Plus and Premium |
1818
| Webhooks (Alerts) | 1 on Free <br></br> 5 on Plus <br></br> 50 on Premium |
1919

20-
A datapoint applies to query results after the query is run, and can in most cases be thought of `rows * columns` with an additional limit of 100 avg bytes per cell in a set of results. This can be expressed as:
20+
A datapoint applies to query results after the query is run, and can in most cases be thought of `rows * columns` with an additional limit of 100 avg bytes per cell in a set of results. This can be expressed as:
2121

22-
```math
23-
Credits = Datapoints/1000 = max(rows*columns, ceil(totalbytes/100))/1000
22+
$$
23+
Credits = \frac{Datapoints}{1000} = \frac{\max(\text{rows} * \text{columns}, \lceil \frac{\text{totalbytes}}{100} \rceil)}{1000}
24+
$$
25+
26+
**Byte-Based Calculation Details**
27+
28+
When calculating datapoints based on total bytes, cells that exceed 100 bytes will "spill over" into additional cells. Here's how this works:
29+
30+
**Example Table:**
31+
```
32+
+-----+-----+-----+
33+
| A1 | B1 | C1 |
34+
+-----+-----+-----+
35+
| A2 | B2 | C2 |
36+
+-----+-----+-----+
37+
| A3 | B3 | C3 |
38+
+-----+-----+-----+
2439
```
2540

26-
Any API usage billing will be based on what account the API key is associated with. If you use your team api key to call a public query belonging to yourself, the billing will be associated to the team (and vice versa).
41+
**Spillover Calculation:** If one cell contains 175 bytes, that cell effectively counts as 2 cells in the datapoint calculation:
42+
43+
- First 100 bytes = 1 cell
44+
- Remaining 75 bytes = 1 additional cell
45+
46+
**Example breakdown:**
47+
- 8 cells of 100 bytes each = 8 cells
48+
- 1 cell of 175 bytes = 2 cells (100 + 75)
49+
- Total: 10 cells
50+
51+
**API Usage Billing**
52+
53+
Any API usage billing will be based on what account the API key is associated with. If you use your team API key to call a public query belonging to yourself, the billing will be associated to the team (and vice versa).

0 commit comments

Comments
 (0)