API Reference
Cloud Computing

Cloud Computing ADD-ONADD-ON

Climatiq makes endpoints available to help you calculate the carbon footprint of the cloud resources you use. It will automatically select emission factors based on your cloud provider and region, so you get the right emission factor for your datacenter.

All the cloud computing endpoints expect you to provide the cloud provider in the url. Where the urls state :provider you must replace it with a supported cloud provider. You can view the supported cloud providers by using the metadata endpoint

For examples of how to perform calculations for specific services, or extra information about our methodology, please view the Cloud Computing Guide

Metadata

GET Returns metadata, such as what sort of providers and regions are available for the different computing endpoints.

Request

https://beta4.api.climatiq.io/compute

Response

The endpoint will return metadata for all cloud computing endpoints.

Attribute
cloud_providers An object where each key is the id for a cloud provider, and the corresponding value contains additional data about that cloud provider.

For each cloud provider an object is provided that consists of the following data.

Attribute
provider_full_name string
The full, human-readable name for the provider
provider_id string
The id of the cloud provider. This is the value you must use when specifying provider in the computing endpoints.
regions [string]
The different available regions for this provider.
virtual_machine_instances [string]
The different instances you can use in Virtual Machine Instance endpoint for this provider.
{
"cloud_providers": {
"aws": {
"provider_full_name": "Amazon Web Services",
"provider_id": "aws",
"regions": [
"af_south_1",
"ap_east_1",
"ap_northeast_1"
// ...
],
"virtual_machine_instances": [
"a1.medium",
"a1.large",
"a1.xlarge",
"a1.2xlarge",
"a1.4xlarge",
"a1.metal",
"c1.medium"
// ...
]
},
"azure": {
"provider_full_name": "Microsoft Azure",
"provider_id": "azure",
"regions": [
"central_india",
"central_us"
// ...
]
// ...
}
// More providers here
}
}

VM Instance

POST Calculate total estimated emissions based on the usage of a specific virtual machine instance. This endpoint estimates both the embodied emissions (meaning the emissions related to the manufacturing and disposal of the physical components, expressed per CPU hour over the expected lifetime of the hardware) and the electricity usage of the different components.

https://beta4.api.climatiq.io/compute/:provider/instance

Where the :provider path argument must be replaced with the id of the supported cloud providers. You can retrieve the different ids from the computing metadata endpoint

Request

The following parameters can be defined as a JSON-encoded object in a body.

AttributesRequiredDefault
region string
The region that is relevant for the calculation, as specified by the cloud provider.
required
instance string
The specific virtual machine instance type you are using. You may query the metadata endpoint to get a list of valid instances for each provider.
required
duration number
How long the machine is running for.
required
duration_unit string
The unit the duration value is in. The values accepted here are the same as in the Time unit.
optionalh
year number
The year that the computing resources were used. Climatiq will pick emission factors that is as close to the supplied year as possible.
optionalThe current year
average_vcpu_utilization number
How much the vCPU's on the instance are utilized in the given timeframe you are estimating for. Must be a number between 0 and 1
optional0.5
overrides overrides object
If you need more fine-grained control over some behaviour, you may specify an object with overrides to further customize the endpoint behaviour.
optional
curl --request POST \
--url https://beta4.api.climatiq.io/compute/azure/instance \
--header 'Authorization: Bearer API_KEY' \
--data '{
"region": "uk_west",
"instance": "h8",
"duration": 24,
"duration_unit": "h"
}'
Different CPU architectures

In a few cases, the same instance might have different embodied emissions depending on the underlying CPU architecture that powers the instance. There's no way to find out the underlying architecture.
In cases like that, Climatiq will be conservative and assume the most CO2e-intensive CPU architecture.

Response

The response includes a list of estimates for the different components of using an instance.

Attribute
cpu_estimate Estimation
An estimate corresponding to the electricity used for the CPU part of the instance.
memory_estimate Estimation
An estimate corresponding to the electricity used for the memory (RAM) part of the instance.
embodied_cpu_estimate Estimation
An estimate corresponding to the embodied emissions, meaning the emissions related to the manufacturing and disposal of the physical components, of the CPU part of this instance. This is expressed per CPU hour over the expected lifetime of the hardware.
calculation_details object
Metadata about the calculation to better understand the results
Double counting of memory

