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

# Preview Monitor Draft

> Evaluate an authorized monitor draft against retained telemetry without saving it or creating incidents or notifications. Samples use the live evaluator's rolling window and minimum sample rules. Budget utilization returns its current reset-period measurement. Historical points are sampled sensitivity evidence, not an exhaustive replay of evaluation intervals or notifications.



## OpenAPI

````yaml /openapi.json post /api/monitors/preview
openapi: 3.1.0
info:
  title: Aixy Gateway API
  version: 0.1.0
  description: >-
    Route requests to configured AI providers through OpenAI- and
    Anthropic-compatible APIs. Aixy applies project access, model policies,
    guardrails, routing, budgets, and usage attribution before forwarding
    inference traffic.
servers:
  - url: https://api.aixy-gateway.com
    description: Aixy production gateway
security: []
tags:
  - name: operations
    description: Check process liveness and traffic readiness.
  - name: authentication
    description: Authenticate trusted server-side clients.
  - name: organizations
    description: Manage the organization and its lifecycle.
  - name: projects
    description: Create projects and manage project membership.
  - name: users
    description: Manage organization users, roles, and invitations.
  - name: teams
    description: Manage teams and team membership.
  - name: api-keys
    description: Manage project-scoped gateway API keys.
  - name: provider-credentials
    description: Manage organization and project provider credentials.
  - name: provider-catalog
    description: Discover providers supported by the gateway.
  - name: provider-models
    description: Discover and control models exposed by configured providers.
  - name: routing
    description: Configure stable model aliases, routing strategies, and fallbacks.
  - name: guardrails
    description: Configure prompt and sensitive-data protection policies.
  - name: identity connections
    description: Configure tenant-scoped enterprise identity federation.
  - name: playground
    description: Exercise configured models through the gateway.
  - name: cost-control
    description: Inspect spend and enforce budgets across tenant scopes.
  - name: metrics
    description: Inspect usage, token, latency, and error metrics.
  - name: activity
    description: Diagnose individual model requests and manage opt-in content capture.
  - name: monitors
    description: Configure operational monitors and notification channels.
  - name: audit
    description: Query, verify, and export the organization audit log.
  - name: telemetry exports
    description: Export telemetry to organization-owned destinations.
  - name: billing
    description: Inspect and manage the organization subscription.
  - name: models
    description: List models available to a project-scoped gateway API key.
  - name: inference
    description: Run model inference through the Aixy data plane.
  - name: pricing
    description: Manage versioned pricing attribution rules.
  - name: system
    description: Discover gateway capabilities and providers.
  - name: MCP beta
    description: Mcp beta operations exposed by the gateway.
  - name: cost-optimization
    description: Cost optimization operations exposed by the gateway.
  - name: custom domains
    description: Custom domains operations exposed by the gateway.
  - name: data processing
    description: Data processing operations exposed by the gateway.
  - name: feature flags
    description: Feature flags operations exposed by the gateway.
  - name: privacy
    description: Privacy operations exposed by the gateway.
  - name: roles
    description: Roles operations exposed by the gateway.
paths:
  /api/monitors/preview:
    post:
      tags:
        - monitors
      summary: Preview Monitor Draft
      description: >-
        Evaluate an authorized monitor draft against retained telemetry without
        saving it or creating incidents or notifications. Samples use the live
        evaluator's rolling window and minimum sample rules. Budget utilization
        returns its current reset-period measurement. Historical points are
        sampled sensitivity evidence, not an exhaustive replay of evaluation
        intervals or notifications.
      operationId: preview_monitor_draft
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MonitorPreviewRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonitorPreviewResponse'
        '400':
          description: The request is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayErrorResponse'
        '401':
          description: Authentication is required or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayErrorResponse'
        '403':
          description: The authenticated account cannot perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayErrorResponse'
        '404':
          description: The requested resource does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayErrorResponse'
        '413':
          description: The request body exceeds the endpoint limit.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayErrorResponse'
        '422':
          description: The request is semantically invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayErrorResponse'
        '503':
          description: The control-plane capability is unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayErrorResponse'
        4XX:
          description: The request was rejected by validation or authorization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayErrorResponse'
      security:
        - BrowserSession: []
