Cast AI Otel API

Provides an API to ingest OpenTelemetry telemetry data.

Operations 4

POST /ai-optimizer/v1beta/logs:ingest Ingest OTEL Logs #
POST /ai-optimizer/v1beta/metrics:ingest Ingest OTEL Metrics #
GET /ai-optimizer/v1beta/organizations/{organizationId}/productivity-metrics:generateTimeseries Generate Productivity Metrics Timeseries #
GET /ai-optimizer/v1beta/productivity-metrics Get Productivity Metrics #

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/kimchi:kimchi-otelapi-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

kimchi-otelapi-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: AI Enabler Otel API
  version: 0.0.1
  description: Provides an API to ingest OpenTelemetry telemetry data.
servers:
- url: https://api.cast.ai/
  description: US endpoint
- url: https://api.eu.cast.ai/
  description: EU endpoint
security:
- BearerAuth: []
- ApiKeyAuth: []
tags:
- name: OtelAPI
  description: Provides an API to ingest OpenTelemetry telemetry data.
paths:
  /ai-optimizer/v1beta/logs:ingest:
    post:
      tags:
      - OtelAPI
      summary: Ingest OTEL Logs
      description: Ingests OTEL log records (events).
      operationId: OtelAPI_IngestLogs
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IngestLogsRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IngestLogsResponse'
        default:
          description: Default error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
  /ai-optimizer/v1beta/metrics:ingest:
    post:
      tags:
      - OtelAPI
      summary: Ingest OTEL Metrics
      description: Ingests OTEL metrics.
      operationId: OtelAPI_IngestMetrics
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IngestMetricsRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IngestMetricsResponse'
        default:
          description: Default error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
  /ai-optimizer/v1beta/organizations/{organizationId}/productivity-metrics:generateTimeseries:
    get:
      tags:
      - OtelAPI
      summary: Generate Productivity Metrics Timeseries
      description: Generates productivity metrics as time series data points.
      operationId: OtelAPI_GenerateProductivityMetricsTimeseries
      parameters:
      - name: organizationId
        in: path
        description: Organization ID.
        required: true
        schema:
          type: string
      - name: from
        in: query
        description: Time range for the query.
        schema:
          type: string
          format: date-time
      - name: to
        in: query
        schema:
          type: string
          format: date-time
      - name: metricNames
        in: query
        description: Filter to specific metric names (optional).
        schema:
          type: array
          items:
            type: string
      - name: userId
        in: query
        description: Filter by user ID (optional).
        schema:
          type: string
      - name: sessionId
        in: query
        description: Filter by session ID (optional).
        schema:
          type: string
      - name: providerName
        in: query
        description: Filter by provider name (optional).
        schema:
          enum:
          - PRODUCTIVITY_PROVIDER_NAME_UNSPECIFIED
          - PRODUCTIVITY_PROVIDER_NAME_CLAUDE_CODE
          - PRODUCTIVITY_PROVIDER_NAME_OPENCODE
          - PRODUCTIVITY_PROVIDER_NAME_PI
          type: string
          format: enum
      - name: teamId
        in: query
        description: Filter by team ID (optional).
        schema:
          type: string
      - name: castaiApiKeyOwnerId
        in: query
        description: Filter by CAST AI API key owner ID (optional).
        schema:
          type: string
      - name: inferUserFromApiKey
        in: query
        description: When true, filters productivity metrics by the API key owner ID extracted from the auth token.
        schema:
          type: boolean
      - name: sessionStatsMode
        in: query
        description: "Controls whether session statistics are included in the response.\n Defaults to UNSPECIFIED (no session stats). Set to PER_PROVIDER for\n per-provider stats, TOTAL for cross-provider totals only, or ALL for both."
        schema:
          enum:
          - SESSION_STATS_MODE_UNSPECIFIED
          - SESSION_STATS_MODE_PER_PROVIDER
          - SESSION_STATS_MODE_TOTAL
          - SESSION_STATS_MODE_ALL
          type: string
          format: enum
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateProductivityMetricsTimeseriesResponse'
        default:
          description: Default error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
  /ai-optimizer/v1beta/productivity-metrics:
    get:
      tags:
      - OtelAPI
      summary: Get Productivity Metrics
      description: Gets aggregated productivity metrics.
      operationId: OtelAPI_GetProductivityMetrics
      parameters:
      - name: from
        in: query
        description: Time range for the query.
        schema:
          type: string
          format: date-time
      - name: to
        in: query
        schema:
          type: string
          format: date-time
      - name: metricNames
        in: query
        description: Filter to specific metric names (optional).
        schema:
          type: array
          items:
            type: string
      - name: userId
        in: query
        description: Filter by user ID (optional).
        schema:
          type: string
      - name: sessionId
        in: query
        description: Filter by session ID (optional).
        schema:
          type: string
      - name: providerName
        in: query
        description: Filter by provider name (optional).
        schema:
          enum:
          - PRODUCTIVITY_PROVIDER_NAME_UNSPECIFIED
          - PRODUCTIVITY_PROVIDER_NAME_CLAUDE_CODE
          - PRODUCTIVITY_PROVIDER_NAME_OPENCODE
          - PRODUCTIVITY_PROVIDER_NAME_PI
          type: string
          format: enum
      - name: teamId
        in: query
        description: Filter by team ID (optional).
        schema:
          type: string
      - name: castaiApiKeyOwnerId
        in: query
        description: Filter by CAST AI API key owner ID (optional).
        schema:
          type: string
      - name: inferUserFromApiKey
        in: query
        description: When true, filters productivity metrics by the API key owner ID extracted from the auth token.
        schema:
          type: boolean
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetProductivityMetricsResponse'
        default:
          description: Default error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