The underlying data for the CPU estimates are based on power benchmarks of CPUs that includes some degree of memory as well. Climatiq does not currently take that into account when performing memory estimates. This means there can be some degree of over-estimation happening, as some of the memory might be estimated as part of the CPU, and then again as part of the memory estimate. Climatiq believes it is preferable to include this potential inaccuracy over not including memory in the estimates.


The calculation_details object contains the following attributes to help you understand the calculation better.

Attribute
instance string
The string identifying the instance type selected
instance_memory number
The memory in memory_unit that the given instance has. This is what's used as the basis for memory_estimate.
memory_unit string
The unit that the instance_memory is expressed in. Is currently always GB(Gigabytes)
vcpu_cores number
The amount of virtual CPU cores the instance has.
average_vcpu_utilization number
The average utilization over all virtual CPU cores of the instance.
power_usage_effectiveness number
The power usage effectiveness used in the calculations.
energy_used_cpu number
The total amount of energy, expressed in energy_unit used by the CPU part of the instance.
energy_used_memory number
The total amount of energy, expressed in energy_unit used by the memory part of the instance.
energy_unit string
The unit that energy usage is expressed in. Is currently always kWh (kilowatt-hours)
{
"total_co2e": 0.7436632058974948,
"total_co2e_unit": "kg",
"memory_estimate": {
"co2e": 0.13822429911349482,
"co2e_unit": "kg",
"co2e_calculation_method": "ar5",
"co2e_calculation_origin": "source",
"emission_factor": {
"name": "Electricity supplied from grid",
"activity_id": "electricity-supply_grid-source_supplier_mix",
"id": "dfdeec5e-3137-4912-aa2b-1008575cf245",
"access_type": "public",
"source": "BEIS",
"source_dataset": "Greenhouse gas reporting: conversion factors 2023",
"year": 2023,
"region": "GB",
"category": "Electricity",
"source_lca_activity": "electricity_generation",
"data_quality_flags": []
},
"constituent_gases": {
"co2e_total": 0.13822429911349482,
"co2e_other": null,
"co2": 0.13681582240933934,
"ch4": 0.000021360784138850794,
"n2o": 0.0000030706127199598018
},
"activity_data": {
"activity_value": 0.6675245043390874,
"activity_unit": "kWh"
},
"audit_trail": "enabled"
},
"cpu_estimate": {
"co2e": 0.10649427878399999,
"co2e_unit": "kg",
"co2e_calculation_method": "ar5",
"co2e_calculation_origin": "source",
"emission_factor": {
"name": "Electricity supplied from grid",
"activity_id": "electricity-supply_grid-source_supplier_mix",
"id": "dfdeec5e-3137-4912-aa2b-1008575cf245",
"access_type": "public",
"source": "BEIS",
"source_dataset": "Greenhouse gas reporting: conversion factors 2023",
"year": 2023,
"region": "GB",
"category": "Electricity",
"source_lca_activity": "electricity_generation",
"data_quality_flags": []
},
"constituent_gases": {
"co2e_total": 0.10649427878399999,
"co2e_other": null,
"co2": 0.10540912435199999,
"ch4": 0.000016457318399999998,
"n2o": 0.00000236573952
},
"activity_data": {
"activity_value": 0.5142912,
"activity_unit": "kWh"
},
"audit_trail": "enabled"
},
"embodied_cpu_estimate": {
"co2e": 0.498944628,
"co2e_unit": "kg",
"co2e_calculation_method": "ar4",
"co2e_calculation_origin": "source",
"emission_factor": {
"name": "AZURE - Embodied emissions - H-series - H8 - Haswell",
"activity_id": "cpu-provider_azure-type_h_series_h8_haswell",
"id": "1e5983ef-a134-417a-944a-3f1c93b9f61e",
"access_type": "public",
"source": "CCF",
"source_dataset": "Derived from CCF models",
"year": 2021,
"region": "GLOBAL",
"category": "Cloud Computing - CPU",
"source_lca_activity": "upstream-end_of_life",
"data_quality_flags": [
"notable_methodological_variance"
]
},
"constituent_gases": {
"co2e_total": 0.498944628,
"co2e_other": null,
"co2": null,
"ch4": null,
"n2o": null
},
"activity_data": {
"activity_value": 24,
"activity_unit": "instance-hour"
},
"audit_trail": "enabled"
},
"calculation_details": {
"instance": "h8",
"instance_memory": 60.129542144000006,
"memory_unit": "GB",
"vcpu_cores": 8,
"average_vcpu_utilization": 0.5,
"power_usage_effectiveness": 1.18,
"energy_used_cpu": 0.5142912,
"energy_used_memory": 0.6675245043390874,
"energy_unit": "kWh"
}
}

