components:
  schemas:
    APIKeyCreate:
      properties:
        name:
          title: Name
          type: string
      required:
      - name
      title: APIKeyCreate
      type: object
    APIKeyCreateResponse:
      properties:
        id:
          title: Id
          type: string
        key:
          title: Key
          type: string
        key_prefix:
          title: Key Prefix
          type: string
        name:
          title: Name
          type: string
      required:
      - id
      - name
      - key
      - key_prefix
      title: APIKeyCreateResponse
      type: object
    APIKeyResponse:
      properties:
        created_at:
          format: date-time
          title: Created At
          type: string
        id:
          title: Id
          type: string
        is_active:
          title: Is Active
          type: boolean
        key_prefix:
          title: Key Prefix
          type: string
        last_used_at:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Last Used At
        name:
          title: Name
          type: string
      required:
      - id
      - name
      - key_prefix
      - created_at
      - last_used_at
      - is_active
      title: APIKeyResponse
      type: object
    AgentCost:
      properties:
        agent_id:
          title: Agent Id
          type: string
        agent_name:
          title: Agent Name
          type: string
        total_cost:
          title: Total Cost
          type: number
        trace_count:
          title: Trace Count
          type: integer
      required:
      - agent_id
      - agent_name
      - total_cost
      - trace_count
      title: AgentCost
      type: object
    AgentCreate:
      properties:
        description:
          anyOf:
          - type: string
          - type: 'null'
          title: Description
        framework:
          anyOf:
          - type: string
          - type: 'null'
          title: Framework
        name:
          title: Name
          type: string
        tags:
          anyOf:
          - type: object
          - type: 'null'
          title: Tags
        version:
          anyOf:
          - type: string
          - type: 'null'
          title: Version
      required:
      - name
      title: AgentCreate
      type: object
    AgentListResponse:
      properties:
        agents:
          items:
            $ref: '#/components/schemas/AgentResponse'
          title: Agents
          type: array
        page:
          title: Page
          type: integer
        page_size:
          title: Page Size
          type: integer
        total:
          title: Total
          type: integer
      required:
      - agents
      - total
      - page
      - page_size
      title: AgentListResponse
      type: object
    AgentResponse:
      properties:
        created_at:
          format: date-time
          title: Created At
          type: string
        description:
          anyOf:
          - type: string
          - type: 'null'
          title: Description
        framework:
          anyOf:
          - type: string
          - type: 'null'
          title: Framework
        id:
          title: Id
          type: string
        last_active_at:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Last Active At
        name:
          title: Name
          type: string
        status:
          title: Status
          type: string
        tags:
          anyOf:
          - type: object
          - type: 'null'
          title: Tags
        total_cost:
          title: Total Cost
          type: number
        trace_count:
          title: Trace Count
          type: integer
        updated_at:
          format: date-time
          title: Updated At
          type: string
        version:
          anyOf:
          - type: string
          - type: 'null'
          title: Version
      required:
      - id
      - name
      - description
      - framework
      - version
      - tags
      - status
      - trace_count
      - total_cost
      - last_active_at
      - created_at
      - updated_at
      title: AgentResponse
      type: object
    AgentUpdate:
      properties:
        description:
          anyOf:
          - type: string
          - type: 'null'
          title: Description
        framework:
          anyOf:
          - type: string
          - type: 'null'
          title: Framework
        name:
          anyOf:
          - type: string
          - type: 'null'
          title: Name
        status:
          anyOf:
          - type: string
          - type: 'null'
          title: Status
        tags:
          anyOf:
          - type: object
          - type: 'null'
          title: Tags
        version:
          anyOf:
          - type: string
          - type: 'null'
          title: Version
      title: AgentUpdate
      type: object
    AlertSettings:
      properties:
        enabled:
          default: true
          title: Enabled
          type: boolean
        slack_webhook_url:
          anyOf:
          - type: string
          - type: 'null'
          title: Slack Webhook Url
        webhook_url:
          anyOf:
          - type: string
          - type: 'null'
          title: Webhook Url
      title: AlertSettings
      type: object
    AnalyticsSummary:
      properties:
        most_triggered_policy:
          anyOf:
          - type: string
          - type: 'null'
          title: Most Triggered Policy
        open_violations:
          title: Open Violations
          type: integer
        resolution_rate:
          title: Resolution Rate
          type: number
        total_violations:
          title: Total Violations
          type: integer
        trend_direction:
          title: Trend Direction
          type: string
      required:
      - total_violations
      - open_violations
      - resolution_rate
      - most_triggered_policy
      - trend_direction
      title: AnalyticsSummary
      type: object
    AnomalyResponse:
      properties:
        agent_id:
          title: Agent Id
          type: string
        agent_name:
          title: Agent Name
          type: string
        anomaly_type:
          title: Anomaly Type
          type: string
        detected_at:
          format: date-time
          title: Detected At
          type: string
        message:
          title: Message
          type: string
        severity:
          title: Severity
          type: string
        threshold:
          title: Threshold
          type: number
        value:
          title: Value
          type: number
      required:
      - agent_id
      - agent_name
      - anomaly_type
      - severity
      - message
      - value
      - threshold
      - detected_at
      title: AnomalyResponse
      type: object
    AuditLogListResponse:
      properties:
        logs:
          items:
            $ref: '#/components/schemas/AuditLogResponse'
          title: Logs
          type: array
        page:
          title: Page
          type: integer
        page_size:
          title: Page Size
          type: integer
        total:
          title: Total
          type: integer
      required:
      - logs
      - total
      - page
      - page_size
      title: AuditLogListResponse
      type: object
    AuditLogResponse:
      properties:
        action:
          title: Action
          type: string
        created_at:
          format: date-time
          title: Created At
          type: string
        details:
          anyOf:
          - type: object
          - type: 'null'
          title: Details
        id:
          title: Id
          type: string
        ip_address:
          anyOf:
          - type: string
          - type: 'null'
          title: Ip Address
        resource_id:
          title: Resource Id
          type: string
        resource_type:
          title: Resource Type
          type: string
        user_id:
          anyOf:
          - type: string
          - type: 'null'
          title: User Id
      required:
      - id
      - user_id
      - action
      - resource_type
      - resource_id
      - details
      - ip_address
      - created_at
      title: AuditLogResponse
      type: object
    BulkAction:
      properties:
        action:
          title: Action
          type: string
        policy_ids:
          items:
            type: string
          title: Policy Ids
          type: array
      required:
      - policy_ids
      - action
      title: BulkAction
      type: object
    BulkResolution:
      properties:
        note:
          anyOf:
          - type: string
          - type: 'null'
          title: Note
        status:
          title: Status
          type: string
        violation_ids:
          items:
            type: string
          title: Violation Ids
          type: array
      required:
      - violation_ids
      - status
      title: BulkResolution
      type: object
    BulkResult:
      properties:
        processed:
          title: Processed
          type: integer
        skipped:
          title: Skipped
          type: integer
      required:
      - processed
      - skipped
      title: BulkResult
      type: object
    CostSummary:
      properties:
        avg_cost_per_trace:
          title: Avg Cost Per Trace
          type: number
        by_agent:
          items:
            $ref: '#/components/schemas/AgentCost'
          title: By Agent
          type: array
        period_days:
          title: Period Days
          type: integer
        total_cost:
          title: Total Cost
          type: number
        total_traces:
          title: Total Traces
          type: integer
      required:
      - total_cost
      - total_traces
      - avg_cost_per_trace
      - by_agent
      - period_days
      title: CostSummary
      type: object
    DashboardSummary:
      properties:
        total_agents:
          title: Total Agents
          type: integer
        total_cost_30d:
          title: Total Cost 30D
          type: number
        total_traces:
          title: Total Traces
          type: integer
        total_violations:
          title: Total Violations
          type: integer
        traces_today:
          title: Traces Today
          type: integer
        violations_today:
          title: Violations Today
          type: integer
      required:
      - total_agents
      - total_traces
      - total_violations
      - total_cost_30d
      - traces_today
      - violations_today
      title: DashboardSummary
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    OTLPRequest:
      properties:
        resource_spans:
          default: []
          items:
            $ref: '#/components/schemas/OTLPResourceSpan'
          title: Resource Spans
          type: array
      title: OTLPRequest
      type: object
    OTLPResourceSpan:
      properties:
        resource:
          anyOf:
          - type: object
          - type: 'null'
          default: {}
          title: Resource
        scope_spans:
          default: []
          items:
            type: object
          title: Scope Spans
          type: array
      title: OTLPResourceSpan
      type: object
    PolicyCreate:
      properties:
        agent_ids:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Agent Ids
        config:
          default: {}
          title: Config
          type: object
        enabled:
          default: true
          title: Enabled
          type: boolean
        mode:
          default: warning
          title: Mode
          type: string
        name:
          title: Name
          type: string
        policy_type:
          title: Policy Type
          type: string
      required:
      - name
      - policy_type
      title: PolicyCreate
      type: object
    PolicyEffectiveness:
      properties:
        false_positive_rate:
          title: False Positive Rate
          type: number
        false_positives:
          title: False Positives
          type: integer
        open_count:
          title: Open Count
          type: integer
        policy_id:
          title: Policy Id
          type: string
        policy_name:
          title: Policy Name
          type: string
        policy_type:
          title: Policy Type
          type: string
        resolution_rate:
          title: Resolution Rate
          type: number
        resolved:
          title: Resolved
          type: integer
        total_violations:
          title: Total Violations
          type: integer
      required:
      - policy_id
      - policy_name
      - policy_type
      - total_violations
      - false_positives
      - resolved
      - open_count
      - false_positive_rate
      - resolution_rate
      title: PolicyEffectiveness
      type: object
    PolicyResponse:
      properties:
        agent_ids:
          items:
            type: string
          title: Agent Ids
          type: array
        agent_names:
          items:
            type: string
          title: Agent Names
          type: array
        config:
          title: Config
          type: object
        created_at:
          format: date-time
          title: Created At
          type: string
        enabled:
          title: Enabled
          type: boolean
        id:
          title: Id
          type: string
        mode:
          title: Mode
          type: string
        name:
          title: Name
          type: string
        policy_type:
          title: Policy Type
          type: string
        updated_at:
          format: date-time
          title: Updated At
          type: string
      required:
      - id
      - name
      - policy_type
      - mode
      - config
      - enabled
      - agent_ids
      - agent_names
      - created_at
      - updated_at
      title: PolicyResponse
      type: object
    PolicyUpdate:
      properties:
        agent_ids:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Agent Ids
        config:
          anyOf:
          - type: object
          - type: 'null'
          title: Config
        enabled:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Enabled
        mode:
          anyOf:
          - type: string
          - type: 'null'
          title: Mode
        name:
          anyOf:
          - type: string
          - type: 'null'
          title: Name
      title: PolicyUpdate
      type: object
    PolicyVersionResponse:
      properties:
        agent_ids:
          anyOf:
          - items: {}
            type: array
          - type: 'null'
          title: Agent Ids
        change_type:
          title: Change Type
          type: string
        changed_by_user_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Changed By User Id
        config:
          title: Config
          type: object
        created_at:
          format: date-time
          title: Created At
          type: string
        enabled:
          title: Enabled
          type: boolean
        id:
          title: Id
          type: string
        mode:
          title: Mode
          type: string
        name:
          title: Name
          type: string
        policy_type:
          title: Policy Type
          type: string
        version_number:
          title: Version Number
          type: integer
      required:
      - id
      - version_number
      - name
      - policy_type
      - mode
      - config
      - enabled
      - agent_ids
      - change_type
      - changed_by_user_id
      - created_at
      title: PolicyVersionResponse
      type: object
    PricingEntry:
      properties:
        input_per_1m:
          description: Price per 1M input tokens
          minimum: 0.0
          title: Input Per 1M
          type: number
        model:
          title: Model
          type: string
        output_per_1m:
          description: Price per 1M output tokens
          minimum: 0.0
          title: Output Per 1M
          type: number
      required:
      - model
      - input_per_1m
      - output_per_1m
      title: PricingEntry
      type: object
    RedTeamScanRequest:
      properties:
        agent_id:
          title: Agent Id
          type: string
        profile:
          default: quick
          title: Profile
          type: string
      required:
      - agent_id
      title: RedTeamScanRequest
      type: object
    ResolutionUpdate:
      properties:
        note:
          anyOf:
          - type: string
          - type: 'null'
          title: Note
        status:
          title: Status
          type: string
      required:
      - status
      title: ResolutionUpdate
      type: object
    RetentionSettings:
      properties:
        retention_days:
          default: 30
          maximum: 365.0
          minimum: 7.0
          title: Retention Days
          type: integer
      title: RetentionSettings
      type: object
    RetentionStatus:
      properties:
        retention_days:
          title: Retention Days
          type: integer
        traces_eligible:
          title: Traces Eligible
          type: integer
      required:
      - retention_days
      - traces_eligible
      title: RetentionStatus
      type: object
    SpanResponse:
      properties:
        cost:
          title: Cost
          type: number
        duration_ms:
          anyOf:
          - type: integer
          - type: 'null'
          title: Duration Ms
        end_time:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: End Time
        id:
          title: Id
          type: string
        input_data:
          anyOf:
          - type: object
          - type: 'null'
          title: Input Data
        input_tokens:
          anyOf:
          - type: integer
          - type: 'null'
          title: Input Tokens
        model:
          anyOf:
          - type: string
          - type: 'null'
          title: Model
        name:
          title: Name
          type: string
        output_data:
          anyOf:
          - type: object
          - type: 'null'
          title: Output Data
        output_tokens:
          anyOf:
          - type: integer
          - type: 'null'
          title: Output Tokens
        parent_span_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Parent Span Id
        span_metadata:
          anyOf:
          - type: object
          - type: 'null'
          title: Span Metadata
        span_type:
          title: Span Type
          type: string
        start_time:
          format: date-time
          title: Start Time
          type: string
        tool_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Tool Name
        tool_params:
          anyOf:
          - type: object
          - type: 'null'
          title: Tool Params
        tool_result:
          anyOf:
          - type: object
          - type: 'null'
          title: Tool Result
        total_tokens:
          anyOf:
          - type: integer
          - type: 'null'
          title: Total Tokens
        trace_id:
          title: Trace Id
          type: string
      required:
      - id
      - trace_id
      - parent_span_id
      - name
      - span_type
      - start_time
      - end_time
      - duration_ms
      - model
      - input_tokens
      - output_tokens
      - total_tokens
      - cost
      - input_data
      - output_data
      - tool_name
      - tool_params
      - tool_result
      - span_metadata
      title: SpanResponse
      type: object
    SpanSearchItem:
      properties:
        agent_name:
          title: Agent Name
          type: string
        cost:
          title: Cost
          type: number
        duration_ms:
          anyOf:
          - type: integer
          - type: 'null'
          title: Duration Ms
        id:
          title: Id
          type: string
        input_tokens:
          anyOf:
          - type: integer
          - type: 'null'
          title: Input Tokens
        model:
          anyOf:
          - type: string
          - type: 'null'
          title: Model
        name:
          title: Name
          type: string
        output_tokens:
          anyOf:
          - type: integer
          - type: 'null'
          title: Output Tokens
        span_type:
          title: Span Type
          type: string
        start_time:
          format: date-time
          title: Start Time
          type: string
        tool_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Tool Name
        trace_id:
          title: Trace Id
          type: string
      required:
      - id
      - trace_id
      - agent_name
      - name
      - span_type
      - model
      - tool_name
      - cost
      - duration_ms
      - input_tokens
      - output_tokens
      - start_time
      title: SpanSearchItem
      type: object
    SpanSearchResponse:
      properties:
        page:
          title: Page
          type: integer
        page_size:
          title: Page Size
          type: integer
        spans:
          items:
            $ref: '#/components/schemas/SpanSearchItem'
          title: Spans
          type: array
        total:
          title: Total
          type: integer
      required:
      - spans
      - total
      - page
      - page_size
      title: SpanSearchResponse
      type: object
    TemplatePreview:
      properties:
        agent_ids:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Agent Ids
        exclude_policies:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Exclude Policies
        template_id:
          title: Template Id
          type: string
      required:
      - template_id
      title: TemplatePreview
      type: object
    TestDetectionRequest:
      properties:
        config:
          title: Config
          type: object
        policy_type:
          title: Policy Type
          type: string
        sample_text:
          title: Sample Text
          type: string
      required:
      - policy_type
      - config
      - sample_text
      title: TestDetectionRequest
      type: object
    TraceListItem:
      description: Trace metadata for list view — no spans loaded.
      properties:
        agent_id:
          title: Agent Id
          type: string
        agent_name:
          title: Agent Name
          type: string
        created_at:
          format: date-time
          title: Created At
          type: string
        duration_ms:
          anyOf:
          - type: integer
          - type: 'null'
          title: Duration Ms
        end_time:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: End Time
        id:
          title: Id
          type: string
        start_time:
          format: date-time
          title: Start Time
          type: string
        status:
          title: Status
          type: string
        total_cost:
          title: Total Cost
          type: number
        trace_metadata:
          anyOf:
          - type: object
          - type: 'null'
          title: Trace Metadata
        violation_count:
          title: Violation Count
          type: integer
      required:
      - id
      - agent_id
      - agent_name
      - start_time
      - end_time
      - duration_ms
      - status
      - total_cost
      - violation_count
      - trace_metadata
      - created_at
      title: TraceListItem
      type: object
    TraceListResponse:
      properties:
        page:
          title: Page
          type: integer
        page_size:
          title: Page Size
          type: integer
        total:
          title: Total
          type: integer
        traces:
          items:
            $ref: '#/components/schemas/TraceListItem'
          title: Traces
          type: array
      required:
      - traces
      - total
      - page
      - page_size
      title: TraceListResponse
      type: object
    TraceResponse:
      description: Full trace with spans and violations — for detail view only.
      properties:
        agent_id:
          title: Agent Id
          type: string
        agent_name:
          title: Agent Name
          type: string
        created_at:
          format: date-time
          title: Created At
          type: string
        duration_ms:
          anyOf:
          - type: integer
          - type: 'null'
          title: Duration Ms
        end_time:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: End Time
        id:
          title: Id
          type: string
        spans:
          default: []
          items:
            $ref: '#/components/schemas/SpanResponse'
          title: Spans
          type: array
        start_time:
          format: date-time
          title: Start Time
          type: string
        status:
          title: Status
          type: string
        total_cost:
          title: Total Cost
          type: number
        trace_metadata:
          anyOf:
          - type: object
          - type: 'null'
          title: Trace Metadata
        violation_count:
          title: Violation Count
          type: integer
        violations:
          default: []
          items:
            $ref: '#/components/schemas/ViolationBrief'
          title: Violations
          type: array
      required:
      - id
      - agent_id
      - agent_name
      - start_time
      - end_time
      - duration_ms
      - status
      - total_cost
      - violation_count
      - trace_metadata
      - created_at
      title: TraceResponse
      type: object
    TrendPoint:
      properties:
        critical:
          default: 0
          title: Critical
          type: integer
        date:
          title: Date
          type: string
        high:
          default: 0
          title: High
          type: integer
        low:
          default: 0
          title: Low
          type: integer
        medium:
          default: 0
          title: Medium
          type: integer
        total:
          default: 0
          title: Total
          type: integer
      required:
      - date
      title: TrendPoint
      type: object
    UserResponse:
      properties:
        clerk_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Clerk Id
        created_at:
          format: date-time
          title: Created At
          type: string
        email:
          anyOf:
          - type: string
          - type: 'null'
          title: Email
        first_name:
          anyOf:
          - type: string
          - type: 'null'
          title: First Name
        id:
          title: Id
          type: string
        image_url:
          anyOf:
          - type: string
          - type: 'null'
          title: Image Url
        last_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Last Name
        org_id:
          title: Org Id
          type: string
        org_name:
          title: Org Name
          type: string
        org_role:
          title: Org Role
          type: string
        role:
          title: Role
          type: string
        username:
          title: Username
          type: string
      required:
      - id
      - clerk_id
      - username
      - email
      - first_name
      - last_name
      - image_url
      - role
      - org_id
      - org_name
      - org_role
      - created_at
      title: UserResponse
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
      - loc
      - msg
      - type
      title: ValidationError
      type: object
    ViolationBrief:
      properties:
        description:
          title: Description
          type: string
        id:
          title: Id
          type: string
        policy_id:
          title: Policy Id
          type: string
        severity:
          title: Severity
          type: string
        span_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Span Id
      required:
      - id
      - policy_id
      - span_id
      - severity
      - description
      title: ViolationBrief
      type: object
    ViolationListResponse:
      properties:
        page:
          title: Page
          type: integer
        page_size:
          title: Page Size
          type: integer
        total:
          title: Total
          type: integer
        violations:
          items:
            $ref: '#/components/schemas/ViolationResponse'
          title: Violations
          type: array
      required:
      - violations
      - total
      - page
      - page_size
      title: ViolationListResponse
      type: object
    ViolationResponse:
      properties:
        created_at:
          format: date-time
          title: Created At
          type: string
        description:
          title: Description
          type: string
        details:
          anyOf:
          - type: object
          - type: 'null'
          title: Details
        id:
          title: Id
          type: string
        policy_id:
          title: Policy Id
          type: string
        policy_name:
          title: Policy Name
          type: string
        resolution_note:
          anyOf:
          - type: string
          - type: 'null'
          title: Resolution Note
        resolution_status:
          title: Resolution Status
          type: string
        resolved_at:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Resolved At
        resolved_by_user_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Resolved By User Id
        severity:
          title: Severity
          type: string
        span_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Span Id
        trace_id:
          title: Trace Id
          type: string
      required:
      - id
      - trace_id
      - policy_id
      - policy_name
      - span_id
      - severity
      - description
      - details
      - resolution_status
      - resolved_by_user_id
      - resolved_at
      - resolution_note
      - created_at
      title: ViolationResponse
      type: object
    YAMLSyncRequest:
      properties:
        purge:
          default: false
          title: Purge
          type: boolean
        yaml_content:
          title: Yaml Content
          type: string
      required:
      - yaml_content
      title: YAMLSyncRequest
      type: object
    YAMLSyncResult:
      properties:
        created:
          title: Created
          type: integer
        deleted:
          title: Deleted
          type: integer
        errors:
          items:
            type: string
          title: Errors
          type: array
        unchanged:
          title: Unchanged
          type: integer
        updated:
          title: Updated
          type: integer
      required:
      - created
      - updated
      - deleted
      - unchanged
      - errors
      title: YAMLSyncResult
      type: object
  securitySchemes:
    APIKeyHeader:
      in: header
      name: X-API-Key
      type: apiKey
