CodeCarbon Projects API
The Projects API from CodeCarbon — 4 operation(s) for projects.
The Projects API from CodeCarbon — 4 operation(s) for projects.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
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.curl "https://apis.io/api/v1/apis/codecarbon:codecarbon-projects-api"
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.
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: 3.2.0
info:
title: Codecarbon Projects API
version: 0.1.0
x-refined-note:
- x-original-title differs across the merged source definitions and was not carried
description: 'Operations tagged Projects 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: Projects
paths:
/projects:
post:
tags:
- Projects
summary: Add Project
operationId: add_project_projects_post
security:
- APIKeyCookie: []
- HTTPBearer: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ProjectCreate'
responses:
'201':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/Project'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
get:
tags:
- Projects
summary: List Projects
operationId: list_projects_projects_get
security:
- APIKeyCookie: []
- HTTPBearer: []
parameters:
- name: organization
in: query
required: true
schema:
type: string
title: Organization
responses:
'200':
description: Successful Response
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Project'
title: Response List Projects Projects Get
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
servers:
- url: /api/
/projects/{project_id}:
delete:
tags:
- Projects
summary: Delete Project
operationId: delete_project_projects__project_id__delete
security:
- APIKeyCookie: []
- HTTPBearer: []
parameters:
- name: project_id
in: path
required: true
schema:
type: string
title: Project Id
responses:
'204':
description: Successful Response
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
patch:
tags:
- Projects
summary: Patch Project
operationId: patch_project_projects__project_id__patch
security:
- APIKeyCookie: []
- HTTPBearer: []
parameters:
- name: project_id
in: path
required: true
schema:
type: string
title: Project Id
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ProjectPatch'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/Project'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
get:
tags:
- Projects
summary: Read Project
operationId: read_project_projects__project_id__get
security:
- APIKeyCookie: []
- HTTPBearer: []
parameters:
- name: project_id
in: path
required: true
schema:
type: string
title: Project Id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/Project'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
servers:
- url: /api/
/projects/{project_id}/sums:
get:
tags:
- Projects
summary: Read Project Detailed Sums
operationId: read_project_detailed_sums_projects__project_id__sums_get
security:
- APIKeyCookie: []
- HTTPBearer: []
parameters:
- name: project_id
in: path
required: true
schema:
type: string
title: Project Id
- name: start_date
in: query
required: false
schema:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Start Date
- name: end_date
in: query
required: false
schema:
anyOf:
- type: string
format: date-time
- type: 'null'
title: End Date
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ProjectReport'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
servers:
- url: /api/
/organizations/{organization_id}/projects:
get:
tags:
- Projects
summary: List Projects Nested
operationId: list_projects_nested_organizations__organization_id__projects_get
security:
- APIKeyCookie: []
- HTTPBearer: []
parameters:
- name: organization_id
in: path
required: true
schema:
type: string
title: Organization Id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Project'
title: Response List Projects Nested Organizations Organization Id Projects Get
'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
ProjectCreate:
properties:
name:
type: string
title: Name
description:
type: string
title: Description
organization_id:
type: string
format: uuid
title: Organization Id
type: object
required:
- name
- description
- organization_id
title: ProjectCreate
example:
description: API for Code Carbon
name: API Code Carbon
organization_id: Code Carbon organization
Project:
properties:
name:
type: string
title: Name
description:
type: string
title: Description
organization_id:
type: string
format: uuid
title: Organization Id
id:
type: string
format: uuid
title: Id
experiments:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Experiments
default: []
public:
anyOf:
- type: boolean
- type: 'null'
title: Public
type: object
required:
- name
- description
- organization_id
- id
title: Project
example:
description: API for Code Carbon
name: API Code Carbon
organization_id: Code Carbon organization
ProjectReport:
properties:
name:
type: string
title: Name
description:
type: string
title: Description
organization_id:
type: string
format: uuid
title: Organization Id
project_id:
type: string
format: uuid
title: Project Id
emissions:
type: number
title: Emissions
cpu_power:
type: number
title: Cpu Power
gpu_power:
type: number
title: Gpu Power
ram_power:
type: number
title: Ram Power
cpu_energy:
type: number
title: Cpu Energy
gpu_energy:
type: number
title: Gpu Energy
ram_energy:
type: number
title: Ram Energy
energy_consumed:
type: number
title: Energy Consumed
duration:
type: number
title: Duration
emissions_rate:
type: number
title: Emissions Rate
emissions_count:
type: integer
title: Emissions Count
cpu_utilization_percent:
anyOf:
- type: number
- type: 'null'
title: Cpu Utilization Percent
gpu_utilization_percent:
anyOf:
- type: number
- type: 'null'
title: Gpu Utilization Percent
ram_utilization_percent:
anyOf:
- type: number
- type: 'null'
title: Ram Utilization Percent
type: object
required:
- name
- description
- organization_id
- project_id
- emissions
- cpu_power
- gpu_power
- ram_power
- cpu_energy
- gpu_energy
- ram_energy
- energy_consumed
- duration
- emissions_rate
- emissions_count
title: ProjectReport
example:
description: API for Code Carbon
name: API Code Carbon
organization_id: Code Carbon organization
ProjectPatch:
properties:
name:
anyOf:
- type: string
- type: 'null'
title: Name
description:
anyOf:
- type: string
- type: 'null'
title: Description
public:
anyOf:
- type: boolean
- type: 'null'
title: Public
type: object
title: ProjectPatch
example:
description: API for Code Carbon
name: API Code Carbon
securitySchemes:
APIKeyCookie:
type: apiKey
in: cookie
name: user_session
HTTPBearer:
type: http
scheme: bearer
x-refined-from:
- codecarbon-openapi.json
- codecarbon-openapi.yml