components:
  schemas:
    ScopeLogs:
      type: object
      properties:
        scope:
          allOf:
          - $ref: '#/components/schemas/InstrumentationScope'
          description: The instrumentation scope that produced the log records.
        logRecords:
          type: array
          items:
            $ref: '#/components/schemas/LogRecord'
          description: Individual log records.
        schemaUrl:
          type: string
          description: The Schema URL of the scope.
      description: "ScopeLogs groups log records by instrumentation scope.\n Mirrors opentelemetry.proto.logs.v1.ScopeLogs."
    ArrayValue:
      type: object
      properties:
        values:
          type: array
          items:
            $ref: '#/components/schemas/AnyValue'
          description: The array values.
      description: "ArrayValue is a list of AnyValue.\n Mirrors opentelemetry.proto.common.v1.ArrayValue."
    IngestLogsRequest:
      type: object
      properties:
        resourceLogs:
          type: array
          items:
            $ref: '#/components/schemas/ResourceLogs'
          description: Collection of log records grouped by resource and scope.
        userEmail:
          type: string
          description: User email for analytics tracking (optional). If empty, identity id is used.
      description: IngestLogsRequest contains OTEL log data from Claude Code.
    ResourceLogs:
      type: object
      properties:
        resource:
          allOf:
          - $ref: '#/components/schemas/Resource'
          description: The resource that produced the log records.
        scopeLogs:
          type: array
          items:
            $ref: '#/components/schemas/ScopeLogs'
          description: Log records grouped by instrumentation scope.
        schemaUrl:
          type: string
          description: The Schema URL of the resource.
      description: "ResourceLogs groups log records by their originating resource.\n Mirrors opentelemetry.proto.logs.v1.ResourceLogs."
    TimeSeriesDataPoint:
      type: object
      properties:
        timestamp:
          type: string
          description: The start of the time bucket.
          format: date-time
        value:
          type: number
          description: The aggregated value for this bucket.
          format: double
      description: TimeSeriesDataPoint represents a single bucketed data point in a time series.
    ProviderTimeSeries:
      type: object
      properties:
        providerName:
          type: string
          description: The provider name (e.g. "claude-code-otel", "opencode-otel").
        metrics:
          type: array
          items:
            $ref: '#/components/schemas/MetricTimeSeries'
          description: Time series data grouped by metric.
        sessionStats:
          allOf:
          - $ref: '#/components/schemas/SessionStatsTimeSeries'
          description: Session statistics time series for this provider.
      description: ProviderTimeSeries contains time series data for a single provider.
    ProductivityComparison:
      type: object
      properties:
        linesOfCode:
          allOf:
          - $ref: '#/components/schemas/ProductivityComparisonValue'
          description: Lines of code changes.
        pullRequests:
          allOf:
          - $ref: '#/components/schemas/ProductivityComparisonValue'
          description: Pull requests created.
        commits:
          allOf:
          - $ref: '#/components/schemas/ProductivityComparisonValue'
          description: Commits made.
        cost:
          allOf:
          - $ref: '#/components/schemas/ProductivityComparisonValue'
          description: Total cost in USD.
        tokens:
          allOf:
          - $ref: '#/components/schemas/ProductivityComparisonValue'
          description: Total tokens used.
        sessionTimeSeconds:
          allOf:
          - $ref: '#/components/schemas/ProductivityComparisonValue'
          description: Total session time in seconds.
        sessions:
          allOf:
          - $ref: '#/components/schemas/ProductivityComparisonValue'
          description: Total number of sessions.
        toolUsage:
          allOf:
          - $ref: '#/components/schemas/ProductivityComparisonValue'
          description: Total tool invocations.
        toolDurationMs:
          allOf:
          - $ref: '#/components/schemas/ProductivityComparisonValue'
          description: Total tool execution time in milliseconds.
      description: ProductivityComparison holds period-over-period comparison values for key productivity metrics.
    Resource:
      type: object
      properties:
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/KeyValue'
          description: Key-value attributes describing the resource.
        droppedAttributesCount:
          type: integer
          description: Number of attributes that were dropped.
          format: uint32
      description: "Resource describes the entity producing telemetry.\n Mirrors opentelemetry.proto.resource.v1.Resource."
    GoogleProtobufAny:
      type: object
      properties:
        '@type':
          type: string
          description: The type of the serialized message.
      additionalProperties: true
      description: Contains an arbitrary serialized message along with a @type that describes the type of the serialized message.
    KeyValueList:
      type: object
      properties:
        values:
          type: array
          items:
            $ref: '#/components/schemas/KeyValue'
          description: The key-value pairs.
      description: "KeyValueList is a list of KeyValue pairs.\n Mirrors opentelemetry.proto.common.v1.KeyValueList."
    InstrumentationScope:
      type: object
      properties:
        name:
          type: string
          description: Name of the instrumentation scope.
        version:
          type: string
          description: Version of the instrumentation scope.
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/KeyValue'
          description: Key-value attributes of the scope.
        droppedAttributesCount:
          type: integer
          description: Number of attributes that were dropped.
          format: uint32
      description: "InstrumentationScope identifies the instrumentation library.\n Mirrors opentelemetry.proto.common.v1.InstrumentationScope."
    LogRecord:
      type: object
      properties:
        timeUnixNano:
          type: string
          description: Timestamp in nanoseconds since Unix epoch.
        observedTimeUnixNano:
          type: string
          description: Observed timestamp in nanoseconds since Unix epoch.
        severityNumber:
          type: integer
          description: Severity number (standard OTEL severity levels).
          format: uint32
        severityText:
          type: string
          description: Severity text (e.g. "INFO", "ERROR").
        body:
          allOf:
          - $ref: '#/components/schemas/AnyValue'
          description: The body of the log record (structured key-value data from Claude Code).
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/KeyValue'
          description: Key-value attributes on this log record (e.g. model, input_tokens, cost_usd).
        droppedAttributesCount:
          type: integer
          description: Number of attributes that were dropped.
          format: uint32
        flags:
          type: integer
          description: Trace flags.
          format: fixed32
        traceId:
          type: string
          description: Trace ID for correlation.
          format: bytes
        spanId:
          type: string
          description: Span ID for correlation.
          format: bytes
        eventName:
          type: string
          description: Event name (e.g. "api_request", "tool_result").
      description: "LogRecord represents a single OTEL log event.\n Mirrors opentelemetry.proto.logs.v1.LogRecord with fields used by Claude Code."
    MetricSummary:
      type: object
      properties:
        metricName:
          type: string
          description: The metric name (e.g., "claude_code.session.count").
        totalValue:
          type: number
          description: Total value across all data points.
          format: double
        breakdown:
          type: array
          items:
            $ref: '#/components/schemas/DimensionValue'
          description: Breakdown by individual dimension values.
        groupedBreakdown:
          type: array
          items:
            $ref: '#/components/schemas/GroupedDimensionValue'
          description: "Breakdown grouped by all non-empty dimensions combined.\n For example, token.usage grouped by (model, type) gives per-model input/output."
      description: MetricSummary contains aggregated data for a single metric.
    ResourceMetrics:
      type: object
      properties:
        resource:
          allOf:
          - $ref: '#/components/schemas/Resource'
          description: The resource that produced the metrics.
        scopeMetrics:
          type: array
          items:
            $ref: '#/components/schemas/ScopeMetrics'
          description: Metrics grouped by instrumentation scope.
        schemaUrl:
          type: string
          description: The Schema URL of the resource.
      description: "ResourceMetrics groups metrics by their originating resource.\n Mirrors opentelemetry.proto.metrics.v1.ResourceMetrics."
    IngestMetricsRequest:
      type: object
      properties:
        resourceMetrics:
          type: array
          items:
            $ref: '#/components/schemas/ResourceMetrics'
          description: Collection of metrics grouped by resource and scope.
        userEmail:
          type: string
          description: User email for analytics tracking (optional). If empty, identity id is used.
      description: IngestMetricsRequest contains OTEL metrics data from Claude Code.
    DimensionTimeSeries:
      type: object
      properties:
        dimension:
          type: string
          description: The dimension name (e.g. "type", "language").
        value:
          type: string
          description: The dimension value (e.g. "added", "removed").
        dataPoints:
          type: array
          items:
            $ref: '#/components/schemas/TimeSeriesDataPoint'
          description: Data points for this dimension value.
      description: DimensionTimeSeries represents a time series broken down by a single dimension value.
    GetProductivityMetricsResponse:
      type: object
      properties:
        from:
          type: string
          description: Time range of the query.
          format: date-time
        to:
          type: string
          format: date-time
        items:
          type: array
          items:
            $ref: '#/components/schemas/ProviderProductivityMetrics'
          description: Productivity metrics grouped by provider.
        teamDeleted:
          type: boolean
          description: "Indicates if the filtered team has been soft-deleted.\n Only set when team_id filter is applied in the request."
      description: GetProductivityMetricsResponse contains aggregated productivity metrics grouped by provider.
    GenerateProductivityMetricsTimeseriesResponse:
      type: object
      properties:
        from:
          type: string
          description: Time range of the query.
          format: date-time
        to:
          type: string
          format: date-time
        providers:
          type: array
          items:
            $ref: '#/components/schemas/ProviderTimeSeries'
          description: Time series data grouped by provider.
        totalSessionStats:
          allOf:
          - $ref: '#/components/schemas/SessionStatsTimeSeries'
          description: Session statistics aggregated across all providers, bucketed by time.
      description: GenerateProductivityMetricsTimeseriesResponse contains time series data points for productivity metrics.
    MetricTimeSeries:
      type: object
      properties:
        metricName:
          type: string
          description: The metric name (e.g. "claude_code.token.usage").
        dataPoints:
          type: array
          items:
            $ref: '#/components/schemas/TimeSeriesDataPoint'
          description: Ordered data points bucketed by the requested interval.
        breakdown:
          type: array
          items:
            $ref: '#/components/schemas/DimensionTimeSeries'
          description: Breakdown of the metric by dimension (e.g. type = "added" | "removed").
      description: MetricTimeSeries contains time series data points for a single metric.
    SessionStats:
      type: object
      properties:
        totalSessions:
          type: string
          description: Total number of unique sessions.
        totalDurationSeconds:
          type: number
          description: Total duration across all sessions in seconds.
          format: double
        avgSessionDurationSeconds:
          type: number
          description: 'Deprecated: Use duration_p50_seconds instead.'
          format: double
        medianSessionDurationSeconds:
          type: number
          description: 'Deprecated: Use duration_p50_seconds instead.'
          format: double
        durationP50Seconds:
          type: number
          description: 50th percentile (median) of session duration in seconds.
          format: double
        durationP75Seconds:
          type: number
          description: 75th percentile of session duration in seconds.
          format: double
        durationP90Seconds:
          type: number
          description: 90th percentile of session duration in seconds.
          format: double
        durationP99Seconds:
          type: number
          description: 99th percentile of session duration in seconds.
          format: double
      description: SessionStats contains statistics about user sessions.
    AnyValue:
      type: object
      properties:
        stringValue:
          type: string
          description: String value.
        boolValue:
          type: boolean
          description: Boolean value.
        intValue:
          type: string
          description: Integer value.
        doubleValue:
          type: number
          description: Double value.
          format: double
        arrayValue:
          allOf:
          - $ref: '#/components/schemas/ArrayValue'
          description: Array value.
        kvlistValue:
          allOf:
          - $ref: '#/components/schemas/KeyValueList'
          description: Key-value list value.
        bytesValue:
          type: string
          description: Bytes value.
          format: bytes
      description: "AnyValue represents a typed attribute value.\n Mirrors opentelemetry.proto.common.v1.AnyValue."
    Status:
      type: object
      properties:
        code:
          type: integer
          description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
          format: int32
        message:
          type: string
          description: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
        details:
          type: array
          items:
            $ref: '#/components/schemas/GoogleProtobufAny'
          description: A list of messages that carry the error details.  There is a common set of message types for APIs to use.
      description: 'The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).'
    Sum:
      type: object
      properties:
        dataPoints:
          type: array
          items:
            $ref: '#/components/schemas/NumberDataPoint'
          description: The data points.
        aggregationTemporality:
          enum:
          - AGGREGATION_TEMPORALITY_UNSPECIFIED
          - AGGREGATION_TEMPORALITY_DELTA
          - AGGREGATION_TEMPORALITY_CUMULATIVE
          type: string
          description: Aggregation temporality (cumulative or delta).
          format: enum
        isMonotonic:
          type: boolean
          description: Whether the sum is monotonic (only increases).
      description: "Sum represents a metric that accumulates over time.\n Mirrors opentelemetry.proto.metrics.v1.Sum."
    KeyValue:
      type: object
      properties:
        key:
          type: string
          description: The attribute key.
        value:
          allOf:
          - $ref: '#/components/schemas/AnyValue'
          description: The attribute value.
      description: "KeyValue is a key-value pair with a string key and typed value.\n Mirrors opentelemetry.proto.common.v1.KeyValue."
    ScopeMetrics:
      type: object
      properties:
        scope:
          allOf:
          - $ref: '#/components/schemas/InstrumentationScope'
          description: The instrumentation scope that produced the metrics.
        metrics:
          type: array
          items:
            $ref: '#/components/schemas/Metric'
          description: Individual metrics.
        schemaUrl:
          type: string
          description: The Schema URL of the scope.
      description: "ScopeMetrics groups metrics by instrumentation scope.\n Mirrors opentelemetry.proto.metrics.v1.ScopeMetrics."
    Gauge:
      type: object
      properties:
        dataPoints:
          type: array
          items:
            $ref: '#/components/schemas/NumberDataPoint'
          description: The data points.
      description: "Gauge represents a metric that reports the current value.\n Mirrors opentelemetry.proto.metrics.v1.Gauge."
    GroupedDimensionValue:
      type: object
      properties:
        dimensions:
          type: object
          additionalProperties:
            type: string
          description: 'Map of dimension name to value (e.g., {"model": "claude-sonnet-4", "type": "input"}).'
        valueSum:
          type: number
          description: Sum of values for this dimension combination.
          format: double
      description: "GroupedDimensionValue represents a breakdown grouped by all non-empty dimensions.\n For example, token.usage with model=\"claude-sonnet-4\" and type=\"input\"."
    Metric:
      type: object
      properties:
        name:
          type: string
          description: The metric name (e.g. "claude_code.session.count").
        description:
          type: string
          description: Description of the metric.
        unit:
          type: string
          description: The unit of measurement (e.g. "count", "s", "USD").
        gauge:
          $ref: '#/components/schemas/Gauge'
        sum:
          $ref: '#/components/schemas/Sum'
      description: "Metric represents a single metric measurement.\n Mirrors opentelemetry.proto.metrics.v1.Metric."
    SessionStatsTimeSeriesPoint:
      type: object
      properties:
        timestamp:
          type: string
          description: The start of the time bucket.
          format: date-time
        totalSessions:
          type: string
          description: Total number of unique sessions in this bucket.
        durationP50Seconds:
          type: number
          description: 50th percentile (median) of session duration in seconds.
          format: double
        durationP75Seconds:
          type: number
          description: 75th percentile of session duration in seconds.
          format: double
        durationP90Seconds:
          type: number
          description: 90th percentile of session duration in seconds.
          format: double
        durationP99Seconds:
          type: number
          description: 99th percentile of session duration in seconds.
          format: double
        totalDurationSeconds:
          type: number
          description: Sum of all session durations in this bucket, in seconds.
          format: double
      description: SessionStatsTimeSeriesPoint represents session statistics for a single time bucket.
    NumberDataPoint:
      type: object
      properties:
        timeUnixNano:
          type: string
          description: Timestamp in nanoseconds since Unix epoch.
        startTimeUnixNano:
          type: string
          description: Start timestamp for delta metrics.
        asInt:
          type: string
        asDouble:
          type: number
          format: double
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/KeyValue'
          description: Key-value attributes (e.g. model, type, tool_name).
      description: "NumberDataPoint represents a single numeric measurement.\n Mirrors opentelemetry.proto.metrics.v1.NumberDataPoint."
    ProductivityComparisonValue:
      type: object
      properties:
        value:
          type: number
          description: The value for the current (requested) interval.
          format: double
        previousIntervalValue:
          type: number
          description: The value for the previous interval of the same length.
          format: double
        changePercentage:
          type: number
          description: "The percentage change: (current - previous) / previous * 100.\n Returns 0 when both values are 0, and 100 when previous is 0 but current is non-zero."
          format: float
      description: ProductivityComparisonValue contains the current value, previous period value, and percentage change.
    SessionStatsTimeSeries:
      type: object
      properties:
        dataPoints:
          type: array
          items:
            $ref: '#/components/schemas/SessionStatsTimeSeriesPoint'
          description: Ordered data points bucketed by the requested interval.
        summary:
          allOf:
          - $ref: '#/components/schemas/SessionStats'
          description: All-period aggregate session statistics across all data points.
      description: SessionStatsTimeSeries contains session statistics data points for a single provider.
    ProviderProductivityMetrics:
      type: object
      properties:
        providerName:
          type: string
          description: The provider name (e.g. "claude-code-otel", "opencode-otel").
        summaries:
          type: array
          items:
            $ref: '#/components/schemas/MetricSummary'
          description: Aggregated metric summaries for this provider.
        sessionStats:
          allOf:
          - $ref: '#/components/schemas/SessionStats'
          description: Session statistics for this provider.
        comparison:
          allOf:
          - $ref: '#/components/schemas/ProductivityComparison'
          description: Comparison between the requested interval and the immediately preceding interval.
      description: ProviderProductivityMetrics contains aggregated productivity metrics for a single provider.
    IngestMetricsResponse:
      type: object
      properties: {}
      description: IngestMetricsResponse is returned after successful ingestion.
    DimensionValue:
      type: object
      properties:
        dimension:
          type: string
          description: The dimension name (e.g., "type", "model", "tool_name", "language").
        value:
          type: string
          description: The dimension value (e.g., "added", "claude-sonnet-4", "Edit", "Python").
        count:
          type: string
          description: Count of data points with this dimension value.
        valueSum:
          type: number
          description: Sum of values for this dimension value.
          format: double
      description: DimensionValue represents a breakdown of a metric by a specific dimension.
    IngestLogsResponse:
      type: object
      properties: {}
      description: IngestLogsResponse is returned after successful ingestion.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
