CodeCarbon Telemetry API

The Telemetry API from CodeCarbon — 1 operation(s) for telemetry.

GitHub OpenAPI

Operations 1

POST /telemetry Add Telemetry #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/codecarbon:codecarbon-telemetry-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

codecarbon-telemetry-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Codecarbon Telemetry API
  version: 0.1.0
  x-refined-note:
  - x-original-title differs across the merged source definitions and was not carried
  description: 'Operations tagged Telemetry across 2 of this provider''s published API definitions: codecarbon-openapi.json, codecarbon-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: /api/
- url: https://api.codecarbon.io/api
  description: Resolved from the relative server /api/ as served at https://api.codecarbon.io/openapi.json
tags:
- name: Telemetry
paths:
  /telemetry:
    post:
      tags:
      - Telemetry
      summary: Add Telemetry
      operationId: add_telemetry_telemetry_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TelemetryCreate'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                type: string
                format: uuid
                title: Response Add Telemetry Telemetry Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    servers:
    - url: /api/
components:
  schemas:
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TelemetryLevel:
      type: string
      enum:
      - disabled
      - minimal
      - extensive
      title: TelemetryLevel
    TelemetryCreate:
      properties:
        timestamp:
          type: string
          format: date-time
          title: Timestamp
        telemetry_level:
          $ref: '#/components/schemas/TelemetryLevel'
        os:
          anyOf:
          - type: string
          - type: 'null'
          title: Os
        country_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Country Name
        country_iso_code:
          anyOf:
          - type: string
            maxLength: 3
            minLength: 2
          - type: 'null'
          title: Country Iso Code
        region:
          anyOf:
          - type: string
          - type: 'null'
          title: Region
        cloud_provider:
          anyOf:
          - type: string
          - type: 'null'
          title: Cloud Provider
        cloud_region:
          anyOf:
          - type: string
          - type: 'null'
          title: Cloud Region
        longitude:
          anyOf:
          - type: number
            maximum: 180.0
            minimum: -180.0
          - type: 'null'
          title: Longitude
        latitude:
          anyOf:
          - type: number
            maximum: 90.0
            minimum: -90.0
          - type: 'null'
          title: Latitude
        cpu_count:
          anyOf:
          - type: integer
            minimum: 0.0
          - type: 'null'
          title: Cpu Count
        cpu_physical_count:
          anyOf:
          - type: integer
            minimum: 0.0
          - type: 'null'
          title: Cpu Physical Count
        cpu_model:
          anyOf:
          - type: string
          - type: 'null'
          title: Cpu Model
        cpu_architecture:
          anyOf:
          - type: string
          - type: 'null'
          title: Cpu Architecture
        gpu_count:
          anyOf:
          - type: integer
            minimum: 0.0
          - type: 'null'
          title: Gpu Count
        gpu_model:
          anyOf:
          - type: string
          - type: 'null'
          title: Gpu Model
        gpu_driver_version:
          anyOf:
          - type: string
          - type: 'null'
          title: Gpu Driver Version
        gpu_memory_total_gb:
          anyOf:
          - type: number
            minimum: 0.0
          - type: 'null'
          title: Gpu Memory Total Gb
        ram_total_size_gb:
          anyOf:
          - type: number
            minimum: 0.0
          - type: 'null'
          title: Ram Total Size Gb
        cuda_version:
          anyOf:
          - type: string
          - type: 'null'
          title: Cuda Version
        cudnn_version:
          anyOf:
          - type: string
          - type: 'null'
          title: Cudnn Version
        python_version:
          anyOf:
          - type: string
          - type: 'null'
          title: Python Version
        python_implementation:
          anyOf:
          - type: string
          - type: 'null'
          title: Python Implementation
        python_executable_hash:
          anyOf:
          - type: string
            maxLength: 64
            minLength: 64
          - type: 'null'
          title: Python Executable Hash
        python_env_type:
          anyOf:
          - type: string
          - type: 'null'
          title: Python Env Type
        codecarbon_version:
          anyOf:
          - type: string
          - type: 'null'
          title: Codecarbon Version
        codecarbon_install_method:
          anyOf:
          - type: string
          - type: 'null'
          title: Codecarbon Install Method
        total_emissions_kg:
          anyOf:
          - type: number
            minimum: 0.0
          - type: 'null'
          title: Total Emissions Kg
        emissions_rate_kg_per_sec:
          anyOf:
          - type: number
            minimum: 0.0
          - type: 'null'
          title: Emissions Rate Kg Per Sec
        energy_consumed_kwh:
          anyOf:
          - type: number
            minimum: 0.0
          - type: 'null'
          title: Energy Consumed Kwh
        cpu_energy_kwh:
          anyOf:
          - type: number
            minimum: 0.0
          - type: 'null'
          title: Cpu Energy Kwh
        gpu_energy_kwh:
          anyOf:
          - type: number
            minimum: 0.0
          - type: 'null'
          title: Gpu Energy Kwh
        ram_energy_kwh:
          anyOf:
          - type: number
            minimum: 0.0
          - type: 'null'
          title: Ram Energy Kwh
        duration_seconds:
          anyOf:
          - type: number
            minimum: 0.0
          - type: 'null'
          title: Duration Seconds
        cpu_utilization_avg:
          anyOf:
          - type: number
            maximum: 100.0
            minimum: 0.0
          - type: 'null'
          title: Cpu Utilization Avg
        gpu_utilization_avg:
          anyOf:
          - type: number
            maximum: 100.0
            minimum: 0.0
          - type: 'null'
          title: Gpu Utilization Avg
        ram_utilization_avg:
          anyOf:
          - type: number
            maximum: 100.0
            minimum: 0.0
          - type: 'null'
          title: Ram Utilization Avg
        tracking_mode:
          anyOf:
          - type: string
          - type: 'null'
          title: Tracking Mode
        api_mode:
          anyOf:
          - type: string
          - type: 'null'
          title: Api Mode
        output_methods:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Output Methods
        hardware_tracked:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Hardware Tracked
        task_tracking_used:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Task Tracking Used
        decorator_vs_context:
          anyOf:
          - type: string
          - type: 'null'
          title: Decorator Vs Context
        measure_power_interval_secs:
          anyOf:
          - type: number
            minimum: 0.0
          - type: 'null'
          title: Measure Power Interval Secs
        hardware_detection_success:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Hardware Detection Success
        rapl_available:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Rapl Available
        gpu_detection_method:
          anyOf:
          - type: string
          - type: 'null'
          title: Gpu Detection Method
        first_measurement_time_ms:
          anyOf:
          - type: number
            minimum: 0.0
          - type: 'null'
          title: First Measurement Time Ms
        tracking_overhead_percent:
          anyOf:
          - type: number
            minimum: 0.0
          - type: 'null'
          title: Tracking Overhead Percent
        errors_encountered:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Errors Encountered
        warning_count:
          anyOf:
          - type: integer
            minimum: 0.0
          - type: 'null'
          title: Warning Count
        ide_used:
          anyOf:
          - type: string
          - type: 'null'
          title: Ide Used
        notebook_environment:
          anyOf:
          - type: string
          - type: 'null'
          title: Notebook Environment
        ci_environment:
          anyOf:
          - type: string
          - type: 'null'
          title: Ci Environment
        python_package_manager:
          anyOf:
          - type: string
          - type: 'null'
          title: Python Package Manager
        framework_detected:
          anyOf:
          - type: string
          - type: 'null'
          title: Framework Detected
        has_torch:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Has Torch
        torch_version:
          anyOf:
          - type: string
          - type: 'null'
          title: Torch Version
        has_transformers:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Has Transformers
        transformers_version:
          anyOf:
          - type: string
          - type: 'null'
          title: Transformers Version
        has_diffusers:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Has Diffusers
        diffusers_version:
          anyOf:
          - type: string
          - type: 'null'
          title: Diffusers Version
        has_tensorflow:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Has Tensorflow
        tensorflow_version:
          anyOf:
          - type: string
          - type: 'null'
          title: Tensorflow Version
        has_keras:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Has Keras
        keras_version:
          anyOf:
          - type: string
          - type: 'null'
          title: Keras Version
        has_pytorch_lightning:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Has Pytorch Lightning
        pytorch_lightning_version:
          anyOf:
          - type: string
          - type: 'null'
          title: Pytorch Lightning Version
        has_fastai:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Has Fastai
        fastai_version:
          anyOf:
          - type: string
          - type: 'null'
          title: Fastai Version
        ml_framework_primary:
          anyOf:
          - type: string
          - type: 'null'
          title: Ml Framework Primary
        container_runtime:
          anyOf:
          - type: string
          - type: 'null'
          title: Container Runtime
        in_container:
          anyOf:
          - type: boolean
          - type: 'null'
          title: In Container
        host_machine_hash:
          anyOf:
          - type: string
          - type: 'null'
          title: Host Machine Hash
      additionalProperties: false
      type: object
      required:
      - timestamp
      - telemetry_level
      title: TelemetryCreate
      example:
        codecarbon_version: 3.0.0
        country_iso_code: FRA
        country_name: France
        cpu_count: 12
        cpu_model: Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
        os: Linux-5.10.0-x86_64
        python_version: 3.11.5
        telemetry_level: minimal
        timestamp: '2026-05-03T12:00:00+00:00'
  securitySchemes:
    APIKeyCookie:
      type: apiKey
      in: cookie
      name: user_session
    HTTPBearer:
      type: http
      scheme: bearer
x-refined-from:
- codecarbon-openapi.json
- codecarbon-openapi.yml