components:
  schemas:
    MonitorPreviewRequest:
      properties:
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        metric:
          type: string
          enum:
            - budget_utilization
            - error_count
            - error_rate
            - p95_latency
            - success_rate
            - request_count
            - token_count
            - spend_usd
          title: Metric
        operator:
          type: string
          enum:
            - gte
            - lte
          title: Operator
        threshold:
          anyOf:
            - type: number
              maximum: 1000000000
              minimum: 0
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Threshold
        scope:
          type: string
          enum:
            - organization
            - project
            - team
            - user
            - api_key
            - provider
            - model
            - budget
          title: Scope
        target_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Target Id
        target_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Target Name
        window_minutes:
          anyOf:
            - type: integer
              maximum: 10080
              minimum: 1
            - type: 'null'
          title: Window Minutes
        minimum_requests:
          anyOf:
            - type: integer
              maximum: 1000000
              minimum: 0
            - type: 'null'
          title: Minimum Requests
        evaluation_interval_seconds:
          anyOf:
            - type: integer
              maximum: 86400
              minimum: 30
            - type: 'null'
          title: Evaluation Interval Seconds
        cooldown_seconds:
          anyOf:
            - type: integer
              maximum: 604800
              minimum: 60
            - type: 'null'
          title: Cooldown Seconds
        severity:
          anyOf:
            - type: string
              enum:
                - info
                - warning
                - critical
            - type: 'null'
          title: Severity
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Enabled
        channel_ids:
          anyOf:
            - items:
                type: string
              type: array
              maxItems: 100
            - type: 'null'
          title: Channel Ids
        history_minutes:
          type: integer
          maximum: 1440
          minimum: 60
          title: History Minutes
          description: >-
            Span between the first and last sampled evaluation times. Each point
            reads its own preceding observation window. Budget utilization
            returns only its current value.
          default: 360
      additionalProperties: false
      type: object
      required:
        - name
        - metric
        - operator
        - threshold
        - scope
      title: MonitorPreviewRequest
    MonitorPreviewResponse:
      properties:
        object:
          type: string
          const: monitor.preview
          title: Object
          default: monitor.preview
        metric:
          type: string
          enum:
            - budget_utilization
            - error_count
            - error_rate
            - p95_latency
            - success_rate
            - request_count
            - token_count
            - spend_usd
          title: Metric
        window_minutes:
          type: integer
          title: Window Minutes
        starts_at:
          type: string
          title: Starts At
        ends_at:
          type: string
          title: Ends At
        step_seconds:
          type: integer
          minimum: 0
          title: Step Seconds
          description: >-
            Maximum interval between sampled points; zero for a current budget
            snapshot.
        mode:
          type: string
          enum:
            - history
            - current
          title: Mode
        points:
          items:
            $ref: '#/components/schemas/MonitorPreviewPointResponse'
          type: array
          maxItems: 24
          title: Points
      type: object
      required:
        - metric
        - window_minutes
        - starts_at
        - ends_at
        - step_seconds
        - mode
        - points
      title: MonitorPreviewResponse
    GatewayErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/GatewayErrorDetail'
      type: object
      required:
        - error
      title: GatewayErrorResponse
    MonitorPreviewPointResponse:
      properties:
        observed_at:
          type: string
          title: Observed At
        value:
          anyOf:
            - type: string
            - type: 'null'
          title: Value
        sample_count:
          type: integer
          minimum: 0
          title: Sample Count
          description: >-
            Final requests for request health/count signals, measured durations
            for latency, or valid reported consumption records for token, spend,
            and budget signals.
        state:
          type: string
          enum:
            - healthy
            - firing
            - insufficient_data
          title: State
      type: object
      required:
        - observed_at
        - value
        - sample_count
        - state
      title: MonitorPreviewPointResponse
    GatewayErrorDetail:
      properties:
        code:
          type: string
          title: Code
        message:
          type: string
          title: Message
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Details
      type: object
      required:
        - code
        - message
      title: GatewayErrorDetail
  securitySchemes:
    BrowserSession:
      type: apiKey
      description: Secure same-origin browser session cookie.
      in: cookie
      name: gateway_session

````

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