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

# Get the organization analytics summary

> Returns the organization's users, messages, agents, latency, quality,
and cost over the period, with the change versus the previous period
of the same length. Preset periods may be served from a snapshot up
to 20 minutes old (`meta.cached`).

Requires `ai-insights-v2:analytics` (`read`). Rate limit: 100
requests per minute.




## OpenAPI

````yaml /api-reference/ai-insights-v2/swagger.yml get /v1/analytics/summary
openapi: 3.0.3
info:
  version: 1.0.0
  title: AI Insights API
  description: |
    Public REST API for the Prisme.ai AI Insights workspace - analyzed
    conversations, analysis triggering and status, evaluation criteria,
    message feedback, organization analytics, LLM consumption, memory
    analytics, and the agent relationship graph.

    **Organization scope.** Every endpoint reads and writes the data of the
    caller's organization, taken from the session (or from the org API key).
    No parameter lets a caller target another organization.

    **Permissions.** Each endpoint checks an organization IAM permission
    `ai-insights-v2:<resource>` with the action `read` or `write`
    (`manage` grants both). The resources are `conversations`, `feedback`,
    `analytics`, and `queue`; each operation states the one it requires.
    Platform admins and workspace admins are always allowed.

    **Rate limits.** Limits are counted per caller (user, or org API key)
    and per endpoint, over a sliding window. Depending on the endpoint, an
    exceeded limit returns one of two 429 bodies; both are documented on
    each operation.
  contact:
    name: Prisme.ai
    url: https://prisme.ai
servers:
  - url: https://{host}/v2/workspaces/slug:ai-insights-v2/webhooks
    description: Prisme.ai workspace webhooks
    variables:
      host:
        default: api.studio.prisme.ai
        description: API host (override for self-hosted or sandbox)
security:
  - BearerAuth: []
  - OrgApiKeyAuth: []
tags:
  - name: Insights
    description: Per-conversation analysis results and analysis status.
  - name: Agents
    description: >-
      Analysis triggering, evaluation criteria, conversations, and users of one
      agent.
  - name: Feedback
    description: Like / dislike feedback on agent messages.
  - name: Analytics
    description: Organization-wide usage, quality, latency, and adoption metrics.
  - name: Consumption
    description: LLM requests, tokens, cost, and carbon footprint, per user and over time.
  - name: Queue
    description: State of the conversation analysis queue.
  - name: Memories
    description: Analytics built from the memories users accumulate with agents.
  - name: Graph
    description: >-
      Agent relationship graph - tools, categories, delegations, similarity, and
      clusters.
paths:
  /v1/analytics/summary:
    get:
      tags:
        - Analytics
      summary: Get the organization analytics summary
      description: |
        Returns the organization's users, messages, agents, latency, quality,
        and cost over the period, with the change versus the previous period
        of the same length. Preset periods may be served from a snapshot up
        to 20 minutes old (`meta.cached`).

        Requires `ai-insights-v2:analytics` (`read`). Rate limit: 100
        requests per minute.
      operationId: getAnalyticsSummary
      parameters:
        - $ref: '#/components/parameters/Period'
        - $ref: '#/components/parameters/FromDate'
        - $ref: '#/components/parameters/ToDate'
      responses:
        '200':
          description: Analytics summary.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnalyticsSummary'
        '400':
          $ref: '#/components/responses/InvalidArguments'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/AnalyticsSourceUnavailable'
