POST /api/data-hub/carbon/gpu-carbon-intensity

Calculate carbon intensity of GPU.

Authorization

🔒OAuth2: OAuth2PasswordBearer
Flow type: password
Token URL: token

Request Body

The request body must be in application/json format.

FieldTypeRequiredDescriptionConstraints
gpu_slugstringNoGPU slug
gpu_namestringNoGPU full name. if GPU slug is filled in, full name will be overridden; if GPU slug is not provided, full name shall be required
hours_usedstringYesGPU used in hours, should be greater then 0> 0
zipcodestringYesZip code of data center
country_codestringYesCounty code of data center, represented in ISO 3166-1 alpha 2, e.g., ‘US’ representing United States

Request Example

{
  "gpu_slug": "string",
  "gpu_name": "string",
  "hours_used": 0,
  "zipcode": "string",
  "country_code": "string"
}

Responses

  • 200: Successful Response
null
  • 422: Validation Error
{
  "detail": [
    {
      "loc": [
        "string"
        ],
        "msg": "string",
        "type": "string"
    }
  ]
}

POST /api/data-hub/carbon/batch/gpu-carbon-intensity

Batch query carbon intensity of GPUs.

Authorization

🔒OAuth2: OAuth2PasswordBearer
Flow type: password
Token URL: token

Request Body

The request body must be in application/json format.

FieldTypeRequiredDescriptionConstraints
dataArrayNoList of the GPU carbon intensity querying arguments

data (Array)

FieldTypeRequiredDescriptionConstraints
gpu_slugstringNoGPU Slug, if gpu_name is None, this field should be fulled in
gpu_namestringNoGPU Name, if gpu_slug is filled in, this field will be overridden; If gpu_slug is None, this field is required
hours_usedstringYesGPU used in hours, should be greater then 0> 0
zipcodestringYesZipcode of data center
country_codestringYesCountry code of data center, represented in ISO 3166-1 alpha 2, e.g., ‘US’ standing for United States

Request Example

{
  "data": []
}

Responses

  • 200: Successful Response
null
  • 422: Validation Error
{
  "detail": [
    {
      "loc": [
        "string"
        ],
        "msg": "string",
        "type": "string"
    }
  ]
}