> ## 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 failure tags

> Get only the failure tags from an analysis run



## OpenAPI

````yaml openapi.json get /v2/failure-analysis/runs/{run_id}/tags
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/runs/{run_id}/tags:
    get:
      tags:
        - Failure Analysis
      summary: Get failure tags
      description: Get only the failure tags from an analysis run
      operationId: get_run_tags_v2_failure_analysis_runs__run_id__tags
      parameters:
        - name: run_id
          in: path
          required: true
          schema:
            type: string
            title: Run Id
        - name: decision
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: 'Filter by decision: pass, fail, unsure'
            title: Decision
          description: 'Filter by decision: pass, fail, unsure'
        - name: bucket_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by bucket ID
            title: Bucket Id
          description: Filter by bucket ID
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/FailureTagResponse'
                title: >-
                  Response Get Run Tags V2 Failure Analysis Runs  Run Id  Tags
                  Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyAuth: []
components:
  schemas:
    FailureTagResponse:
      properties:
        tag_id:
          type: string
          title: Tag Id
        bucket_id:
          type: string
          title: Bucket Id
          description: Parent bucket ID (L1 category)
        bucket_name:
          type: string
          title: Bucket Name
          description: Human-readable bucket name
        subcategory_id:
          type: string
          title: Subcategory Id
          description: Failure subcategory ID (L2 category)
        subcategory_name:
          type: string
          title: Subcategory Name
          description: Human-readable subcategory name
        item_index:
          anyOf:
            - type: integer
            - type: 'null'
          title: Item Index
          description: 0-based index of the dataset item this tag belongs to
        decision:
          type: string
          title: Decision
          description: '''pass'', ''fail'', or ''unsure'''
        severity:
          type: number
          maximum: 5
          minimum: 0
          title: Severity
          description: Severity score 0-5
        confidence:
          type: number
          maximum: 1
          minimum: 0
          title: Confidence
          description: Confidence score 0-1
        detector_type_used:
          type: string
          title: Detector Type Used
          description: '''deterministic'', ''llm_judge'', or ''hybrid'''
        judge_rationale:
          anyOf:
            - type: string
            - type: 'null'
          title: Judge Rationale
          description: LLM judge explanation
        scoring_breakdown:
          $ref: '#/components/schemas/ScoringBreakdownResponse'
        eval_metric_values:
          additionalProperties:
            type: number
          type: object
          title: Eval Metric Values
          description: Correlated eval metric scores
        evidence_items:
          items:
            $ref: '#/components/schemas/EvidenceItemResponse'
          type: array
          title: Evidence Items
      type: object
      required:
        - tag_id
        - bucket_id
        - bucket_name
        - subcategory_id
        - subcategory_name
        - decision
        - severity
        - confidence
        - detector_type_used
        - scoring_breakdown
      title: FailureTagResponse
      description: Single failure tag response.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ScoringBreakdownResponse:
      properties:
        impact:
          type: integer
          title: Impact
          description: Impact level 0-3
        risk:
          type: integer
          title: Risk
          description: Risk level 0-2
        frequency_weight:
          type: number
          title: Frequency Weight
          default: 1
        security_override:
          anyOf:
            - type: string
            - type: 'null'
          title: Security Override
        deterministic_weight:
          type: number
          title: Deterministic Weight
          default: 0
        judge_weight:
          type: number
          title: Judge Weight
          default: 0
        security_weight:
          type: number
          title: Security Weight
          default: 0
        metric_agreement_bonus:
          type: number
          title: Metric Agreement Bonus
          default: 0
        disagreement_penalty:
          type: number
          title: Disagreement Penalty
          default: 0
        final_severity:
          type: number
          title: Final Severity
        final_confidence:
          type: number
          title: Final Confidence
      type: object
      required:
        - impact
        - risk
        - final_severity
        - final_confidence
      title: ScoringBreakdownResponse
      description: Scoring breakdown for a failure tag.
    EvidenceItemResponse:
      properties:
        item_id:
          type: string
          title: Item Id
        evidence_type:
          type: string
          title: Evidence Type
          description: 'Type: ''rationale'', ''unsupported_claim'', ''violation'', etc.'
        description:
          type: string
          title: Description
        content_snippet:
          anyOf:
            - type: string
            - type: 'null'
          title: Content Snippet
        source:
          type: string
          title: Source
        confidence:
          type: number
          maximum: 1
          minimum: 0
          title: Confidence
          default: 1
        metadata:
          additionalProperties: true
          type: object
          title: Metadata
      type: object
      required:
        - item_id
        - evidence_type
        - description
        - source
      title: EvidenceItemResponse
      description: Evidence item in a failure tag response.
    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`

````