How billing works for Telnyx Storage
Telnyx Storage follows a usage based pricing model, which means that you will only pay for what you use. Usage categories and pricing are as follows:
Usage Category  Pricing 
Storage  $0.0023 per gigabytemonth, per month 
Class A Operations  $0.50 per 1 million requests, per month 
Class B Operations  $0.04 per 1 million requests, per month 
Egress fees  Free 
In addition, Telnyx Storage offers a generous free tier for you to test out the product risk free. This includes:
Usage Category  Free Tier 
Storage  up to 10 gigabytemonths, per month 
Class A Operations  up to 1 million requests, per month 
Class B Operations  up to 10 million requests, per month 
How Telnyx bills for storage
To determine the cost of storage Telnyx considers not only the amount of data that you are storing, but also the time that you store the data for.
A simple way to think about it:
 If you store 100 gigabytes of data for 1 month, you will be billed for 100 gigabytemonths of usage
 If you store 100 gigabytes of data for 15 days, you will be billed for 50 gigabytemonths of usage
 If you store 100 gigabytes of data for 3 days, you will be billed for 10 gigabytemonths of usage.
If you wanted a more detailed explanation: every hour, Telnyx measures how many bytes are associated with your user. The unit of this measurement is a bytehour
, meaning the number of bytes the user stored over a given hour. At the end of the day, Telnyx will sum the 24 measurements (one for each hour of the day) and record it on our ledger. At the end of the month, Telnyx will aggregate each of these records to determine how many bytehours
you used over the course of the month. Then, Telnyx will convert this value from bytehours
to gigabytemonths
to determine how much to charge you.
Calculating storage costs  an example
First, let’s make a few assumptions:

In
bucket_1
, you store 25 gigabytes of data for the entire month 
In
bucket_2
, you store 50 gigabytes of data for the first 10 days. After that time elapses, you delete the data, and you do not upload any more data intobucket_2
for the remainder of the month. 
In
bucket_3
, you upload 100 gigabytes of data for the first 2 days. After that time elapses, you delete the data, and you do not upload any more data intobucket_3
for the remainder of the month.  There are 30 days in a month
Now lets figure out how much this storage usage will cost you.
Calculating the # of bytehours
used in bucket_1
for the given month:
(# of bytes) * (# of hours the data was stored for)
(25 gigabytes * (1024*1024*1024 bytes per gigabyte)) * ((24 hours per day) * (30 days))
(26843545600 bytes) * (720 hours the data was stored for)
19327352832000 bytehours
Note: After pasting the above content, Kindly check and remove any new line added
Calculating the # of bytehours
used in bucket_2
for the given month:
(# of bytes) * (# of hours the data was stored for)
(50 gigabytes * (1024*1024*1024 bytes per gigabyte)) * ((24 hours per day) * (10 days))
(53687091200 bytes) * (240 hours the data was stored for)
12884901888000 bytehours
Note: After pasting the above content, Kindly check and remove any new line added
Calculating the # of bytehours
used in bucket_3
for the given month:
(# of bytes) * (# of hours the data was stored for)
(100 gigabytes * (1024*1024*1024 bytes per gigabyte)) * ((24 hours per day) * (2 days))
(107374182400 bytes) * (48 hours the data was stored for)
5153960755200 bytehours
Note: After pasting the above content, Kindly check and remove any new line added
Then, take the sum of bytehours
for the given month from all three buckets, and convert it into gigabytemonths
:
(# of bytehours from bucket_1 + # of bytehours from bucket_2 + # of bytehours from bucket_3) / (# of bytes per gigabyte) / (# of hours in the month)
(19327352832000 bytehours + 12884901888000 bytehours + 5153960755200 bytehours) / (1024*1024*1024 bytes per gigabyte) / (24 hours per day * 30 days per month)
(37366215475200 bytehours) / (1073741824 bytes per gigabyte) / (720 hours per month)
48.33 gigabytemonths
Note: After pasting the above content, Kindly check and remove any new line added
Finally, lets calculate what the total storage cost for the month will be:
(# of billable gigabytemonths used) * ($ per gigabytemonth)
(48.33 gigabytemonths used  10 gigabytemonths free) * ($0.0023 per gigabytemonth)
(38.33 billable gigabytemonths used) * ($0.0023 per gigabytemonth)
$0.09
Note: After pasting the above content, Kindly check and remove any new line added
Therefore, based on the assumptions we made, you would only be charged $0.09 for the storage you used over the course of the month.
How Telnyx bills for operations
Telnyx will keep a record of every API operation that you make. At the end of the month, we will aggregate all of the requests made, subtract the free tier, and charge you accordingly.
For example, let's make a few assumptions:
 You make 100,000 Class A operations every day for an entire month.
 You make 100,000 Class B operations every day for an entire month.
 There are 30 days in a given month.
Now let's figure out how much these operations will cost you.
To calculate the cost of the Class A operations:
(billable Class A operations) * (price per 1 million Class A operations) = Total Cost
((100,000 Class A operations per day) * (30 days per month)  (1 million free Class A operations)) * ($0.50 per 1 million requests) = Total Cost
(3 million Class A operations made in a month  1 million free Class A operations per month) * * ($0.50 per 1 million Class A operations) = Total Cost
(2 million billable Class A operations) * ($0.50 per 1 million Class A Operations) = Total Cost
Total Cost = $1.00
Note: After pasting the above content, Kindly check and remove any new line added
To calculate the cost of the Class B Operations:
(billable Class B operations) * (price per 1 million Class B operations) = Total Cost
((100,000 Class B operations per day) * (30 days per month)  (10 million free Class B operations)) * ($0.04 per 1 million requests) = Total Cost
(3 million Class B operations made in a month  10 million free Class B operations per month) * ($0.04 per 1 million Class B operations) = Total Cost
(0 billable Class B operations) * ($0.04 per 1 million Class B Operations) = Total Cost
Total Cost = $0
Note: After pasting the above content, Kindly check and remove any new line added
In the example above, the user did not make enough Class B operations that month to exceed the free tier. Therefore, they had 0 billable Class B operations, and were not charged for those operations.
Operation type classification
We define requests as Class A and Class B operations based on the following table:
Operation Type  General commands  Specific API commands that we currently support 
Class A Operations  PUT, LIST, COPY, POST  PutObject, ListObjectsV2, ListBuckets 
Class B Operations  GET, HEAD  GetObject, HeadBucket, HeadObject 
Free Operations  DELETE (and CreateBucket)  DeleteBucket, DeleteObject, DeleteObjects, CreateBucket 