> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sidenet.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Score traces

> Scores historical traces/spans with a scorer from the catalog, fire-and-forget. Send `scorerType` (e.g. "tone", "bias"). Poll GET /api/scores/scorer/<scorerId> for results.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/score-trace
openapi: 3.1.0
info:
  title: Sidenet API
  version: 1.0.0
  description: >-
    Sidenet HTTP endpoints exposed by the Sidenet Studio. All routes require an
    api key that can be generated through the studio in studio.sidenet.ai.
servers:
  - url: https://api.sidenet.ai
security:
  - bearerAuth: []
paths:
  /v1/score-trace:
    post:
      tags:
        - Experiments
      summary: Score traces
      description: >-
        Scores historical traces/spans with a scorer from the catalog,
        fire-and-forget. Send `scorerType` (e.g. "tone", "bias"). Poll GET
        /api/scores/scorer/<scorerId> for results.
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - scorerType
                - targets
              properties:
                scorerType:
                  type: string
                  description: >-
                    Scorer type from the catalog (e.g. "tone", "bias",
                    "completeness").
                  example: completeness
                targets:
                  type: array
                  minItems: 1
                  items:
                    type: object
                    required:
                      - traceId
                    properties:
                      traceId:
                        type: string
                      spanId:
                        type: string
                        description: Score one span of the trace instead of the whole run.
                  example:
                    - traceId: 0af7651916cd43dd8448eb211c80319c
      responses:
        '200':
          description: >-
            Scoring was queued. It runs in the background — the scores are not
            in this response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: '`success`.'
                  message:
                    type: string
                  scorerId:
                    type: string
                    description: >-
                      The scorer that will run. Use it to find the scores
                      afterwards.
                  traceCount:
                    type: integer
                    description: How many traces were queued.
              example:
                status: success
                message: Scoring started for 12 traces
                scorerId: answer-relevancy
                traceCount: 12
        '400':
          description: Invalid request body or unknown scorer type
        '422':
          description: LLM scorer could not be registered for this org
        '500':
          description: Trace-scoring step unavailable
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Organization API key, generated in studio.sidenet.ai. Backend only —
        never in a browser.

````