Skip to main content

Billing

You are billed on two things

  • The bytes stored
  • The count of API operations invoked

Storage billing explained

The minimum billable object size is 4 KiB. Here is an example — if you have two 11-byte objects in a bucket, they will be counted as 4 KiB each, i.e. 8 KiB in total. 

Storage consumed by each bucket is billed in multiples of 4 KiB, rounded up; Metadata counts towards storage consumed.

Every month, your first 10 GiB is free of charge. Any bytes beyond that are billed at $0.006 per GiB per month. Bytes stored across all buckets are recorded hourly. Usage is subsequently calculated and debited from your balance. 

Here is a hypothetical example:

  • You have a $10 balance in your account.
  • At time t, you uploaded 11 GiB of objects into various buckets in your account.
  • At the next whole clock hour after time t
    • a snapshot of your total storage is recorded as 11 GiB
    • your usage is calculated as (11 GiB - 10 GiB) x ($ 0.006 / 30 days / 24 hrs)
    • that usage is then debited from your $10 balance

Lastly, free tier is not available to an account if its available credit is negative.

Here is a hypothetical example:

  • You have a $10 balance in your account
  • Through usage of Voice and Messaging API, you've depleted your balance and resulted in a negative available credit of -0.1 USD.
  • You will not be able to create a bucket and upload objects until your available credit is restored.

API operations billing explained

API operations are classified and billed the following way —

CategoriesApplicable API OpsPrices
Class APUT, COPY, POST, LIST requestsEvery month, the first 1 Million is free of charge, thereafter $0.50 per 1 Million
Class BGET, SELECT, and all other requestEvery month, the first 10 Million is free of charge, thereafter $0.04 per 1  Million

Account suspension and loss of data

warning

When an account's available credit becomes negative,

  • You will be notified via email of insufficient balance.
  • Your data is still retained in the system but API requests will fail with error message UserSuspended.
  • Access will be restored when available credit is made positive via payment.

If available credit remains negative for 30 days, your account will be abolished. As a consequence, all data will be irreversibly purged.

Relevant companion APIs

Two companion APIs exist to allow for querying of usage:

  • Bucket Snapshot is a snapshot of the bytes your bucket is taking up at the moment of query.
  • API Usage shows the stats of your API requests.

Query bucket snapshot

Example Request

GET /v2/storage/buckets/mybucket/usage/storage HTTP/1.1
Host: api.telnyx.com
Authorization: Bearer XXX

Example Response

{
"data": [
{
"size": 1078984704,
"size_kb": 1053696,
"num_objects": 2,
"timestamp": "2024-07-30T14:26:43Z"
}
],
"meta": {
"page_number": 1,
"page_size": 1,
"total_pages": 1,
"total_results": 1
}
}

Query API usage

Example Request

GET /v2/storage/buckets/mybucket/usage/api?filter[start_time]=2024-07-01T00:00:00.000Z&filter[end_time]=2024-07-31T00:00:00.000Z HTTP/1.1
Host: api.telnyx.com
Authorization: Bearer XXX

Example Response

{
"data": [
{
"categories": [
{
"bytes_sent": 1768,
"bytes_received": 0,
"ops": 13,
"successful_ops": 13,
"category": "get_bucket_location"
},
{
"bytes_sent": 141,
"bytes_received": 0,
"ops": 1,
"successful_ops": 1,
"category": "get_bucket_policy_status"
},
{
"bytes_sent": 137,
"bytes_received": 0,
"ops": 1,
"successful_ops": 1,
"category": "get_bucket_versioning"
},
{
"bytes_sent": 2022703104,
"bytes_received": 0,
"ops": 2,
"successful_ops": 2,
"category": "get_obj"
},
{
"bytes_sent": 1623,
"bytes_received": 0,
"ops": 3,
"successful_ops": 3,
"category": "list_bucket"
}
],
"total": {
"bytes_sent": 2022706773,
"bytes_received": 0,
"ops": 20,
"successful_ops": 20
},
"timestamp": "2024-07-02T17:00:00.000Z"
}
]
}