Batch Estimations

POST

Batch Estimations for VM instances, allowing you to calculate multiple emission estimations in a single request. Currently limited to maximum 100 operations per request.

https://beta4.api.climatiq.io/compute/:provider/instance/batch

Request

AttributeRequired
array
List of instance estimates. Every operation should follow the same syntax followed by the instance request object.
required
curl --request POST \
--url https://beta4.api.climatiq.io/compute/azure/instance/batch \
--header 'Authorization: Bearer API_KEY' \
--data '[
{
"region": "uk_west",
"instance": "h8",
"duration": 24,
"duration_unit": "h"
},
{
"region": "uk_west",
"instance": "d2s_v3",
"duration": 24,
"duration_unit": "h"
}
]'

Response

The response includes a list of responses, like the regular batch endpoint.

Attribute
results [Instance Response]
List of results for every operation.
{
"results": [
{
"total_co2e": 0.7436632058974948,
"total_co2e_unit": "kg",
"memory_estimate": {
"co2e": 0.13822429911349482,
"co2e_unit": "kg",
"co2e_calculation_method": "ar5",
"co2e_calculation_origin": "source",
"emission_factor": {
"name": "Electricity supplied from grid",
"activity_id": "electricity-supply_grid-source_supplier_mix",
"id": "dfdeec5e-3137-4912-aa2b-1008575cf245",
"access_type": "public",
"source": "BEIS",
"source_dataset": "Greenhouse gas reporting: conversion factors 2023",
"year": 2023,
"region": "GB",
"category": "Electricity",
"source_lca_activity": "electricity_generation",
"data_quality_flags": []
},
"constituent_gases": {
"co2e_total": 0.13822429911349482,
"co2e_other": null,
"co2": 0.13681582240933934,
"ch4": 0.000021360784138850794,
"n2o": 0.0000030706127199598018
},
"activity_data": {
"activity_value": 0.6675245043390874,
"activity_unit": "kWh"
},
"audit_trail": "enabled"
},
"cpu_estimate": {
"co2e": 0.10649427878399999,
"co2e_unit": "kg",
"co2e_calculation_method": "ar5",
"co2e_calculation_origin": "source",
"emission_factor": {
"name": "Electricity supplied from grid",
"activity_id": "electricity-supply_grid-source_supplier_mix",
"id": "dfdeec5e-3137-4912-aa2b-1008575cf245",
"access_type": "public",
"source": "BEIS",
"source_dataset": "Greenhouse gas reporting: conversion factors 2023",
"year": 2023,
"region": "GB",
"category": "Electricity",
"source_lca_activity": "electricity_generation",
"data_quality_flags": []
},
"constituent_gases": {
"co2e_total": 0.10649427878399999,
"co2e_other": null,
"co2": 0.10540912435199999,
"ch4": 0.000016457318399999998,
"n2o": 0.00000236573952
},
"activity_data": {
"activity_value": 0.5142912,
"activity_unit": "kWh"
},
"audit_trail": "enabled"
},
"embodied_cpu_estimate": {
"co2e": 0.498944628,
"co2e_unit": "kg",
"co2e_calculation_method": "ar4",
"co2e_calculation_origin": "source",
"emission_factor": {
"name": "AZURE - Embodied emissions - H-series - H8 - Haswell",
"activity_id": "cpu-provider_azure-type_h_series_h8_haswell",
"id": "1e5983ef-a134-417a-944a-3f1c93b9f61e",
"access_type": "public",
"source": "CCF",
"source_dataset": "Derived from CCF models",
"year": 2021,
"region": "GLOBAL",
"category": "Cloud Computing - CPU",
"source_lca_activity": "upstream-end_of_life",
"data_quality_flags": [
"notable_methodological_variance"
]
},
"constituent_gases": {
"co2e_total": 0.498944628,
"co2e_other": null,
"co2": null,
"ch4": null,
"n2o": null
},
"activity_data": {
"activity_value": 24,
"activity_unit": "instance-hour"
},
"audit_trail": "enabled"
},
"calculation_details": {
"instance": "h8",
"instance_memory": 60.129542144000006,
"memory_unit": "GB",
"vcpu_cores": 8,
"average_vcpu_utilization": 0.5,
"power_usage_effectiveness": 1.18,
"energy_used_cpu": 0.5142912,
"energy_used_memory": 0.6675245043390874,
"energy_unit": "kWh"
}
},
{
"total_co2e": 0.07851652414078497,
"total_co2e_unit": "kg",
"memory_estimate": {
"co2e": 0.019746328444784973,
"co2e_unit": "kg",
"co2e_calculation_method": "ar5",
"co2e_calculation_origin": "source",
"emission_factor": {
"name": "Electricity supplied from grid",
"activity_id": "electricity-supply_grid-source_supplier_mix",
"id": "dfdeec5e-3137-4912-aa2b-1008575cf245",
"access_type": "public",
"source": "BEIS",
"source_dataset": "Greenhouse gas reporting: conversion factors 2023",
"year": 2023,
"region": "GB",
"category": "Electricity",
"source_lca_activity": "electricity_generation",
"data_quality_flags": []
},
"constituent_gases": {
"co2e_total": 0.019746328444784973,
"co2e_other": null,
"co2": 0.01954511748704848,
"ch4": 0.000003051540591264399,
"n2o": 4.386589599942574e-7
},
"activity_data": {
"activity_value": 0.09536064347701248,
"activity_unit": "kWh"
},
"audit_trail": "enabled"
},
"cpu_estimate": {
"co2e": 0.026623569695999997,
"co2e_unit": "kg",
"co2e_calculation_method": "ar5",
"co2e_calculation_origin": "source",
"emission_factor": {
"name": "Electricity supplied from grid",
"activity_id": "electricity-supply_grid-source_supplier_mix",
"id": "dfdeec5e-3137-4912-aa2b-1008575cf245",
"access_type": "public",
"source": "BEIS",
"source_dataset": "Greenhouse gas reporting: conversion factors 2023",
"year": 2023,
"region": "GB",
"category": "Electricity",
"source_lca_activity": "electricity_generation",
"data_quality_flags": []
},
"constituent_gases": {
"co2e_total": 0.026623569695999997,
"co2e_other": null,
"co2": 0.026352281087999998,
"ch4": 0.0000041143295999999995,
"n2o": 5.9143488e-7
},
"activity_data": {
"activity_value": 0.1285728,
"activity_unit": "kWh"
},
"audit_trail": "enabled"
},
"embodied_cpu_estimate": {
"co2e": 0.032146626,
"co2e_unit": "kg",
"co2e_calculation_method": "ar4",
"co2e_calculation_origin": "source",
"emission_factor": {
"name": "AZURE - Embodied emissions - D2s-64s v3 - D2s v3 - Haswell",
"activity_id": "cpu-provider_azure-type_d2s_64s_v3_d2s_v3_haswell",
"id": "cc0115d8-a2dd-45a8-a4e2-fa37ea4e5f70",
"access_type": "public",
"source": "CCF",
"source_dataset": "Derived from CCF models",
"year": 2021,
"region": "GLOBAL",
"category": "Cloud Computing - CPU",
"source_lca_activity": "upstream-end_of_life",
"data_quality_flags": [
"notable_methodological_variance"
]
},
"constituent_gases": {
"co2e_total": 0.032146626,
"co2e_other": null,
"co2": null,
"ch4": null,
"n2o": null
},
"activity_data": {
"activity_value": 24,
"activity_unit": "instance-hour"
},
"audit_trail": "enabled"
},
"calculation_details": {
"instance": "d2s_v3",
"instance_memory": 8.589934592,
"memory_unit": "GB",
"vcpu_cores": 2,
"average_vcpu_utilization": 0.5,
"power_usage_effectiveness": 1.18,
"energy_used_cpu": 0.1285728,
"energy_used_memory": 0.09536064347701248,
"energy_unit": "kWh"
}
}
]
}