info:
  description: Agent Governance & Observability Platform — REST API for traces, agents,
    policies, violations, costs, audit logs, anomaly detection, and compliance reports.
  title: Nyraxis API
  version: 0.2.0
openapi: 3.1.0
paths:
  /:
    get:
      description: Root endpoint.
      operationId: root__get
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
      summary: Root
      tags:
      - Root
  /api/v1/agents:
    get:
      operationId: list_agents_api_v1_agents_get
      parameters:
      - in: query
        name: page
        required: false
        schema:
          default: 1
          minimum: 1
          title: Page
          type: integer
      - in: query
        name: page_size
        required: false
        schema:
          default: 50
          maximum: 100
          minimum: 1
          title: Page Size
          type: integer
      - in: query
        name: search
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Search
      - in: query
        name: status
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Status
      - in: query
        name: framework
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Framework
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentListResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: List Agents
      tags:
      - agents
    post:
      operationId: create_agent_api_v1_agents_post
      parameters:
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentCreate'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Create Agent
      tags:
      - agents
  /api/v1/agents/{agent_id}:
    delete:
      operationId: delete_agent_api_v1_agents__agent_id__delete
      parameters:
      - in: path
        name: agent_id
        required: true
        schema:
          title: Agent Id
          type: string
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      responses:
        '204':
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Delete Agent
      tags:
      - agents
    get:
      operationId: get_agent_api_v1_agents__agent_id__get
      parameters:
      - in: path
        name: agent_id
        required: true
        schema:
          title: Agent Id
          type: string
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Agent
      tags:
      - agents
    patch:
      operationId: update_agent_api_v1_agents__agent_id__patch
      parameters:
      - in: path
        name: agent_id
        required: true
        schema:
          title: Agent Id
          type: string
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentUpdate'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Update Agent
      tags:
      - agents
  /api/v1/alerts/settings:
    get:
      operationId: get_alert_settings_api_v1_alerts_settings_get
      parameters:
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AlertSettings'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Alert Settings
      tags:
      - alerts
    put:
      operationId: update_alert_settings_api_v1_alerts_settings_put
      parameters:
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AlertSettings'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AlertSettings'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Update Alert Settings
      tags:
      - alerts
  /api/v1/alerts/test:
    post:
      operationId: test_alert_api_v1_alerts_test_post
      parameters:
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Test Alert
      tags:
      - alerts
  /api/v1/anomalies:
    get:
      operationId: list_anomalies_api_v1_anomalies_get
      parameters:
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/AnomalyResponse'
                title: Response List Anomalies Api V1 Anomalies Get
                type: array
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: List Anomalies
      tags:
      - anomalies
  /api/v1/api-keys:
    get:
      operationId: list_api_keys_api_v1_api_keys_get
      parameters:
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/APIKeyResponse'
                title: Response List Api Keys Api V1 Api Keys Get
                type: array
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: List Api Keys
      tags:
      - api-keys
    post:
      operationId: create_api_key_api_v1_api_keys_post
      parameters:
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/APIKeyCreate'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIKeyCreateResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Create Api Key
      tags:
      - api-keys
  /api/v1/api-keys/{key_id}:
    delete:
      operationId: revoke_api_key_api_v1_api_keys__key_id__delete
      parameters:
      - in: path
        name: key_id
        required: true
        schema:
          title: Key Id
          type: string
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Revoke Api Key
      tags:
      - api-keys
  /api/v1/audit-logs:
    get:
      operationId: list_audit_logs_api_v1_audit_logs_get
      parameters:
      - in: query
        name: page
        required: false
        schema:
          default: 1
          minimum: 1
          title: Page
          type: integer
      - in: query
        name: page_size
        required: false
        schema:
          default: 50
          maximum: 100
          minimum: 1
          title: Page Size
          type: integer
      - in: query
        name: action
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Action
      - in: query
        name: resource_type
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Resource Type
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuditLogListResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: List Audit Logs
      tags:
      - audit-logs
  /api/v1/costs/summary:
    get:
      operationId: get_cost_summary_api_v1_costs_summary_get
      parameters:
      - in: query
        name: days
        required: false
        schema:
          default: 30
          maximum: 365
          minimum: 1
          title: Days
          type: integer
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CostSummary'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Cost Summary
      tags:
      - costs
  /api/v1/dashboard/summary:
    get:
      operationId: get_dashboard_summary_api_v1_dashboard_summary_get
      parameters:
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DashboardSummary'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Dashboard Summary
      tags:
      - dashboard
  /api/v1/governance/health:
    get:
      description: Get health status of all governance providers.
      operationId: governance_health_api_v1_governance_health_get
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
      summary: Governance Health
      tags:
      - governance
  /api/v1/governance/red-team/scan:
    post:
      description: Start a red-team vulnerability scan.
      operationId: start_red_team_scan_api_v1_governance_red_team_scan_post
      parameters:
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RedTeamScanRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Start Red Team Scan
      tags:
      - governance
  /api/v1/governance/red-team/scans:
    get:
      description: List red-team scans.
      operationId: list_red_team_scans_api_v1_governance_red_team_scans_get
      parameters:
      - in: query
        name: agent_id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Agent Id
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: List Red Team Scans
      tags:
      - governance
  /api/v1/governance/red-team/scans/{scan_id}:
    get:
      description: Get red-team scan details.
      operationId: get_red_team_scan_api_v1_governance_red_team_scans__scan_id__get
      parameters:
      - in: path
        name: scan_id
        required: true
        schema:
          title: Scan Id
          type: string
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Red Team Scan
      tags:
      - governance
  /api/v1/governance/test-detection:
    post:
      description: Test a policy provider against sample text.
      operationId: test_detection_api_v1_governance_test_detection_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TestDetectionRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Test Detection
      tags:
      - governance
  /api/v1/ingest/otel:
    post:
      description: 'Standard OTLP/HTTP JSON endpoint for OpenLLMetry / OpenTelemetry
        GenAI traces.


        Accepts the standard OTLP ExportTraceServiceRequest JSON format and normalizes

        gen_ai.* semantic conventions into the Nyraxis internal schema.'
      operationId: ingest_otel_api_v1_ingest_otel_post
      responses:
        '202':
          content:
            application/json:
              schema: {}
          description: Successful Response
      security:
      - APIKeyHeader: []
      summary: Ingest Otel
      tags:
      - ingestion
  /api/v1/ingest/otel/v1/metrics:
    post:
      description: Accept and discard OTLP metrics from OpenLLMetry. We only process
        traces.
      operationId: ingest_otel_metrics_api_v1_ingest_otel_v1_metrics_post
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
      summary: Ingest Otel Metrics
      tags:
      - ingestion
  /api/v1/ingest/otel/v1/traces:
    post:
      description: 'Standard OTLP/HTTP JSON endpoint for OpenLLMetry / OpenTelemetry
        GenAI traces.


        Accepts the standard OTLP ExportTraceServiceRequest JSON format and normalizes

        gen_ai.* semantic conventions into the Nyraxis internal schema.'
      operationId: ingest_otel_api_v1_ingest_otel_v1_traces_post
      responses:
        '202':
          content:
            application/json:
              schema: {}
          description: Successful Response
      security:
      - APIKeyHeader: []
      summary: Ingest Otel
      tags:
      - ingestion
  /api/v1/ingest/otlp:
    post:
      operationId: ingest_otlp_api_v1_ingest_otlp_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OTLPRequest'
        required: true
      responses:
        '202':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
      - APIKeyHeader: []
      summary: Ingest Otlp
      tags:
      - ingestion
  /api/v1/policies:
    get:
      operationId: list_policies_api_v1_policies_get
      parameters:
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/PolicyResponse'
                title: Response List Policies Api V1 Policies Get
                type: array
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: List Policies
      tags:
      - policies
    post:
      operationId: create_policy_api_v1_policies_post
      parameters:
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PolicyCreate'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PolicyResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Create Policy
      tags:
      - policies
  /api/v1/policies/bulk:
    post:
      operationId: bulk_policy_action_api_v1_policies_bulk_post
      parameters:
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkAction'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkResult'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Bulk Policy Action
      tags:
      - policies
  /api/v1/policies/export/yaml:
    get:
      description: Export all policies as YAML.
      operationId: export_yaml_api_v1_policies_export_yaml_get
      parameters:
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Export Yaml
      tags:
      - policies
  /api/v1/policies/sync:
    post:
      description: Sync policies from YAML — create/update/delete to match.
      operationId: sync_yaml_api_v1_policies_sync_post
      parameters:
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/YAMLSyncRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/YAMLSyncResult'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Sync Yaml
      tags:
      - policies
  /api/v1/policies/templates/apply:
    post:
      operationId: apply_template_api_v1_policies_templates_apply_post
      parameters:
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TemplatePreview'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/PolicyResponse'
                title: Response Apply Template Api V1 Policies Templates Apply Post
                type: array
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Apply Template
      tags:
      - policies
  /api/v1/policies/templates/list:
    get:
      description: List available compliance templates.
      operationId: list_templates_api_v1_policies_templates_list_get
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
      summary: List Templates
      tags:
      - policies
  /api/v1/policies/types:
    get:
      description: List all available policy types (built-in + custom).
      operationId: list_policy_types_api_v1_policies_types_get
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
      summary: List Policy Types
      tags:
      - policies
  /api/v1/policies/{policy_id}:
    delete:
      operationId: delete_policy_api_v1_policies__policy_id__delete
      parameters:
      - in: path
        name: policy_id
        required: true
        schema:
          title: Policy Id
          type: string
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      responses:
        '204':
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Delete Policy
      tags:
      - policies
    get:
      operationId: get_policy_api_v1_policies__policy_id__get
      parameters:
      - in: path
        name: policy_id
        required: true
        schema:
          title: Policy Id
          type: string
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PolicyResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Policy
      tags:
      - policies
    patch:
      operationId: update_policy_api_v1_policies__policy_id__patch
      parameters:
      - in: path
        name: policy_id
        required: true
        schema:
          title: Policy Id
          type: string
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PolicyUpdate'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PolicyResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Update Policy
      tags:
      - policies
  /api/v1/policies/{policy_id}/rollback/{version_id}:
    post:
      operationId: rollback_policy_api_v1_policies__policy_id__rollback__version_id__post
      parameters:
      - in: path
        name: policy_id
        required: true
        schema:
          title: Policy Id
          type: string
      - in: path
        name: version_id
        required: true
        schema:
          title: Version Id
          type: string
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PolicyResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Rollback Policy
      tags:
      - policies
  /api/v1/policies/{policy_id}/versions:
    get:
      operationId: list_policy_versions_api_v1_policies__policy_id__versions_get
      parameters:
      - in: path
        name: policy_id
        required: true
        schema:
          title: Policy Id
          type: string
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/PolicyVersionResponse'
                title: Response List Policy Versions Api V1 Policies  Policy Id  Versions
                  Get
                type: array
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: List Policy Versions
      tags:
      - policies
  /api/v1/pricing:
    get:
      description: Get merged pricing table (org overrides + defaults).
      operationId: get_pricing_table_api_v1_pricing_get
      parameters:
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties:
                  additionalProperties:
                    type: number
                  type: object
                title: Response Get Pricing Table Api V1 Pricing Get
                type: object
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Pricing Table
      tags:
      - pricing
    put:
      description: Create or update pricing for a model. Admin only. Persists in DB.
      operationId: update_model_pricing_api_v1_pricing_put
      parameters:
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PricingEntry'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Update Model Pricing
      tags:
      - pricing
  /api/v1/pricing/{model_name}:
    delete:
      description: Remove org-specific pricing override (falls back to built-in default).
        Admin only.
      operationId: delete_model_pricing_api_v1_pricing__model_name__delete
      parameters:
      - in: path
        name: model_name
        required: true
        schema:
          title: Model Name
          type: string
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Delete Model Pricing
      tags:
      - pricing
  /api/v1/reports/compliance:
    get:
      operationId: export_compliance_report_api_v1_reports_compliance_get
      parameters:
      - in: query
        name: format
        required: false
        schema:
          default: pdf
          enum:
          - csv
          - pdf
          title: Format
          type: string
      - in: query
        name: days
        required: false
        schema:
          default: 30
          maximum: 365
          minimum: 1
          title: Days
          type: integer
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Export Compliance Report
      tags:
      - reports
  /api/v1/retention/run:
    post:
      operationId: run_retention_cleanup_api_v1_retention_run_post
      parameters:
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Run Retention Cleanup
      tags:
      - retention
  /api/v1/retention/settings:
    get:
      operationId: get_retention_settings_api_v1_retention_settings_get
      parameters:
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetentionStatus'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Retention Settings
      tags:
      - retention
    put:
      operationId: update_retention_settings_api_v1_retention_settings_put
      parameters:
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RetentionSettings'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetentionSettings'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Update Retention Settings
      tags:
      - retention
  /api/v1/spans/search:
    get:
      description: Search spans across all traces in the org.
      operationId: search_spans_api_v1_spans_search_get
      parameters:
      - in: query
        name: page
        required: false
        schema:
          default: 1
          minimum: 1
          title: Page
          type: integer
      - in: query
        name: page_size
        required: false
        schema:
          default: 50
          maximum: 100
          minimum: 1
          title: Page Size
          type: integer
      - in: query
        name: model
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Model
      - in: query
        name: tool_name
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Tool Name
      - in: query
        name: span_type
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Span Type
      - in: query
        name: q
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Q
      - in: query
        name: agent_id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Agent Id
      - in: query
        name: min_cost
        required: false
        schema:
          anyOf:
          - type: number
          - type: 'null'
          title: Min Cost
      - in: query
        name: max_cost
        required: false
        schema:
          anyOf:
          - type: number
          - type: 'null'
          title: Max Cost
      - in: query
        name: min_duration_ms
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Min Duration Ms
      - in: query
        name: max_duration_ms
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Max Duration Ms
      - in: query
        name: min_tokens
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Min Tokens
      - in: query
        name: max_tokens
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Max Tokens
      - in: query
        name: start_date
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Start Date
      - in: query
        name: end_date
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: End Date
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpanSearchResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Search Spans
      tags:
      - spans
  /api/v1/traces:
    get:
      description: List traces with filtering and pagination — N+1 fixed with selectinload.
      operationId: list_traces_api_v1_traces_get
      parameters:
      - in: query
        name: page
        required: false
        schema:
          default: 1
          minimum: 1
          title: Page
          type: integer
      - in: query
        name: page_size
        required: false
        schema:
          default: 50
          maximum: 100
          minimum: 1
          title: Page Size
          type: integer
      - in: query
        name: agent_id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Agent Id
      - in: query
        name: status
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Status
      - in: query
        name: start_date
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Start Date
      - in: query
        name: end_date
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: End Date
      - in: query
        name: min_cost
        required: false
        schema:
          anyOf:
          - type: number
          - type: 'null'
          title: Min Cost
      - in: query
        name: max_cost
        required: false
        schema:
          anyOf:
          - type: number
          - type: 'null'
          title: Max Cost
      - in: query
        name: has_violations
        required: false
        schema:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Has Violations
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TraceListResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: List Traces
      tags:
      - traces
  /api/v1/traces/compare:
    get:
      description: Compare two traces side-by-side with deltas.
      operationId: compare_traces_api_v1_traces_compare_get
      parameters:
      - description: Comma-separated trace IDs (exactly 2)
        in: query
        name: trace_ids
        required: true
        schema:
          description: Comma-separated trace IDs (exactly 2)
          title: Trace Ids
          type: string
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Compare Traces
      tags:
      - traces
  /api/v1/traces/export:
    get:
      description: Export traces with spans as JSON or CSV streaming download.
      operationId: export_traces_api_v1_traces_export_get
      parameters:
      - in: query
        name: format
        required: false
        schema:
          default: json
          pattern: ^(json|csv)$
          title: Format
          type: string
      - in: query
        name: agent_id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Agent Id
      - in: query
        name: status
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Status
      - in: query
        name: start_date
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Start Date
      - in: query
        name: end_date
        required: false
        schema:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: End Date
      - in: query
        name: min_cost
        required: false
        schema:
          anyOf:
          - type: number
          - type: 'null'
          title: Min Cost
      - in: query
        name: max_cost
        required: false
        schema:
          anyOf:
          - type: number
          - type: 'null'
          title: Max Cost
      - in: query
        name: has_violations
        required: false
        schema:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Has Violations
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Export Traces
      tags:
      - traces
  /api/v1/traces/stream:
    get:
      description: SSE endpoint — subscribe to real-time trace events via Redis pub/sub.
      operationId: stream_traces_api_v1_traces_stream_get
      parameters:
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Stream Traces
      tags:
      - traces
  /api/v1/traces/{trace_id}:
    get:
      description: Get trace by ID with full span + violation details.
      operationId: get_trace_api_v1_traces__trace_id__get
      parameters:
      - in: path
        name: trace_id
        required: true
        schema:
          title: Trace Id
          type: string
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TraceResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Trace
      tags:
      - traces
  /api/v1/users/me:
    get:
      operationId: get_current_user_info_api_v1_users_me_get
      parameters:
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Get Current User Info
      tags:
      - users
  /api/v1/violations:
    get:
      operationId: list_violations_api_v1_violations_get
      parameters:
      - in: query
        name: page
        required: false
        schema:
          default: 1
          minimum: 1
          title: Page
          type: integer
      - in: query
        name: page_size
        required: false
        schema:
          default: 50
          maximum: 100
          minimum: 1
          title: Page Size
          type: integer
      - in: query
        name: policy_id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Policy Id
      - in: query
        name: severity
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Severity
      - in: query
        name: agent_id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Agent Id
      - in: query
        name: resolution_status
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Resolution Status
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ViolationListResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: List Violations
      tags:
      - violations
  /api/v1/violations/analytics/effectiveness:
    get:
      operationId: policy_effectiveness_api_v1_violations_analytics_effectiveness_get
      parameters:
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/PolicyEffectiveness'
                title: Response Policy Effectiveness Api V1 Violations Analytics Effectiveness
                  Get
                type: array
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Policy Effectiveness
      tags:
      - violations
  /api/v1/violations/analytics/summary:
    get:
      operationId: analytics_summary_api_v1_violations_analytics_summary_get
      parameters:
      - in: query
        name: days
        required: false
        schema:
          default: 30
          maximum: 365
          minimum: 1
          title: Days
          type: integer
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnalyticsSummary'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Analytics Summary
      tags:
      - violations
  /api/v1/violations/analytics/trends:
    get:
      operationId: violation_trends_api_v1_violations_analytics_trends_get
      parameters:
      - in: query
        name: days
        required: false
        schema:
          default: 30
          maximum: 365
          minimum: 1
          title: Days
          type: integer
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/TrendPoint'
                title: Response Violation Trends Api V1 Violations Analytics Trends
                  Get
                type: array
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Violation Trends
      tags:
      - violations
  /api/v1/violations/bulk-resolve:
    post:
      operationId: bulk_resolve_api_v1_violations_bulk_resolve_post
      parameters:
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkResolution'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Bulk Resolve
      tags:
      - violations
  /api/v1/violations/{violation_id}/resolve:
    patch:
      operationId: resolve_violation_api_v1_violations__violation_id__resolve_patch
      parameters:
      - in: path
        name: violation_id
        required: true
        schema:
          title: Violation Id
          type: string
      - in: header
        name: authorization
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      - in: header
        name: x-clerk-org-id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Clerk-Org-Id
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResolutionUpdate'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ViolationResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      summary: Resolve Violation
      tags:
      - violations
  /api/webhooks/clerk:
    post:
      description: Handle Clerk webhook events for user/org sync.
      operationId: clerk_webhook_api_webhooks_clerk_post
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
      summary: Clerk Webhook
      tags:
      - webhooks
  /health:
    get:
      description: Health check endpoint.
      operationId: health_check_health_get
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
      summary: Health Check
      tags:
      - Health
