📌 Note: All SiliconCarbon endpoints require an active subscription. Successful responses are wrapped in a{ "meta": {...}, "data": {...} }envelope; the documented response body for each endpoint is returned under thedatakey.
GET /api/data-hub/carbon/gpu-carbon-intensity
Calculate the carbon intensity of a GPU for a given location, using query parameters.Authorization
🔒OAuth2: OAuth2PasswordBearerFlow type: password
Token URL: token
Query Parameters
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
gpu_slug | string or null | No | GPU slug. Either gpu_slug or gpu_name must be provided. | |
gpu_name | string or null | No | GPU full name. If gpu_slug is filled in, full name will be overridden; if gpu_slug is not provided, full name is required. | |
hours_used | number | Yes | GPU used in hours, should be greater than 0. | > 0 |
zipcode | string | Yes | Zip code of data center. | |
country_code | string | Yes | Country code of data center, represented in ISO 3166-1 alpha-2, e.g., US for United States. |
Request Example
Responses
- 200: Successful Response
- 422: Validation Error
- 500: Business Error (e.g., region not found, GPU not found, or missing GPU identifier)
POST /api/data-hub/carbon/gpu-carbon-intensity
Calculate the carbon intensity of a GPU for a given location, using a JSON request body.Authorization
🔒OAuth2: OAuth2PasswordBearerFlow type: password
Token URL: token
Request Body
The request body must be inapplication/json format.
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
gpu_slug | string or null | No | GPU slug. Either gpu_slug or gpu_name must be provided. | |
gpu_name | string or null | No | GPU full name. If gpu_slug is filled in, full name will be overridden; if gpu_slug is not provided, full name is required. | |
hours_used | number | Yes | GPU used in hours, should be greater than 0. | > 0 |
zipcode | string | Yes | Zip code of data center. | |
country_code | string | Yes | Country code of data center, represented in ISO 3166-1 alpha-2, e.g., US for United States. |
Request Example
Responses
- 200: Successful Response
- 422: Validation Error
- 500: Business Error (e.g., region not found, GPU not found, or missing GPU identifier)
GET /api/data-hub/carbon/zone-emission-rate
Query the carbon emission rate of a zone by zipcode and country code.Authorization
🔒OAuth2: OAuth2PasswordBearerFlow type: password
Token URL: token
Query Parameters
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
zipcode | string | Yes | Zip code. | |
country_code | string | Yes | Country code, represented in ISO 3166-1 alpha-2, e.g., US for United States. |
Request Example
Responses
- 200: Successful Response
When no emission rate is found for the given zone,carbon_emission_rateis returned asnull.
- 422: Validation Error
GET /api/data-hub/carbon/gpu-carbon-provider-intensity
Calculate the carbon intensity of a GPU hosted by a specific cloud provider region.Authorization
🔒OAuth2: OAuth2PasswordBearerFlow type: password
Token URL: token
Query Parameters
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
gpu_slug | string or null | No | GPU slug. Either gpu_slug or gpu_name must be provided. | |
gpu_name | string or null | No | GPU full name. If gpu_slug is filled in, full name will be overridden; if gpu_slug is not provided, full name is required. | |
hours_used | number | Yes | GPU used in hours, should be greater than 0. | > 0 |
provider | string | Yes | Name of the provider. | |
provider_code | string | Yes | Unique code of the provider region. |
Request Example
Responses
- 200: Successful Response
- 422: Validation Error
- 500: Business Error (e.g., provider code not found, GPU not found, or missing GPU identifier)
POST /api/data-hub/carbon/batch/gpu-carbon-intensity
Batch query the carbon intensity of multiple GPUs in a single request. A maximum of 50 items may be submitted per request.Authorization
🔒OAuth2: OAuth2PasswordBearerFlow type: password
Token URL: token
Request Body
The request body must be inapplication/json format.
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
data | Array | No | List of the GPU carbon intensity querying arguments. | Max 50 items |
data (Array)
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
gpu_slug | string or null | No | GPU slug. If gpu_name is None, this field should be filled in. | |
gpu_name | string or null | No | GPU name. If gpu_slug is filled in, this field will be overridden; if gpu_slug is None, this field is required. | |
hours_used | number | Yes | GPU used in hours, should be greater than 0. | > 0 |
zipcode | string | Yes | Zipcode of data center. | |
country_code | string | Yes | Country code of data center, represented in ISO 3166-1 alpha-2, e.g., US for United States. |
Request Example
Responses
- 200: Successful Response
When the GPU or the carbon emission data for the given zone is not found,carbon_intensity,carbon_emission_rate, andcarbon_data_updated_timeare returned asnullfor that item.
- 422: Validation Error
- 500: Business Error (e.g., batch exceeds 50 items, or an item is missing both
gpu_slugandgpu_name)
GET /api/data-hub/carbon/country
Query country detail information. Supports fuzzy (prefix) search by country name.Authorization
🔒OAuth2: OAuth2PasswordBearerFlow type: password
Token URL: token
Query Parameters
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
country_name | string | No | Country name; supports prefix search. If omitted, all countries are returned. |
Request Example
Responses
- 200: Successful Response
GET /api/data-hub/carbon/default-zipcode
Query the default zipcode of a country by country code.Authorization
🔒OAuth2: OAuth2PasswordBearerFlow type: password
Token URL: token
Query Parameters
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
country_code | string | Yes | Country code, represented in ISO 3166-1 alpha-2, e.g., US for United States. |
Request Example
Responses
- 200: Successful Response
data key.
If the country has no zipcodes, data is returned as an empty string.
- 422: Validation Error
GET /api/data-hub/carbon/providers/
Get the list of all data center providers.Authorization
🔒OAuth2: OAuth2PasswordBearerFlow type: password
Token URL: token
Query Parameters
This endpoint takes no query parameters.Request Example
Responses
- 200: Successful Response
GET /api/data-hub/carbon/providers//codes
Get the region codes for a given provider by provider name.Authorization
🔒OAuth2: OAuth2PasswordBearerFlow type: password
Token URL: token
Path Parameters
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
provider_name | string | Yes | Name of the provider. |
Request Example
Responses
- 200: Successful Response
If the provider is not found, bothproviderandcodesare returned asnull.
GET /api/data-hub/carbon/providers_selection//codes
Get the region codes for a given provider, restricted to a fixed set of supported providers.Authorization
🔒OAuth2: OAuth2PasswordBearerFlow type: password
Token URL: token
Path Parameters
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
provider_name | string | Yes | Name of the provider. Must be one of the supported provider names. | Amazon Web Services, Google Cloud Platform, Azure |
Request Example
Responses
- 200: Successful Response
If the provider is not found or has no codes,datais returned asnull.
GET /api/data-hub/carbon/providers_with_codes/
Get the list of all providers, each with its associated region codes.Authorization
🔒OAuth2: OAuth2PasswordBearerFlow type: password
Token URL: token
Query Parameters
This endpoint takes no query parameters.Request Example
Responses
- 200: Successful Response