CPU

Estimation

POST Calculate total estimated use-phase emissions based on the electricity usage for a set number of virtual CPU's (vCPUs)

https://beta4.api.climatiq.io/compute/:provider/cpu

Where the :provider path argument must be replaced with the id of the supported cloud providers. You can retrieve the different ids from the computing metadata endpoint

Request

The following parameters can be defined as a JSON-encoded object in a body.

AttributesRequiredDefault
region string
The region that is relevant for the calculation, as specified by the cloud provider.
required
cpu_count number
The number of virtual cores you are calculating for. Note that vCPU load is fixed at 50%.
required
average_vcpu_utilization number
The average load across all of your vCPU's specified as a float between 0 and 1.
If you have two vCPU's that are both working at 100% efficiency across the calculation duration, you would put in 1.
If you have four vCPU's where two are working at 100%, and two are working at 50%, you would put in 0.75 here.
optional0.5
duration number
How long the vCPUs are running for.
required
duration_unit string
The unit the duration value is in. The values accepted here are the same as in the Time unit.
optionalh
year number
The year that the computing resources were used. Climatiq will pick emission factors that is as close to the supplied year as possible.
optionalThe current year
overrides overrides object
If you need more fine-grained control over some behaviour, you may specify an object with overrides to further customize the endpoint behaviour.
optional
curl --request POST \
--url https://beta4.api.climatiq.io/compute/azure/cpu \
--header 'Authorization: Bearer API_KEY' \
--data '{
"cpu_count": 1,
"region": "uk_west",
"average_vcpu_utilization": 0.75,
"duration": 1,
"duration_unit": "h"
}'

