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

# Get FA insights summary

> Get aggregated insights across FA runs with optional time and project filters



## OpenAPI

````yaml openapi.json get /v2/failure-analysis/insights
openapi: 3.1.0
info:
  title: Valiqor API
  description: >-
    The Valiqor API provides programmatic access to AI application testing,
    evaluation, failure analysis, and security auditing.


    ## Authentication


    All API requests require an API key passed as a Bearer token in the
    `Authorization` header:


    ```

    Authorization: Bearer vq-xxxxxxxxxxxxxxxxxxxx

    ```


    Get your API key from the [Valiqor Dashboard](https://app.valiqor.com) or
    via `valiqor login` CLI command.


    ## Base URL


    ```

    https://api.valiqor.com

    ```
  version: 2.0.0
  contact:
    name: Valiqor Support
    url: https://valiqor.com
    email: support@valiqor.com
servers:
  - url: https://api.valiqor.com
    description: Production
security: []
tags:
  - name: Authentication
    description: >-
      API key validation, user management, device authorization flow, and CLI
      authentication. All SDK requests require a valid API key passed as a
      Bearer token.
  - name: Evaluation
    description: >-
      Run quality evaluations on datasets or traces. Compute metrics like
      faithfulness, relevance, coherence, and more. Compare runs and track
      trends over time.
  - name: Security
    description: >-
      Security audits (S1-S23 safety categories) and red team simulations.
      Detect prompt injection, harmful content, data leakage, and other
      vulnerabilities.
  - name: Failure Analysis
    description: >-
      Analyze AI app failures with root cause detection, severity scoring, and
      actionable fix suggestions. Supports both trace-based (full) and
      dataset-based (minimal) analysis modes.
  - name: Tracing
    description: >-
      Upload and query execution traces from AI applications. Traces capture
      messages, spans, tool calls, retrievals, and LLM interactions for
      debugging and evaluation.
  - name: Scanner
    description: >-
      Upload code scans to detect AI app features, workflows, and prompts.
      Generates evaluation configurations automatically from your codebase.
  - name: Projects
    description: >-
      Create and manage projects. Projects are containers that organize
      evaluation runs, security audits, traces, and failure analysis results.
paths:
  /v2/failure-analysis/insights:
    get:
      tags:
        - Failure Analysis
      summary: Get FA insights summary
      description: >-
        Get aggregated insights across FA runs with optional time and project
        filters
      operationId: get_insights_summary_v2_failure_analysis_insights
      parameters:
        - name: days
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                maximum: 365
                minimum: 1
              - type: 'null'
            description: Number of days to analyze (None = all time)
            default: 30
            title: Days
          description: Number of days to analyze (None = all time)
        - name: project_name
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by project name
            title: Project Name
          description: Filter by project name
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FAInsightsSummary'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyAuth: []
components:
  schemas:
    FAInsightsSummary:
      properties:
        total_runs:
          type: integer
          title: Total Runs
        total_items_analyzed:
          type: integer
          title: Total Items Analyzed
        overall_failure_rate:
          type: number
          title: Overall Failure Rate
          description: Proportion of items that failed 0.0-1.0
          default: 0
        average_severity:
          type: number
          title: Average Severity
          description: Average severity score 0.0-5.0
          default: 0
        period_days:
          type: integer
          title: Period Days
          description: Number of days in the analysis period
          default: 30
        period_start:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Period Start
        period_end:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Period End
        project_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Project Name
        top_recurring_failures:
          items:
            $ref: '#/components/schemas/RecurringFailure'
          type: array
          title: Top Recurring Failures
        bucket_distribution:
          items:
            $ref: '#/components/schemas/BucketDistribution'
          type: array
          title: Bucket Distribution
      type: object
      required:
        - total_runs
        - total_items_analyzed
      title: FAInsightsSummary
      description: Aggregated insights across FA runs.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    RecurringFailure:
      properties:
        subcategory_id:
          type: string
          title: Subcategory Id
        subcategory_name:
          type: string
          title: Subcategory Name
        bucket_id:
          type: string
          title: Bucket Id
        bucket_name:
          type: string
          title: Bucket Name
        occurrence_count:
          type: integer
          title: Occurrence Count
        affected_runs:
          type: integer
          title: Affected Runs
        trend_percent:
          type: number
          title: Trend Percent
          description: Change vs previous period (-100 to +100)
          default: 0
      type: object
      required:
        - subcategory_id
        - subcategory_name
        - bucket_id
        - bucket_name
        - occurrence_count
        - affected_runs
      title: RecurringFailure
      description: A recurring failure pattern across runs.
    BucketDistribution:
      properties:
        bucket_id:
          type: string
          title: Bucket Id
        bucket_name:
          type: string
          title: Bucket Name
        failure_count:
          type: integer
          title: Failure Count
        percentage:
          type: number
          title: Percentage
          description: Percentage of total failures
          default: 0
      type: object
      required:
        - bucket_id
        - bucket_name
        - failure_count
      title: BucketDistribution
      description: Distribution of failures by bucket.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyAuth:
      type: http
      scheme: bearer
      description: >-
        Valiqor API key. Pass as Bearer token: `Authorization: Bearer
        vq-xxxxxxxxxxxxxxxxxxxx`

````