x-provenance:
  method: searched
  source: https://docs.cast.ai/reference
  harvested: '2026-10-20'
  tool: harvest-readme-openapi.py
  note: Assembled verbatim from the OpenAPI definition ReadMe embeds in each operation page of the provider's developer portal; paths and components merged by API title, nothing authored.
  assembled_from:
  - https://docs.cast.ai/reference/analyticsapi_generateanalytics.md
  - https://docs.cast.ai/reference/analyticsapi_generatebillingmodelusagereport.md
  - https://docs.cast.ai/reference/analyticsapi_generatebreakdown.md
  - https://docs.cast.ai/reference/analyticsapi_generatelatestchatcompletionsummary.md
  - https://docs.cast.ai/reference/analyticsapi_generatelatestevaluationsummary.md
  - https://docs.cast.ai/reference/analyticsapi_generatelatestinferencesummaries.md
  - https://docs.cast.ai/reference/analyticsapi_generaterouterreport.md
  - https://docs.cast.ai/reference/analyticsapi_queryanalytics.md
  - https://docs.cast.ai/reference/apikeysapi_createapikey.md
  - https://docs.cast.ai/reference/apikeysapi_deleteapikeybudget.md


# --- truncated at 32 KB (43 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/kimchi/refs/heads/main/openapi/kimchi-otelapi-api-openapi.yml