Response

You will get an Estimation back with the co2e for the power consumption for the allocated memory for the given duration.

{
"co2e": 0.0007366929389999999,
"co2e_unit": "kg",
"co2e_calculation_method": "ar5",
"co2e_calculation_origin": "source",
"emission_factor": {
"name": "Electricity supplied from grid",
"activity_id": "electricity-supply_grid-source_supplier_mix",
"id": "dfdeec5e-3137-4912-aa2b-1008575cf245",
"access_type": "public",
"source": "BEIS",
"source_dataset": "Greenhouse gas reporting: conversion factors 2023",
"year": 2023,
"region": "GB",
"category": "Electricity",
"source_lca_activity": "electricity_generation",
"data_quality_flags": []
},
"constituent_gases": {
"co2e_total": 0.0007366929389999999,
"co2e_other": null,
"co2": 0.0007291861919999999,
"ch4": 1.1384639999999998e-7,
"n2o": 1.636542e-8
},
"activity_data": {
"activity_value": 0.0035576999999999996,
"activity_unit": "kWh"
},
"audit_trail": "enabled"
}

Batch Estimations

POST

Batch Estimations for CPU, allowing you to calculate multiple emission estimations in a single request. Currently limited to maximum 100 operations per request.

https://beta4.api.climatiq.io/compute/:provider/cpu/batch

Request

AttributeRequired
array
List of CPU estimates. Every operation should follow the same syntax followed by the CPU request object.
required
curl --request POST \
--url https://beta4.api.climatiq.io/compute/azure/cpu/batch \
--header 'Authorization: Bearer API_KEY' \
--data '[{
"cpu_count": 2,
"region": "uk_west",
"duration": 1,
"duration_unit": "h"
},
{
"cpu_count": 1,
"region": "germany",
"duration": 1,
"duration_unit": "h"
}]'

Response

The response includes a list of responses, like the regular batch endpoint.