components:
  parameters:
    Period:
      in: query
      name: period
      schema:
        type: string
        enum:
          - 7d
          - 30d
          - 90d
        default: 30d
      description: >-
        Sliding window ending now. Any other value uses `30d`. Ignored when both
        `from_date` and `to_date` are set.
    FromDate:
      in: query
      name: from_date
      schema:
        type: string
        format: date-time
        maxLength: 64
      description: >-
        Start of a custom range, ISO 8601. Used only together with `to_date`,
        and then takes precedence over `period` (`period` is returned as
        `custom`).
    ToDate:
      in: query
      name: to_date
      schema:
        type: string
        format: date-time
        maxLength: 64
      description: End of a custom range, ISO 8601. Used only together with `from_date`.
  schemas:
    AnalyticsSummary:
      type: object
      description: >-
        Every `change_vs_previous` field is a percentage, `0` when the previous
        period is empty.
      properties:
        meta:
          allOf:
            - $ref: '#/components/schemas/CachedPeriodMeta'
        users:
          type: object
          properties:
            active:
              type: integer
              description: Distinct users who talked to an agent.
            active_sessions:
              type: integer
            new:
              type: integer
              description: Users who signed up during the period.
            dau:
              type: integer
              description: >-
                Average daily active users (`active` divided by the number of
                days).
            change_vs_previous:
              type: number
            sessions_change_vs_previous:
              type: number
        messages:
          type: object
          properties:
            total:
              type: integer
              description: Messages sent by users to agents.
            conversations:
              type: integer
            per_day:
              type: integer
            per_user:
              type: number
            llm_requests:
              type: integer
              description: All LLM completion calls.
            llm_requests_per_message:
              type: number
            change_vs_previous:
              type: number
        agents:
          type: object
          properties:
            active:
              type: integer
              description: Distinct agents used during the period.
            top:
              type: array
              description: Up to 10 agents, by number of messages.
              items:
                type: object
                properties:
                  agent_id:
                    type: string
                  name:
                    type: string
                    description: Absent when the agent cannot be resolved.
                  count:
                    type: integer
        latency:
          $ref: '#/components/schemas/Latency'
        quality:
          type: object
          properties:
            avg_rating:
              type: number
            total_ratings:
              type: integer
        cost:
          type: object
          properties:
            total:
              type: number
              description: Completions and embeddings cost.
            total_tokens:
              type: integer
            carbon_kgco2:
              type: number
              description: Carbon footprint of completions, kgCO2e.
            change_vs_previous:
              type: number
    CachedPeriodMeta:
      allOf:
        - $ref: '#/components/schemas/PeriodMeta'
        - type: object
          properties:
            cached:
              type: boolean
              description: '`true` when served from a snapshot.'
            cached_at:
              type: string
              format: date-time
              description: When the snapshot was computed. Only when `cached` is `true`.
    Latency:
      type: object
      description: >-
        LLM call duration percentiles, in milliseconds. `0` when there is no
        data.
      properties:
        p50_ms:
          type: integer
        p95_ms:
          type: integer
    RuntimeError:
      type: object
      description: Error raised by the Prisme.ai runtime before the endpoint logic runs.
      required:
        - error
        - message
      properties:
        error:
          type: string
        message:
          type: string
        details:
          type: object
          additionalProperties: true
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: >-
            Error code (e.g. `FORBIDDEN`), or error message on some validation
            errors.
        message:
          type: string
          description: Human-readable message.
    PeriodMeta:
      type: object
      properties:
        period:
          type: string
          description: >-
            The `period` sent (or `30d`), or `custom` for a `from_date` /
            `to_date` range.
        period_start:
          type: string
          format: date-time
        period_end:
          type: string
          format: date-time
        generated_at:
          type: string
          format: date-time
        cache_ttl:
          type: integer
          description: Suggested client cache duration, in seconds.
  responses:
    InvalidArguments:
      description: >-
        A parameter does not match its schema (length, pattern, type, or
        required field).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RuntimeError'
          example:
            error: InvalidArgumentsError
            message: Invalid arguments
            details:
              errors: []
    Unauthenticated:
      description: Missing or invalid credentials, or no organization context.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: UNAUTHORIZED
            message: Authentication required
    Forbidden:
      description: The caller lacks the permission required by the endpoint.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: FORBIDDEN
            message: 'Access denied: missing permission ''ai-insights-v2:analytics:read'''
    TooManyRequests:
      description: >-
        Rate limit exceeded. Retry after the number of seconds given in the
        `Retry-After` header.
      headers:
        Retry-After:
          schema:
            type: integer
          description: Seconds to wait before retrying.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RuntimeError'
          example:
            error: TooManyRequests
            message: Too many requests for 'Insights'
            details:
              name: Insights
              ok: false
              retryAfter: 42.5
              limit: 100
              window: 60
              remaining: 0
    AnalyticsSourceUnavailable:
      description: An analytics data source is temporarily unavailable. Retry in a minute.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: AnalyticsSourceUnavailable
            message: Analytics are temporarily unavailable, try again in a minute
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: |
        User-bound credential carrying an identity: either a session JWT
        or a user access token (`at:*`) generated from the user settings UI.
        Send as `Authorization: Bearer <token>`. The organization and the
        permissions applied are those of this user.
    OrgApiKeyAuth:
      type: apiKey
      in: header
      name: x-prismeai-api-key
      description: |
        Organization API key (`iak_{orgSlug}_{uuid}`), managed from the
        AI Governance UI. It is not tied to a user: its access is defined by
        the permissions attached to it, and all keys of an organization share
        the same rate-limit counters. Endpoints that describe "your own"
        data, such as `GET /v1/users/{user_id}`, need a user credential.
        Send as `x-prismeai-api-key: iak_...`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.