---
title: "Get project factory cost by skill"
method: GET
path: "/experimental/projects/{projectId}/factory/metrics/cost-by-skill"
tags: ["Projects"]
---

# Get project factory cost by skill

`GET /experimental/projects/{projectId}/factory/metrics/cost-by-skill`

## Request

- Base URL: `https://api.tessl.io`
- URL: `https://api.tessl.io/experimental/projects/{projectId}/factory/metrics/cost-by-skill`
- Auth: none declared

Sums the Tessl credits of this project's finished runs (completed, failed or cancelled) by skill, in the requested window (`filter[timestamp][gte]` to the exclusive `filter[timestamp][lt]`, at most 90 days, the last 7 days when neither is given) and in the window of the same length just before it, by run creation time. A run’s skill is its `skillRef` without a trailing `@<version>`, so versions of one skill add up, or `(no skill)` when it has none. `prs` counts the distinct PRs the runs link, by any rel, and `creditsPerPr` is the credits of the runs that link at least one PR divided by `prs`, null when there are none. `skills` is sorted by current credits, highest first. `series` has one point per UTC day that the current window touches, zeros included, and its points add up to `current.credits`.

## Path parameters

- `projectId` string, uuid, required

## Query parameters

- `filter[timestamp][gte]` string, date-time
- `filter[timestamp][lt]` string, date-time

## Headers

- `Authorization` string

## Response `200`

Default Response

- object
  - `links` object, required
    - `self` string, uri, required
  - `data` object, required
    - `id` string, uuid, required
    - `type` 'project-factory-cost-by-skill', required
    - `attributes` object, required
      - `current` object, required
        - `start` string, date-time, required
        - `end` string, date-time, required
        - `runs` integer, required
        - `credits` number, required
        - `prs` integer, required
        - `creditsPerPr` number, nullable, required
      - `previous` object, required
        - `start` string, date-time, required
        - `end` string, date-time, required
        - `runs` integer, required
        - `credits` number, required
        - `prs` integer, required
        - `creditsPerPr` number, nullable, required
      - `skills` object[], required
        - `skill` string, required
        - `current` object, required
          - `runs` integer, required
          - `credits` number, required
          - `prs` integer, required
          - `creditsPerPr` number, nullable, required
        - `previous` object, required
          - `runs` integer, required
          - `credits` number, required
          - `prs` integer, required
          - `creditsPerPr` number, nullable, required
      - `series` object[], required
        - `day` string, required
        - `credits` number, required

## Other responses

- `401`: Unauthorized
- `403`: Default Response
- `404`: Not Found
- `500`: Internal Server Error

## Changes

- **2026-10-29** `06d2142ed144`: 1 info
  - api operation id `getProjectFactoryMetricCostBySkill` was added
- **2026-10-28** `9bcdf5976acf`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/tessl/apis/tessl-api/changes/experimental/projects/:projectId/factory/metrics/cost-by-skill/get.md)

---

[API](https://skmtc.dev/tessl/apis/tessl-api.md) - [All operations](https://skmtc.dev/tessl/apis/tessl-api/llms.txt) - [OpenAPI document](https://skmtc.dev/tessl/apis/tessl-api/revisions/4fa2a17154e4?raw)