Attribute
results [Estimation]
List of results for every operation.
{
"results": [
{
"co2e": 0.0011093154039999997,
"co2e_unit": "kg",
"co2e_calculation_method": "ar5",
"co2e_calculation_origin": "source",
"emission_factor": {
"name": "Electricity supplied from grid",
"activity_id": "electricity-supply_grid-source_supplier_mix",
"id": "dfdeec5e-3137-4912-aa2b-1008575cf245",
"access_type": "public",
"source": "BEIS",
"source_dataset": "Greenhouse gas reporting: conversion factors 2023",
"year": 2023,
"region": "GB",
"category": "Electricity",
"source_lca_activity": "electricity_generation",
"data_quality_flags": []
},
"constituent_gases": {
"co2e_total": 0.0011093154039999997,
"co2e_other": null,
"co2": 0.0010980117119999996,
"ch4": 1.7143039999999994e-7,
"n2o": 2.4643119999999993e-8
},
"activity_data": {
"activity_value": 0.005357199999999999,
"activity_unit": "kWh"
},
"audit_trail": "enabled"
},
{
"co2e": 0.0010383057179999997,
"co2e_unit": "kg",
"co2e_calculation_method": "ar4",
"co2e_calculation_origin": "source",
"emission_factor": {
"name": "Electricity supplied from grid - production mix",
"activity_id": "electricity-supply_grid-source_production_mix",
"id": "93fd4e16-4dbc-4d42-a2b3-3295441f3805",
"access_type": "public",
"source": "AIB",
"source_dataset": "European Residual Mix",
"year": 2022,
"region": "DE",
"category": "Electricity",
"source_lca_activity": "electricity_generation",
"data_quality_flags": [
"partial_factor",
"notable_methodological_variance"
]
},
"constituent_gases": {
"co2e_total": 0.0010383057179999997,
"co2e_other": null,
"co2": 0.0010383057179999997,
"ch4": null,
"n2o": null
},
"activity_data": {
"activity_value": 0.0026785999999999993,
"activity_unit": "kWh"
},
"audit_trail": "enabled"
}
]
}

Storage

Estimation

POST Calculate total estimated use-phase emissions based on the electricity consumption of storing data for a set amount of time.

https://beta4.api.climatiq.io/compute/:provider/storage

Where the :provider path argument must be replaced with the id of the supported cloud providers. You can retrieve the different ids from the computing metadata endpoint

Request

The following parameters can be defined as a JSON-encoded object in a body.

AttributesRequiredDefault
region string
The region that is relevant for the calculation, as specified by the cloud provider.
required
storage_type string
Which type of hard drive the data is stored on.
Valid values are ssd (solid-state drive) and hdd (hard disk drive).
The cloud provider does not always specify this for managed services, so you might have to make an informed guess. See our cloud computing guide for more information.
required
data number
How much data is stored. If you use managed services for storage that replicate data across multiple datacenters or hard drives, you might need to take your data amount and multiply it by a replication factor. See our cloud computing guide for more information.
required
data_unit string
The unit the data value is in. The values accepted here are the same as in the Data unit.
optionalMB
duration number
How long the data is stored for.
required
duration_unit string
The unit the duration value is in. The values accepted here are the same as in the Time unit.
optionalh
year number
The year that the computing resources were used. Climatiq will pick emission factors that is as close to the supplied year as possible.
optionalThe current year
overrides overrides object
If you need more fine-grained control over some behaviour, you may specify an object with overrides to further customize the endpoint behaviour.
optional
curl --request POST \
--url https://beta4.api.climatiq.io/compute/aws/storage \
--header 'Authorization: Bearer API_KEY' \
--data '{
"region": "af_south_1",
"storage_type": "ssd",
"data": 50,
"data_unit": "GB",
"duration": 1,
"duration_unit": "day"
}'

Response

You will get an Estimation back with the CO2e for the storage of the data for the given duration.

{
"co2e": 0.0014162076000000003,
"co2e_unit": "kg",
"co2e_calculation_method": "ar4",
"co2e_calculation_origin": "source",
"emission_factor": {
"name": "Electricity supplied from grid",
"activity_id": "electricity-supply_grid-source_supplier_mix",
"id": "90ffe15b-a32a-4a4e-9a49-eccbe3231ca1",
"access_type": "public",
"source": "CT",
"source_dataset": "Climate Transparency Report",
"year": 2021,
"region": "ZA",
"category": "Electricity",
"source_lca_activity": "electricity_generation",
"data_quality_flags": [
"partial_factor"
]
},
"constituent_gases": {
"co2e_total": 0.0014162076000000003,
"co2e_other": null,
"co2": 0.0014162076000000003,
"ch4": null,
"n2o": null
},
"activity_data": {
"activity_value": 0.0016344000000000003,
"activity_unit": "kWh"
},
"audit_trail": "enabled"
}

Batch Estimations

POST

Batch Estimations for Storage, allowing you to calculate multiple emission estimations in a single request. Currently limited to maximum 100 operations per request.

