Runs

Create score

Submits one or more named scores for a function run, or for specific steps when step IDs are provided. Scores are recorded as run metadata and aggregated for experiments.

post/runs/{runId}/scores

Request

  • Base URL: https://api.inngest.com/v2
  • URL: https://api.inngest.com/v2/runs/{runId}/scores
  • Auth: API key in header Authorization

Path parameters

runIdstring required

Run ID (ULID) of the function run to score

Request body

namestring

Score name; must be at most 128 UTF-8 bytes

stepIdstring

Optional SDK step ID; attaches the score to a specific step instead of the run. Step targets are recorded best-effort and are not validated before writing.

valueunknown

Example request

[
  {
    "experiment": {
      "id": "model-routing",
      "variant": "baseline"
    },
    "name": "accuracy",
    "stepId": "generate-summary",
    "value": 0.95
  }
]

Response

A successful response.

Example response

{
  "data": [
    {
      "experiment": {
        "id": "model-routing",
        "variant": "baseline"
      }
    }
  ]
}

Changes

No recorded changes to this operation across all 2 revisions of this API.