Athina AI Tracing API

Create and manage traces and spans.

Operations 6

POST /trace/ Create a trace #
GET /trace/{trace_id} Get a trace #
PUT /trace/{trace_id} Update a trace #
POST /trace/{trace_id}/spans Create a span #
GET /trace/{trace_id}/spans/{span_id} Get a span #
PUT /trace/{trace_id}/spans/{span_id} Update a span #

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/athina-tracing-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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. See our Privacy Policy and Terms.

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

OpenAPI Specification

athina-tracing-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Athina AI Datasets Tracing API
  description: REST API for the Athina AI LLM monitoring, evaluation, and experimentation platform. Log inferences and prompt runs, build traces and spans, manage datasets, run evaluations, and create, version, and run prompt templates. All requests authenticate with an `athina-api-key` header. Inference and prompt-run logging is served from the `https://log.athina.ai` host; all other resources are served from `https://api.athina.ai/api/v1`.
  termsOfService: https://www.athina.ai/terms
  contact:
    name: Athina AI Support
    url: https://www.athina.ai
    email: hello@athina.ai
  version: '1.0'
servers:
- url: https://api.athina.ai/api/v1
  description: Core API (datasets, traces, prompts, evals)
- url: https://log.athina.ai/api/v1
  description: Inference logging host
security:
- athinaApiKey: []
tags:
- name: Tracing
  description: Create and manage traces and spans.
paths:
  /trace/:
    post:
      operationId: createTrace
      tags:
      - Tracing
      summary: Create a trace
      description: Create a new trace for an application run. A trace must contain at least one span with span_type "generation" to be visible in the Athina UI.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTraceRequest'
      responses:
        '200':
          description: Trace created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Trace'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /trace/{trace_id}:
    get:
      operationId: getTrace
      tags:
      - Tracing
      summary: Get a trace
      description: Retrieve a trace by its id, including all associated spans.
      parameters:
      - $ref: '#/components/parameters/TraceId'
      responses:
        '200':
          description: Trace retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Trace'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    put:
      operationId: updateTrace
      tags:
      - Tracing
      summary: Update a trace
      description: Update a trace's name and timing.
      parameters:
      - $ref: '#/components/parameters/TraceId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTraceRequest'
      responses:
        '200':
          description: Trace updated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Trace'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /trace/{trace_id}/spans:
    post:
      operationId: createSpan
      tags:
      - Tracing
      summary: Create a span
      description: Create a span within a trace. Use span_type "generation" for LLM calls, which makes the parent trace visible in the Athina UI.
      parameters:
      - $ref: '#/components/parameters/TraceId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSpanRequest'
      responses:
        '200':
          description: Span created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Span'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /trace/{trace_id}/spans/{span_id}:
    get:
      operationId: getSpan
      tags:
      - Tracing
      summary: Get a span
      description: Retrieve a single span within a trace.
      parameters:
      - $ref: '#/components/parameters/TraceId'
      - $ref: '#/components/parameters/SpanId'
      responses:
        '200':
          description: Span retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Span'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    put:
      operationId: updateSpan
      tags:
      - Tracing
      summary: Update a span
      description: Update a span's name, type, and timing.
      parameters:
      - $ref: '#/components/parameters/TraceId'
      - $ref: '#/components/parameters/SpanId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSpanRequest'
      responses:
        '200':
          description: Span updated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Span'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    CreateSpanRequest:
      type: object
      required:
      - name
      - trace_id
      - span_type
      - start_time
      properties:
        name:
          type: string
        trace_id:
          type: string
        span_type:
          type: string
          example: generation
        start_time:
          type: string
          format: date-time
        status:
          type: string
        attributes:
          type: object
          additionalProperties: true
    CreateTraceRequest:
      type: object
      required:
      - name
      - start_time
      properties:
        name:
          type: string
        start_time:
          type: string
          format: date-time
        status:
          type: string
        attributes:
          type: object
          additionalProperties: true
    UpdateTraceRequest:
      type: object
      properties:
        name:
          type: string
        start_time:
          type: string
          format: date-time
        end_time:
          type: string
          format: date-time
    Error:
      type: object
      properties:
        status:
          type: string
        message:
          type: string
    UpdateSpanRequest:
      type: object
      properties:
        name:
          type: string
        span_type:
          type: string
        start_time:
          type: string
          format: date-time
        end_time:
          type: string
          format: date-time
    Span:
      type: object
      properties:
        id:
          type: string
        trace_id:
          type: string
        name:
          type: string
        span_type:
          type: string
        start_time:
          type: string
          format: date-time
        end_time:
          type: string
          format: date-time
        status:
          type: string
        attributes:
          type: object
          additionalProperties: true
    Trace:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        start_time:
          type: string
          format: date-time
        end_time:
          type: string
          format: date-time
        status:
          type: string
        attributes:
          type: object
          additionalProperties: true
        spans:
          type: array
          items:
            $ref: '#/components/schemas/Span'
  parameters:
    SpanId:
      name: span_id
      in: path
      required: true
      schema:
        type: string
    TraceId:
      name: trace_id
      in: path
      required: true
      schema:
        type: string
  responses:
    NotFound:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing or invalid athina-api-key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    athinaApiKey:
      type: apiKey
      in: header
      name: athina-api-key
      description: Athina API key created in the Athina platform settings.