https://beta4.api.climatiq.io/compute/:provider/storage/batch

Request

AttributeRequired
array
List of Storage estimates. Every operation should follow the same syntax followed by the Storage request object.
required
curl --request POST \
--url https://beta4.api.climatiq.io/compute/aws/storage/batch \
--header 'Authorization: Bearer API_KEY' \
--data '[{
"region": "af_south_1",
"storage_type": "ssd",
"data": 50,
"data_unit": "GB",
"duration": 1,
"duration_unit": "day"
},
{
"region": "ap_east_1",
"storage_type": "ssd",
"data": 150,
"data_unit": "GB",
"duration": 1,
"duration_unit": "day"
}]'

Response

The response includes a list of responses, like the regular batch endpoint.

Attribute
results [Estimation]
List of results for every operation.
{
"results": [
{
"co2e": 0.0014162076000000003,
"co2e_unit": "kg",
"co2e_calculation_method": "ar4",
"co2e_calculation_origin": "source",
"emission_factor": {
"name": "Electricity supplied from grid",
"activity_id": "electricity-supply_grid-source_supplier_mix",
"id": "90ffe15b-a32a-4a4e-9a49-eccbe3231ca1",
"access_type": "public",
"source": "CT",
"source_dataset": "Climate Transparency Report",
"year": 2021,
"region": "ZA",
"category": "Electricity",
"source_lca_activity": "electricity_generation",
"data_quality_flags": [
"partial_factor"
]
},
"constituent_gases": {
"co2e_total": 0.0014162076000000003,
"co2e_other": null,
"co2": 0.0014162076000000003,
"ch4": null,
"n2o": null
},
"activity_data": {
"activity_value": 0.0016344000000000003,
"activity_unit": "kWh"
},
"audit_trail": "enabled"
},
{
"co2e": 0.0034812719999999992,
"co2e_unit": "kg",
"co2e_calculation_method": "ar4",
"co2e_calculation_origin": "source",
"emission_factor": {
"name": "Electricity supplied from grid plus T&D losses",
"activity_id": "electricity-supply_grid-source_supplier_mix",
"id": "661a4fd1-c156-4993-b1e4-7a45f1655970",
"access_type": "public",
"source": "HKEI",
"source_dataset": "HK Electric Investments Sustainability Report",
"year": 2021,
"region": "HK",
"category": "Electricity",
"source_lca_activity": "electricity_generation-transmission_and_distribution",
"data_quality_flags": [
"notable_methodological_variance"
]
},
"constituent_gases": {
"co2e_total": 0.0034812719999999992,
"co2e_other": null,
"co2": null,
"ch4": null,
"n2o": null
},
"activity_data": {
"activity_value": 0.004903199999999999,
"activity_unit": "kWh"
},
"audit_trail": "enabled"
}
]
}

Memory

Estimation

POST Calculate total estimated use-phase emissions based on the electricity consumption of having memory (RAM) available for a set amount of time.

https://beta4.api.climatiq.io/compute/:provider/memory

Where the :provider path argument must be replaced with the id of the supported cloud providers. You can retrieve the different ids from the computing metadata endpoint

Request

The following parameters can be defined as a JSON-encoded object in a body.

AttributesRequiredDefault
region string
The region that is relevant for the calculation, as specified by the cloud provider.
required
data number
How much memory you have allocated. As memory requires power to be available even if unused, you should put in the amount of memory that you have available - not only the amount you're using.
required
data_unit string
The unit the data value is in. The values accepted here are the same as in the Data unit.
optionalMB
duration number
How long the memory is available.
required
duration_unit string
The unit the duration value is in. The values accepted here are the same as in the Time unit.
optionalh
year number
The year that the computing resources were used. Climatiq will pick emission factors that is as close to the supplied year as possible.
optionalThe current year
overrides overrides object
If you need more fine-grained control over some behaviour, you may specify an object with overrides to further customize the endpoint behaviour.
optional
curl --request POST \
--url https://beta4.api.climatiq.io/compute/gcp/memory \
--header 'Authorization: Bearer API_KEY' \
--data '{
"region": "us_west_2",
"data": 8,
"data_unit": "GB",
"duration": 24,
"duration_unit": "h"
}'

Response

You will get an Estimation back with the co2e emitted by having the allocated memory available for the given duration.

{
"co2e": 0.0209459712,
"co2e_unit": "kg",
"co2e_calculation_method": "ar5",
"co2e_calculation_origin": "source",
"emission_factor": {
"name": "Electricity supplied from grid",
"activity_id": "electricity-supply_grid-source_supplier_mix",
"id": "a0ac749c-19a5-491e-b301-3517374313ca",
"access_type": "public",
"source": "Google",
"source_dataset": "Carbon data across GCP regions",
"year": 2021,
"region": "US-LAX",
"category": "Electricity",
"source_lca_activity": "electricity_generation",
"data_quality_flags": [
"self_reported"
]
},
"constituent_gases": {
"co2e_total": 0.0209459712,
"co2e_other": null,
"co2": null,
"ch4": null,
"n2o": null
},
"activity_data": {
"activity_value": 0.0827904,
"activity_unit": "kWh"
},
"audit_trail": "enabled"
}

Batch estimations

POST

Batch Estimations for Memory, allowing you to calculate multiple emission estimations in a single request. Currently limited to maximum 100 operations per request.

https://beta4.api.climatiq.io/compute/:provider/memory/batch

Request

AttributeRequired
array
List of Memory estimates. Every operation should follow the same syntax followed by the Memory request object.
required
curl --request POST \
--url https://beta4.api.climatiq.io/compute/gcp/memory/batch \
--header 'Authorization: Bearer API_KEY' \
--data '[{
"region": "us_west_2",
"data": 8,
"data_unit": "GB",
"duration": 24,
"duration_unit": "h"
},
{
"region": "us_west_1",
"data": 16,
"data_unit": "GB",
"duration": 24,
"duration_unit": "h"
}]'

Response

The response includes a list of responses, like the regular batch endpoint.

Attribute
results [Estimation]
List of results for every operation.
{
"results": [
{
"co2e": 0.0209459712,
"co2e_unit": "kg",
"co2e_calculation_method": "ar5",
"co2e_calculation_origin": "source",
"emission_factor": {
"name": "Electricity supplied from grid",
"activity_id": "electricity-supply_grid-source_supplier_mix",
"id": "a0ac749c-19a5-491e-b301-3517374313ca",
"access_type": "public",
"source": "Google",
"source_dataset": "Carbon data across GCP regions",
"year": 2021,
"region": "US-LAX",
"category": "Electricity",
"source_lca_activity": "electricity_generation",
"data_quality_flags": [
"self_reported"
]
},
"constituent_gases": {
"co2e_total": 0.0209459712,
"co2e_other": null,
"co2": null,
"ch4": null,
"n2o": null
},
"activity_data": {
"activity_value": 0.0827904,
"activity_unit": "kWh"
},
"audit_trail": "enabled"
},
{
"co2e": 0.0129153024,
"co2e_unit": "kg",
"co2e_calculation_method": "ar5",
"co2e_calculation_origin": "source",
"emission_factor": {
"name": "Electricity supplied from grid",
"activity_id": "electricity-supply_grid-source_supplier_mix",
"id": "b06ed228-622a-40f6-b7be-7a886b343b7d",
"access_type": "public",
"source": "Google",
"source_dataset": "Carbon data across GCP regions",
"year": 2021,
"region": "US-OR",
"category": "Electricity",
"source_lca_activity": "electricity_generation",
"data_quality_flags": [
"self_reported"
]
},
"constituent_gases": {
"co2e_total": 0.0129153024,
"co2e_other": null,
"co2": null,
"ch4": null,
"n2o": null
},
"activity_data": {
"activity_value": 0.1655808,
"activity_unit": "kWh"
},
"audit_trail": "enabled"
}
]
}

Overrides

The overrides object in the cloud computing endpoints may have the following attributes.

Override attributesRequiredDefault
power_usage_effectiveness number
The power usage effectiveness (opens in a new tab)(PUE) of the data center running your machines. By default, Climatiq uses cloud specific PUE's.
optional
electricity_emission_factor Selector
By default Climatiq selects an appropriate high-quality electricity emission factor for the geographical region your instance is located in. If you want to override this selection you may supply a Selector here. If you do that, you have full control over selecting an emission factor. The emission factor must have the Energy unit type.
optional