{
  "openapi": "3.1.0",
  "info": {
    "title": "ACAI",
    "description": "Continuous compliance platform for AI inference \u2014 OpenAI-compatible.",
    "version": "0.1.0"
  },
  "paths": {
    "/v1/chat/completions": {
      "post": {
        "summary": "Create Chat Completion",
        "operationId": "create_chat_completion_v1_chat_completions_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatCompletionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatCompletionResponse"
                }
              }
            }
          },
          "404": {
            "description": "Model not found"
          },
          "502": {
            "description": "Backend error"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v1/embeddings": {
      "post": {
        "summary": "Create Embedding",
        "operationId": "create_embedding_v1_embeddings_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmbeddingRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmbeddingResponse"
                }
              }
            }
          },
          "404": {
            "description": "Model not found"
          },
          "502": {
            "description": "Backend error"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v1/audio/transcriptions": {
      "post": {
        "summary": "Create Transcription",
        "operationId": "create_transcription_v1_audio_transcriptions_post",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_create_transcription_v1_audio_transcriptions_post"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TranscriptionResponse"
                }
              }
            }
          },
          "404": {
            "description": "Model not found"
          },
          "502": {
            "description": "Backend error"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v1/models": {
      "get": {
        "summary": "List Models",
        "operationId": "list_models_v1_models_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/app__schemas__models__ModelListResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/api/v1/models": {
      "post": {
        "tags": [
          "models-native"
        ],
        "summary": "Register Model",
        "description": "Register a new model version.\n\nReturns 409 if (name, version) already exists \u2014 versions are\nimmutable, create a new version instead.",
        "operationId": "register_model_api_v1_models_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterModelRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "models-native"
        ],
        "summary": "List Models",
        "description": "List all registered models with optional filters.",
        "operationId": "list_models_api_v1_models_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/ModelStatus"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "architecture",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Architecture"
            }
          },
          {
            "name": "modality",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/Modality"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Modality"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/app__schemas__native__ModelListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/models/{model_id}": {
      "get": {
        "tags": [
          "models-native"
        ],
        "summary": "Get Model",
        "description": "Get a model by ID.",
        "operationId": "get_model_api_v1_models__model_id__get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "model_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Model Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "models-native"
        ],
        "summary": "Update Model",
        "description": "Update model status or engine artifacts (build pipeline callback).\n\nOnly ``status`` and ``engine_artifacts`` are mutable \u2014 all other\nfields are frozen once registered.",
        "operationId": "update_model_api_v1_models__model_id__patch",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "model_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Model Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateModelRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "models-native"
        ],
        "summary": "Delete Model",
        "description": "Deregister a model.  Fails if active deployments exist.",
        "operationId": "delete_model_api_v1_models__model_id__delete",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "model_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Model Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/deployments": {
      "post": {
        "tags": [
          "deployments-native"
        ],
        "summary": "Create Deployment",
        "description": "Create a new deployment for a registered model.\n\nThe deployment starts in ``pending`` status.  The deploy workflow\n(or operator) should PATCH status through provisioning \u2192 running.",
        "operationId": "create_deployment_api_v1_deployments_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDeploymentRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeploymentResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "deployments-native"
        ],
        "summary": "List Deployments",
        "description": "List deployments with optional filters.",
        "operationId": "list_deployments_api_v1_deployments_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/DeploymentStatus"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "model_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Model Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeploymentListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/deployments/{deployment_id}": {
      "get": {
        "tags": [
          "deployments-native"
        ],
        "summary": "Get Deployment",
        "description": "Get deployment details.",
        "operationId": "get_deployment_api_v1_deployments__deployment_id__get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "deployment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Deployment Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeploymentResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "deployments-native"
        ],
        "summary": "Update Deployment",
        "description": "Update deployment scaling config or status.\n\nStatus transitions are used by the deploy workflow to report\nprogress: ``pending \u2192 provisioning \u2192 running`` or ``\u2192 failed``.\n\nWhen status transitions to ``running`` **and** ``endpoint_url`` is\nprovided, the model is added to the inference routing table.",
        "operationId": "update_deployment_api_v1_deployments__deployment_id__patch",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "deployment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Deployment Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDeploymentRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeploymentResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "deployments-native"
        ],
        "summary": "Delete Deployment",
        "description": "Terminate a deployment and remove from routing.",
        "operationId": "delete_deployment_api_v1_deployments__deployment_id__delete",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "deployment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Deployment Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeploymentResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/health": {
      "get": {
        "tags": [
          "system-native"
        ],
        "summary": "Health",
        "description": "Versioned service health \u2014 model counts, deployment counts, uptime.",
        "operationId": "health_api_v1_health_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/api/v1/analytics/availability": {
      "get": {
        "tags": [
          "analytics-native"
        ],
        "summary": "Availability",
        "description": "Rolling availability for 30d, 7d, and 24h windows.",
        "operationId": "availability_api_v1_analytics_availability_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AvailabilityResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/api/v1/analytics/latency": {
      "get": {
        "tags": [
          "analytics-native"
        ],
        "summary": "Latency",
        "description": "Latency percentiles (P50/P95/P99) per model.",
        "operationId": "latency_api_v1_analytics_latency_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "window_hours",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 720,
              "minimum": 1,
              "default": 24,
              "title": "Window Hours"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LatencyResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/analytics/error-budget": {
      "get": {
        "tags": [
          "analytics-native"
        ],
        "summary": "Error Budget",
        "description": "Error budget status for standard SLA tiers.",
        "operationId": "error_budget_api_v1_analytics_error_budget_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "window_days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 90,
              "minimum": 1,
              "default": 30,
              "title": "Window Days"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBudgetResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/analytics/timeseries": {
      "get": {
        "tags": [
          "analytics-native"
        ],
        "summary": "Timeseries",
        "description": "Time-bucketed request metrics for charting.",
        "operationId": "timeseries_api_v1_analytics_timeseries_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "window_hours",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 720,
              "minimum": 1,
              "default": 24,
              "title": "Window Hours"
            }
          },
          {
            "name": "bucket_minutes",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 1440,
              "minimum": 5,
              "default": 60,
              "title": "Bucket Minutes"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeseriesResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/recommendations": {
      "get": {
        "tags": [
          "recommendations-native"
        ],
        "summary": "Get Recommendations",
        "description": "Return usage recommendations for the authenticated user.",
        "operationId": "get_recommendations_api_v1_recommendations_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "window_days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 90,
              "minimum": 1,
              "default": 30,
              "title": "Window Days"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecommendationsResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/routes": {
      "post": {
        "tags": [
          "routes"
        ],
        "summary": "Create Route",
        "description": "Create a new route configuration.",
        "operationId": "create_route_api_v1_routes_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RouteCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RouteConfig"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "routes"
        ],
        "summary": "List Routes",
        "description": "List route configurations, optionally filtered by customer_id.",
        "operationId": "list_routes_api_v1_routes_get",
        "parameters": [
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Customer Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RouteListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/routes/{route_id}": {
      "get": {
        "tags": [
          "routes"
        ],
        "summary": "Get Route",
        "description": "Get a single route configuration by ID.",
        "operationId": "get_route_api_v1_routes__route_id__get",
        "parameters": [
          {
            "name": "route_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Route Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RouteConfig"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "routes"
        ],
        "summary": "Update Route",
        "description": "Partial update of a route configuration.",
        "operationId": "update_route_api_v1_routes__route_id__patch",
        "parameters": [
          {
            "name": "route_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Route Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RouteUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RouteConfig"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "routes"
        ],
        "summary": "Delete Route",
        "description": "Delete a route configuration.",
        "operationId": "delete_route_api_v1_routes__route_id__delete",
        "parameters": [
          {
            "name": "route_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Route Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/routes/evaluate": {
      "post": {
        "tags": [
          "routes"
        ],
        "summary": "Evaluate Route",
        "description": "Dry-run: evaluate routing rules for a request context.\n\nReturns the ``RoutingDecision`` that would be made without executing\nthe actual inference request. Useful for testing route configurations.",
        "operationId": "evaluate_route_api_v1_routes_evaluate_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InferenceContext"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoutingDecision"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/routes/{route_id}/ab-results": {
      "get": {
        "tags": [
          "routes"
        ],
        "summary": "Get Ab Results",
        "description": "Get A/B test results with statistical analysis.",
        "operationId": "get_ab_results_api_v1_routes__route_id__ab_results_get",
        "parameters": [
          {
            "name": "route_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Route Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/budget/status": {
      "get": {
        "tags": [
          "budget"
        ],
        "summary": "Get Budget Status",
        "description": "Get current budget status (spend, remaining, forecast).",
        "operationId": "get_budget_status_api_v1_budget_status_get",
        "parameters": [
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "default",
              "title": "Customer Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/budget/config": {
      "get": {
        "tags": [
          "budget"
        ],
        "summary": "Get Budget Config",
        "description": "Get budget configuration for a customer.",
        "operationId": "get_budget_config_api_v1_budget_config_get",
        "parameters": [
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "default",
              "title": "Customer Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "budget"
        ],
        "summary": "Update Budget Config",
        "description": "Update budget configuration for a customer.",
        "operationId": "update_budget_config_api_v1_budget_config_patch",
        "parameters": [
          {
            "name": "customer_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "default",
              "title": "Customer Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BudgetConfigUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/guardrails/rules": {
      "post": {
        "tags": [
          "guardrails-rules"
        ],
        "summary": "Create Rule",
        "description": "Create a new custom safety rule.",
        "operationId": "create_rule_api_v1_guardrails_rules_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRuleRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuleResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "guardrails-rules"
        ],
        "summary": "List Rules",
        "description": "List custom safety rules for the authenticated customer.",
        "operationId": "list_rules_api_v1_guardrails_rules_get",
        "parameters": [
          {
            "name": "enabled_only",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Enabled Only"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuleListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/guardrails/rules/{rule_id}": {
      "get": {
        "tags": [
          "guardrails-rules"
        ],
        "summary": "Get Rule",
        "description": "Get a specific custom safety rule.",
        "operationId": "get_rule_api_v1_guardrails_rules__rule_id__get",
        "parameters": [
          {
            "name": "rule_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Rule Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuleResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "guardrails-rules"
        ],
        "summary": "Update Rule",
        "description": "Update a custom safety rule.",
        "operationId": "update_rule_api_v1_guardrails_rules__rule_id__patch",
        "parameters": [
          {
            "name": "rule_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Rule Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRuleRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuleResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "guardrails-rules"
        ],
        "summary": "Delete Rule",
        "description": "Delete a custom safety rule.",
        "operationId": "delete_rule_api_v1_guardrails_rules__rule_id__delete",
        "parameters": [
          {
            "name": "rule_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Rule Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/guardrails/rules/test": {
      "post": {
        "tags": [
          "guardrails-rules"
        ],
        "summary": "Test Rule",
        "description": "Dry-run a rule against sample content (rule is NOT persisted).",
        "operationId": "test_rule_api_v1_guardrails_rules_test_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TestRuleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestRuleResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/compliance/exports": {
      "post": {
        "tags": [
          "compliance"
        ],
        "summary": "Create Export",
        "description": "Create a new compliance export job.",
        "operationId": "create_export_api_v1_compliance_exports_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateExportRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "compliance"
        ],
        "summary": "List Exports",
        "description": "List compliance exports for the authenticated user.",
        "operationId": "list_exports_api_v1_compliance_exports_get",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/compliance/exports/{export_id}": {
      "get": {
        "tags": [
          "compliance"
        ],
        "summary": "Get Export",
        "description": "Get status of a specific export.",
        "operationId": "get_export_api_v1_compliance_exports__export_id__get",
        "parameters": [
          {
            "name": "export_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Export Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "compliance"
        ],
        "summary": "Delete Export",
        "description": "Delete a compliance export.",
        "operationId": "delete_export_api_v1_compliance_exports__export_id__delete",
        "parameters": [
          {
            "name": "export_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Export Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/audit/retention": {
      "get": {
        "tags": [
          "compliance"
        ],
        "summary": "Get Retention",
        "description": "Get retention configuration for the authenticated user.",
        "operationId": "get_retention_api_v1_audit_retention_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RetentionResponse"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "compliance"
        ],
        "summary": "Update Retention",
        "description": "Update retention configuration.",
        "operationId": "update_retention_api_v1_audit_retention_patch",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRetentionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RetentionResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/audit/retention/report": {
      "get": {
        "tags": [
          "compliance"
        ],
        "summary": "Get Retention Report",
        "description": "Generate a point-in-time retention compliance report.",
        "operationId": "get_retention_report_api_v1_audit_retention_report_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RetentionReportResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/audit/legal-hold": {
      "get": {
        "tags": [
          "compliance"
        ],
        "summary": "List Legal Holds",
        "description": "List all legal holds for the authenticated user.",
        "operationId": "list_legal_holds_api_v1_audit_legal_hold_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LegalHoldListResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "compliance"
        ],
        "summary": "Create Legal Hold",
        "description": "Create a legal hold on audit records in a date range.",
        "operationId": "create_legal_hold_api_v1_audit_legal_hold_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateLegalHoldRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LegalHoldResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/audit/legal-hold/{hold_id}": {
      "delete": {
        "tags": [
          "compliance"
        ],
        "summary": "Release Legal Hold",
        "description": "Release (deactivate) a legal hold.",
        "operationId": "release_legal_hold_api_v1_audit_legal_hold__hold_id__delete",
        "parameters": [
          {
            "name": "hold_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Hold Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/gateway/backends": {
      "get": {
        "tags": [
          "gateway"
        ],
        "summary": "List Backends",
        "description": "List all registered backends for the authenticated user.",
        "operationId": "list_backends_api_v1_gateway_backends_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      },
      "post": {
        "tags": [
          "gateway"
        ],
        "summary": "Register Backend",
        "description": "Register a new inference backend for gateway routing.",
        "operationId": "register_backend_api_v1_gateway_backends_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterBackendRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/api/v1/gateway/backends/{backend_id}": {
      "patch": {
        "tags": [
          "gateway"
        ],
        "summary": "Update Backend",
        "description": "Update a backend's configuration.",
        "operationId": "update_backend_api_v1_gateway_backends__backend_id__patch",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "backend_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Backend Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateBackendRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "gateway"
        ],
        "summary": "Delete Backend",
        "description": "Remove a backend.",
        "operationId": "delete_backend_api_v1_gateway_backends__backend_id__delete",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "backend_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Backend Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/gateway/policies/templates": {
      "get": {
        "tags": [
          "gateway"
        ],
        "summary": "List Templates",
        "description": "List available compliance policy templates.",
        "operationId": "list_templates_api_v1_gateway_policies_templates_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/api/v1/gateway/policies/apply": {
      "post": {
        "tags": [
          "gateway"
        ],
        "summary": "Apply Template",
        "description": "Apply a compliance template to the authenticated user's account.",
        "operationId": "apply_template_api_v1_gateway_policies_apply_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplyTemplateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/api/v1/gateway/policies/active": {
      "get": {
        "tags": [
          "gateway"
        ],
        "summary": "Get Active Policy",
        "description": "Get the active policy profile for the authenticated user.",
        "operationId": "get_active_policy_api_v1_gateway_policies_active_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      },
      "delete": {
        "tags": [
          "gateway"
        ],
        "summary": "Deactivate Policy",
        "description": "Deactivate the current policy profile.",
        "operationId": "deactivate_policy_api_v1_gateway_policies_active_delete",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/api/v1/gateway/policies": {
      "get": {
        "tags": [
          "gateway"
        ],
        "summary": "List Policies",
        "description": "List all policy profiles (active and historical).",
        "operationId": "list_policies_api_v1_gateway_policies_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/api/v1/gateway/catalog": {
      "get": {
        "tags": [
          "gateway"
        ],
        "summary": "List Catalog",
        "description": "List available managed Foundry models for the given subscription tier.",
        "operationId": "list_catalog_api_v1_gateway_catalog_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tier",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(free|pro|business|enterprise)$",
              "default": "free",
              "title": "Tier"
            }
          },
          {
            "name": "modality",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^(chat|embedding|transcription)$"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Modality"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/gateway/catalog/{model_name}": {
      "get": {
        "tags": [
          "gateway"
        ],
        "summary": "Get Catalog Model",
        "description": "Get details of a specific managed model.",
        "operationId": "get_catalog_model_api_v1_gateway_catalog__model_name__get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "model_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Model Name"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/gateway/reports": {
      "post": {
        "tags": [
          "gateway"
        ],
        "summary": "Generate Report",
        "description": "Generate a compliance evidence report.",
        "operationId": "generate_report_api_v1_gateway_reports_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateReportRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "gateway"
        ],
        "summary": "List Reports",
        "description": "List compliance reports for the authenticated user.",
        "operationId": "list_reports_api_v1_gateway_reports_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 20,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/gateway/reports/{report_id}": {
      "get": {
        "tags": [
          "gateway"
        ],
        "summary": "Get Report",
        "description": "Get a compliance report by ID.",
        "operationId": "get_report_api_v1_gateway_reports__report_id__get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "report_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Report Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/gateway/setup": {
      "get": {
        "tags": [
          "gateway"
        ],
        "summary": "Setup Status",
        "description": "Check onboarding status \u2014 what the user has configured.",
        "operationId": "setup_status_api_v1_gateway_setup_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v1/batches": {
      "post": {
        "tags": [
          "Batch"
        ],
        "summary": "Create Batch",
        "description": "Create a batch inference job (OpenAI-compatible).",
        "operationId": "create_batch_v1_batches_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBatchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Batch"
        ],
        "summary": "List Batches",
        "description": "List batch jobs for the current customer (OpenAI-compatible).",
        "operationId": "list_batches_v1_batches_get",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20,
              "title": "Limit"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "After"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/batches/{batch_id}": {
      "get": {
        "tags": [
          "Batch"
        ],
        "summary": "Get Batch",
        "description": "Get batch job status (OpenAI-compatible).",
        "operationId": "get_batch_v1_batches__batch_id__get",
        "parameters": [
          {
            "name": "batch_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Batch Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/batches/{batch_id}/cancel": {
      "post": {
        "tags": [
          "Batch"
        ],
        "summary": "Cancel Batch",
        "description": "Cancel a batch job (OpenAI-compatible).",
        "operationId": "cancel_batch_v1_batches__batch_id__cancel_post",
        "parameters": [
          {
            "name": "batch_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Batch Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files": {
      "post": {
        "tags": [
          "Files"
        ],
        "summary": "Upload File",
        "description": "Upload a JSONL file for batch processing (OpenAI-compatible).",
        "operationId": "upload_file_v1_files_post",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_upload_file_v1_files_post"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileUploadResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Files"
        ],
        "summary": "List Files",
        "description": "List files for the current customer (OpenAI-compatible).",
        "operationId": "list_files_v1_files_get",
        "parameters": [
          {
            "name": "purpose",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Purpose"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}": {
      "get": {
        "tags": [
          "Files"
        ],
        "summary": "Get File",
        "description": "Get file metadata (OpenAI-compatible).",
        "operationId": "get_file_v1_files__file_id__get",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "File Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileUploadResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/files/{file_id}/content": {
      "get": {
        "tags": [
          "Files"
        ],
        "summary": "Get File Content",
        "description": "Download file content (OpenAI-compatible).",
        "operationId": "get_file_content_v1_files__file_id__content_get",
        "parameters": [
          {
            "name": "file_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "File Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cache/stats": {
      "get": {
        "tags": [
          "Cache Management"
        ],
        "summary": "Get Cache Stats",
        "description": "Get cache hit/miss statistics for the authenticated customer.",
        "operationId": "get_cache_stats_api_v1_cache_stats_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CacheStatsResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/api/v1/cache/config": {
      "get": {
        "tags": [
          "Cache Management"
        ],
        "summary": "Get Cache Config",
        "description": "Get current cache configuration.",
        "operationId": "get_cache_config_api_v1_cache_config_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CacheConfigResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Cache Management"
        ],
        "summary": "Update Cache Config",
        "description": "Update cache configuration dynamically.",
        "operationId": "update_cache_config_api_v1_cache_config_patch",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CacheConfigUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CacheConfigResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/api/v1/cache/entries": {
      "get": {
        "tags": [
          "Cache Management"
        ],
        "summary": "List Cache Entries",
        "description": "List recent cache entries (metadata only, no response bodies).",
        "operationId": "list_cache_entries_api_v1_cache_entries_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CacheEntryListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cache/invalidate": {
      "post": {
        "tags": [
          "Cache Management"
        ],
        "summary": "Invalidate Cache",
        "description": "Invalidate cache entries by model and/or prompt hash.",
        "operationId": "invalidate_cache_api_v1_cache_invalidate_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CacheInvalidateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CacheFlushResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/api/v1/cache/flush": {
      "delete": {
        "tags": [
          "Cache Management"
        ],
        "summary": "Flush Cache",
        "description": "Flush all cache entries for the authenticated customer (optionally filtered by model).",
        "operationId": "flush_cache_api_v1_cache_flush_delete",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "model",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Model"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CacheFlushResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/rag/collections": {
      "post": {
        "tags": [
          "RAG: Collections"
        ],
        "summary": "Create Collection",
        "operationId": "create_collection_api_v1_rag_collections_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CollectionCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CollectionResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "RAG: Collections"
        ],
        "summary": "List Collections",
        "operationId": "list_collections_api_v1_rag_collections_get",
        "parameters": [
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CollectionListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/rag/collections/{collection_id}": {
      "get": {
        "tags": [
          "RAG: Collections"
        ],
        "summary": "Get Collection",
        "operationId": "get_collection_api_v1_rag_collections__collection_id__get",
        "parameters": [
          {
            "name": "collection_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Collection Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CollectionResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "RAG: Collections"
        ],
        "summary": "Update Collection",
        "operationId": "update_collection_api_v1_rag_collections__collection_id__patch",
        "parameters": [
          {
            "name": "collection_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Collection Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CollectionUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CollectionResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "RAG: Collections"
        ],
        "summary": "Delete Collection",
        "operationId": "delete_collection_api_v1_rag_collections__collection_id__delete",
        "parameters": [
          {
            "name": "collection_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Collection Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/rag/collections/{collection_id}/documents": {
      "post": {
        "tags": [
          "RAG: Documents"
        ],
        "summary": "Upload Documents",
        "description": "Upload one or more documents for ingestion into a collection.",
        "operationId": "upload_documents_api_v1_rag_collections__collection_id__documents_post",
        "parameters": [
          {
            "name": "collection_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Collection Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_upload_documents_api_v1_rag_collections__collection_id__documents_post"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentUploadResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "RAG: Documents"
        ],
        "summary": "List Documents",
        "operationId": "list_documents_api_v1_rag_collections__collection_id__documents_get",
        "parameters": [
          {
            "name": "collection_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Collection Id"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/rag/documents/{document_id}": {
      "get": {
        "tags": [
          "RAG: Documents"
        ],
        "summary": "Get Document",
        "operationId": "get_document_api_v1_rag_documents__document_id__get",
        "parameters": [
          {
            "name": "document_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Document Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "RAG: Documents"
        ],
        "summary": "Delete Document",
        "operationId": "delete_document_api_v1_rag_documents__document_id__delete",
        "parameters": [
          {
            "name": "document_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Document Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/rag/search": {
      "post": {
        "tags": [
          "RAG: Search"
        ],
        "summary": "Search",
        "description": "Search for relevant document chunks.\n\nSupports vector, hybrid (RRF), and keyword (BM25) search types.\nOptionally filter by ``collection_ids`` and ``score_threshold``.",
        "operationId": "search_v1_rag_search_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/rag/query": {
      "post": {
        "tags": [
          "RAG: Query"
        ],
        "summary": "Query",
        "description": "Answer a question using RAG \u2014 retrieval + grounded generation.\n\n1. Embed the query\n2. Search for relevant chunks\n3. Build context from top results\n4. Generate answer with LLM (streaming or non-streaming)",
        "operationId": "query_v1_rag_query_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QueryRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/rag/usage": {
      "get": {
        "tags": [
          "RAG: Storage"
        ],
        "summary": "Get Rag Usage",
        "description": "Return current storage usage and tier cap.",
        "operationId": "get_rag_usage_api_v1_rag_usage_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/api/v1/prompts": {
      "post": {
        "tags": [
          "prompts"
        ],
        "summary": "Create Prompt",
        "operationId": "create_prompt_api_v1_prompts_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePromptRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromptResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "prompts"
        ],
        "summary": "List Prompts",
        "operationId": "list_prompts_api_v1_prompts_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tag"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Q"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromptListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/prompts/{slug}": {
      "get": {
        "tags": [
          "prompts"
        ],
        "summary": "Get Prompt",
        "operationId": "get_prompt_api_v1_prompts__slug__get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Slug"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromptResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "prompts"
        ],
        "summary": "Update Prompt",
        "operationId": "update_prompt_api_v1_prompts__slug__patch",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Slug"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePromptRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromptResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "prompts"
        ],
        "summary": "Archive Prompt",
        "operationId": "archive_prompt_api_v1_prompts__slug__delete",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Slug"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromptResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/prompts/{slug}/versions": {
      "post": {
        "tags": [
          "prompts"
        ],
        "summary": "Create Version",
        "operationId": "create_version_api_v1_prompts__slug__versions_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Slug"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateVersionRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "prompts"
        ],
        "summary": "List Versions",
        "operationId": "list_versions_api_v1_prompts__slug__versions_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Slug"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/prompts/{slug}/versions/{version}": {
      "get": {
        "tags": [
          "prompts"
        ],
        "summary": "Get Version",
        "operationId": "get_version_api_v1_prompts__slug__versions__version__get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Slug"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Version"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "prompts"
        ],
        "summary": "Update Version",
        "operationId": "update_version_api_v1_prompts__slug__versions__version__patch",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Slug"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Version"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateVersionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/prompts/{slug}/versions/{version}/publish": {
      "post": {
        "tags": [
          "prompts"
        ],
        "summary": "Publish Version",
        "operationId": "publish_version_api_v1_prompts__slug__versions__version__publish_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Slug"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Version"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/prompts/{slug}/versions/{version}/archive": {
      "post": {
        "tags": [
          "prompts"
        ],
        "summary": "Archive Version",
        "operationId": "archive_version_api_v1_prompts__slug__versions__version__archive_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Slug"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Version"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/prompts/{slug}/diff": {
      "get": {
        "tags": [
          "prompts"
        ],
        "summary": "Diff Prompt Versions",
        "operationId": "diff_prompt_versions_api_v1_prompts__slug__diff_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Slug"
            }
          },
          {
            "name": "v1",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "First version number.",
              "title": "V1"
            },
            "description": "First version number."
          },
          {
            "name": "v2",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Second version number.",
              "title": "V2"
            },
            "description": "Second version number."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiffResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/prompts/{slug}/render": {
      "post": {
        "tags": [
          "prompts"
        ],
        "summary": "Render Prompt",
        "operationId": "render_prompt_api_v1_prompts__slug__render_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Slug"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RenderRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RenderResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/prompts/{slug}/ab-test": {
      "post": {
        "tags": [
          "prompts"
        ],
        "summary": "Create Ab Test",
        "operationId": "create_ab_test_api_v1_prompts__slug__ab_test_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Slug"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateABTestRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ABTestResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "prompts"
        ],
        "summary": "Get Ab Test",
        "operationId": "get_ab_test_api_v1_prompts__slug__ab_test_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Slug"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ABTestResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "prompts"
        ],
        "summary": "Delete Ab Test",
        "operationId": "delete_ab_test_api_v1_prompts__slug__ab_test_delete",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Slug"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ABTestResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/prompts/{slug}/ab-results": {
      "get": {
        "tags": [
          "prompts"
        ],
        "summary": "Get Ab Results",
        "operationId": "get_ab_results_api_v1_prompts__slug__ab_results_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Slug"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ABResultsResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/prompts/{slug}/rate": {
      "post": {
        "tags": [
          "prompts"
        ],
        "summary": "Create Rating",
        "operationId": "create_rating_api_v1_prompts__slug__rate_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Slug"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRatingRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RatingResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ABResultVariant": {
        "properties": {
          "version": {
            "type": "integer",
            "title": "Version"
          },
          "label": {
            "type": "string",
            "title": "Label"
          },
          "request_count": {
            "type": "integer",
            "title": "Request Count",
            "default": 0
          },
          "avg_rating": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avg Rating"
          },
          "rating_count": {
            "type": "integer",
            "title": "Rating Count",
            "default": 0
          }
        },
        "type": "object",
        "required": [
          "version",
          "label"
        ],
        "title": "ABResultVariant",
        "description": "Per-variant aggregated results."
      },
      "ABResultsResponse": {
        "properties": {
          "ab_test_id": {
            "type": "string",
            "title": "Ab Test Id"
          },
          "prompt_slug": {
            "type": "string",
            "title": "Prompt Slug"
          },
          "variants": {
            "items": {
              "$ref": "#/components/schemas/ABResultVariant"
            },
            "type": "array",
            "title": "Variants"
          },
          "total_requests": {
            "type": "integer",
            "title": "Total Requests",
            "default": 0
          }
        },
        "type": "object",
        "required": [
          "ab_test_id",
          "prompt_slug",
          "variants"
        ],
        "title": "ABResultsResponse",
        "description": "GET /api/v1/prompts/{slug}/ab-results response."
      },
      "ABTestConfig-Input": {
        "properties": {
          "experiment_name": {
            "type": "string",
            "title": "Experiment Name"
          },
          "variants": {
            "items": {
              "$ref": "#/components/schemas/app__router__schemas__ABVariant"
            },
            "type": "array",
            "title": "Variants"
          },
          "sticky_sessions": {
            "type": "boolean",
            "title": "Sticky Sessions",
            "description": "If true, same API key always gets same variant.",
            "default": false
          },
          "start_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Start Date",
            "description": "Test start date (ISO 8601). None = active immediately."
          },
          "end_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "End Date",
            "description": "Test end date (ISO 8601). None = no end date."
          },
          "sample_size_target": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Sample Size Target",
            "description": "Target total requests before test concludes."
          }
        },
        "type": "object",
        "required": [
          "experiment_name"
        ],
        "title": "ABTestConfig",
        "description": "A/B test split configuration."
      },
      "ABTestConfig-Output": {
        "properties": {
          "experiment_name": {
            "type": "string",
            "title": "Experiment Name"
          },
          "variants": {
            "items": {
              "$ref": "#/components/schemas/ABVariant-Output"
            },
            "type": "array",
            "title": "Variants"
          },
          "sticky_sessions": {
            "type": "boolean",
            "title": "Sticky Sessions",
            "description": "If true, same API key always gets same variant.",
            "default": false
          },
          "start_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Start Date",
            "description": "Test start date (ISO 8601). None = active immediately."
          },
          "end_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "End Date",
            "description": "Test end date (ISO 8601). None = no end date."
          },
          "sample_size_target": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Sample Size Target",
            "description": "Target total requests before test concludes."
          }
        },
        "type": "object",
        "required": [
          "experiment_name"
        ],
        "title": "ABTestConfig",
        "description": "A/B test split configuration."
      },
      "ABTestResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "prompt_id": {
            "type": "string",
            "title": "Prompt Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "variants": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Variants"
          },
          "sticky": {
            "type": "boolean",
            "title": "Sticky"
          },
          "metrics": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Metrics"
          },
          "status": {
            "$ref": "#/components/schemas/ABTestStatus"
          },
          "start_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Start Date"
          },
          "end_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "End Date"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "prompt_id",
          "name",
          "variants",
          "sticky",
          "metrics",
          "status",
          "start_date",
          "end_date",
          "created_at",
          "updated_at"
        ],
        "title": "ABTestResponse",
        "description": "A/B test configuration."
      },
      "ABTestStatus": {
        "type": "string",
        "enum": [
          "active",
          "paused",
          "completed"
        ],
        "title": "ABTestStatus",
        "description": "A/B test lifecycle status."
      },
      "ABVariant-Output": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "model": {
            "type": "string",
            "title": "Model"
          },
          "weight": {
            "type": "integer",
            "maximum": 100.0,
            "minimum": 0.0,
            "title": "Weight",
            "description": "Traffic percentage (0-100)."
          }
        },
        "type": "object",
        "required": [
          "name",
          "model",
          "weight"
        ],
        "title": "ABVariant",
        "description": "A single A/B test variant."
      },
      "ApplyTemplateRequest": {
        "properties": {
          "template": {
            "type": "string",
            "title": "Template",
            "description": "Template ID: hipaa, soc2, pci_dss, gdpr, ccpa, nist_800_53, ferpa"
          }
        },
        "type": "object",
        "required": [
          "template"
        ],
        "title": "ApplyTemplateRequest"
      },
      "AvailabilityResponse": {
        "properties": {
          "user_id": {
            "type": "string",
            "title": "User Id"
          },
          "windows": {
            "items": {
              "$ref": "#/components/schemas/AvailabilityWindow"
            },
            "type": "array",
            "title": "Windows"
          }
        },
        "type": "object",
        "required": [
          "user_id",
          "windows"
        ],
        "title": "AvailabilityResponse"
      },
      "AvailabilityWindow": {
        "properties": {
          "window": {
            "type": "string",
            "title": "Window",
            "description": "Window label: 30d, 7d, 24h"
          },
          "total_requests": {
            "type": "integer",
            "title": "Total Requests"
          },
          "successful_requests": {
            "type": "integer",
            "title": "Successful Requests"
          },
          "failed_requests": {
            "type": "integer",
            "title": "Failed Requests"
          },
          "availability": {
            "type": "number",
            "title": "Availability",
            "description": "0.0\u20131.0"
          }
        },
        "type": "object",
        "required": [
          "window",
          "total_requests",
          "successful_requests",
          "failed_requests",
          "availability"
        ],
        "title": "AvailabilityWindow"
      },
      "BatchErrorData": {
        "properties": {
          "code": {
            "type": "string",
            "title": "Code"
          },
          "message": {
            "type": "string",
            "title": "Message"
          },
          "param": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Param"
          },
          "line": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Line"
          }
        },
        "type": "object",
        "required": [
          "code",
          "message"
        ],
        "title": "BatchErrorData",
        "description": "A single error within a batch."
      },
      "BatchErrors": {
        "properties": {
          "object": {
            "type": "string",
            "title": "Object",
            "default": "list"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/BatchErrorData"
            },
            "type": "array",
            "title": "Data"
          }
        },
        "type": "object",
        "title": "BatchErrors",
        "description": "Batch-level errors."
      },
      "BatchListResponse": {
        "properties": {
          "object": {
            "type": "string",
            "title": "Object",
            "default": "list"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/BatchResponse"
            },
            "type": "array",
            "title": "Data"
          },
          "first_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "First Id"
          },
          "last_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Id"
          },
          "has_more": {
            "type": "boolean",
            "title": "Has More",
            "default": false
          }
        },
        "type": "object",
        "title": "BatchListResponse",
        "description": "GET /v1/batches \u2014 list batch jobs."
      },
      "BatchResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "object": {
            "type": "string",
            "title": "Object",
            "default": "batch"
          },
          "endpoint": {
            "type": "string",
            "title": "Endpoint"
          },
          "errors": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BatchErrors"
              },
              {
                "type": "null"
              }
            ]
          },
          "input_file_id": {
            "type": "string",
            "title": "Input File Id"
          },
          "completion_window": {
            "type": "string",
            "title": "Completion Window",
            "default": "24h"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "output_file_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Output File Id"
          },
          "error_file_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error File Id"
          },
          "created_at": {
            "type": "integer",
            "title": "Created At"
          },
          "in_progress_at": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "In Progress At"
          },
          "finalizing_at": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finalizing At"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "failed_at": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Failed At"
          },
          "expired_at": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expired At"
          },
          "cancelling_at": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cancelling At"
          },
          "cancelled_at": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cancelled At"
          },
          "request_counts": {
            "$ref": "#/components/schemas/RequestCountsResponse"
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata"
          }
        },
        "type": "object",
        "required": [
          "id",
          "endpoint",
          "input_file_id",
          "status",
          "created_at"
        ],
        "title": "BatchResponse",
        "description": "GET /v1/batches/{batch_id} \u2014 batch job status (OpenAI-compatible)."
      },
      "Body_create_transcription_v1_audio_transcriptions_post": {
        "properties": {
          "file": {
            "type": "string",
            "contentMediaType": "application/octet-stream",
            "title": "File"
          },
          "model": {
            "type": "string",
            "title": "Model"
          },
          "language": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Language"
          },
          "prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prompt"
          },
          "response_format": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Response Format",
            "default": "json"
          },
          "temperature": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Temperature"
          }
        },
        "type": "object",
        "required": [
          "file",
          "model"
        ],
        "title": "Body_create_transcription_v1_audio_transcriptions_post"
      },
      "Body_upload_documents_api_v1_rag_collections__collection_id__documents_post": {
        "properties": {
          "files": {
            "items": {
              "type": "string",
              "contentMediaType": "application/octet-stream"
            },
            "type": "array",
            "title": "Files"
          }
        },
        "type": "object",
        "required": [
          "files"
        ],
        "title": "Body_upload_documents_api_v1_rag_collections__collection_id__documents_post"
      },
      "Body_upload_file_v1_files_post": {
        "properties": {
          "file": {
            "type": "string",
            "contentMediaType": "application/octet-stream",
            "title": "File"
          },
          "purpose": {
            "type": "string",
            "title": "Purpose",
            "default": "batch"
          }
        },
        "type": "object",
        "required": [
          "file"
        ],
        "title": "Body_upload_file_v1_files_post"
      },
      "BudgetAction": {
        "type": "string",
        "enum": [
          "downgrade",
          "block",
          "warn",
          "throttle"
        ],
        "title": "BudgetAction",
        "description": "Action to take when budget threshold is exceeded."
      },
      "BudgetConfigUpdate": {
        "properties": {
          "daily_limit_usd": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Daily Limit Usd"
          },
          "warning_threshold_pct": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 100.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Warning Threshold Pct"
          },
          "action_on_exceed": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BudgetAction"
              },
              {
                "type": "null"
              }
            ]
          },
          "downgrade_model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Downgrade Model"
          },
          "hard_limit_usd": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Hard Limit Usd"
          }
        },
        "type": "object",
        "title": "BudgetConfigUpdate",
        "description": "Partial update for budget configuration."
      },
      "CacheConfigResponse": {
        "properties": {
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "description": "Whether cache is enabled"
          },
          "similarity_threshold": {
            "type": "number",
            "title": "Similarity Threshold",
            "description": "Cosine similarity threshold for hit (0.0-1.0)"
          },
          "default_ttl_seconds": {
            "type": "integer",
            "title": "Default Ttl Seconds",
            "description": "Default TTL for cache entries"
          },
          "max_entries": {
            "type": "integer",
            "title": "Max Entries",
            "description": "Max entries per customer"
          },
          "has_vector_search": {
            "type": "boolean",
            "title": "Has Vector Search",
            "description": "Whether RediSearch vector search is available"
          },
          "per_model_config": {
            "additionalProperties": true,
            "type": "object",
            "title": "Per Model Config",
            "description": "Per-model TTL overrides"
          }
        },
        "type": "object",
        "required": [
          "enabled",
          "similarity_threshold",
          "default_ttl_seconds",
          "max_entries",
          "has_vector_search"
        ],
        "title": "CacheConfigResponse",
        "description": "GET /api/v1/cache/config response."
      },
      "CacheConfigUpdate": {
        "properties": {
          "similarity_threshold": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Similarity Threshold",
            "description": "Cosine similarity threshold for hit"
          },
          "default_ttl_seconds": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 60.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Default Ttl Seconds",
            "description": "Default TTL in seconds (min 60)"
          },
          "max_entries": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 100.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Entries",
            "description": "Max entries per customer (min 100)"
          }
        },
        "type": "object",
        "title": "CacheConfigUpdate",
        "description": "PATCH /api/v1/cache/config request body."
      },
      "CacheEntryListResponse": {
        "properties": {
          "entries": {
            "items": {
              "$ref": "#/components/schemas/CacheEntryResponse"
            },
            "type": "array",
            "title": "Entries"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "default": 0
          }
        },
        "type": "object",
        "required": [
          "entries"
        ],
        "title": "CacheEntryListResponse",
        "description": "GET /api/v1/cache/entries response."
      },
      "CacheEntryResponse": {
        "properties": {
          "key": {
            "type": "string",
            "title": "Key"
          },
          "model": {
            "type": "string",
            "title": "Model",
            "default": ""
          },
          "prompt_hash": {
            "type": "string",
            "title": "Prompt Hash",
            "default": ""
          },
          "created_at": {
            "type": "number",
            "title": "Created At",
            "default": 0.0
          },
          "hit_count": {
            "type": "integer",
            "title": "Hit Count",
            "default": 0
          }
        },
        "type": "object",
        "required": [
          "key"
        ],
        "title": "CacheEntryResponse",
        "description": "Individual cache entry metadata."
      },
      "CacheFlushResponse": {
        "properties": {
          "deleted": {
            "type": "integer",
            "title": "Deleted",
            "description": "Number of entries deleted"
          },
          "scope": {
            "type": "string",
            "title": "Scope",
            "description": "Flush scope (customer / model / entry)"
          }
        },
        "type": "object",
        "required": [
          "deleted",
          "scope"
        ],
        "title": "CacheFlushResponse",
        "description": "Response after cache flush operation."
      },
      "CacheInvalidateRequest": {
        "properties": {
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model",
            "description": "Model to invalidate (all if None)"
          },
          "prompt_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prompt Hash",
            "description": "Specific entry hash to invalidate"
          }
        },
        "type": "object",
        "title": "CacheInvalidateRequest",
        "description": "POST /api/v1/cache/invalidate request body."
      },
      "CacheStatsResponse": {
        "properties": {
          "total_entries": {
            "type": "integer",
            "title": "Total Entries",
            "description": "Number of cached entries for this customer"
          },
          "total_size_bytes": {
            "type": "integer",
            "title": "Total Size Bytes",
            "description": "Approximate total size in bytes",
            "default": 0
          },
          "hit_rate_1h": {
            "type": "number",
            "title": "Hit Rate 1H",
            "description": "Cache hit rate over last hour (0.0-1.0)"
          },
          "hit_rate_24h": {
            "type": "number",
            "title": "Hit Rate 24H",
            "description": "Cache hit rate over last 24 hours (0.0-1.0)"
          },
          "entries_by_model": {
            "additionalProperties": {
              "type": "integer"
            },
            "type": "object",
            "title": "Entries By Model",
            "description": "Entry count per model"
          },
          "avg_similarity_score": {
            "type": "number",
            "title": "Avg Similarity Score",
            "description": "Average similarity score on hits",
            "default": 0.0
          },
          "estimated_savings_tokens": {
            "type": "integer",
            "title": "Estimated Savings Tokens",
            "description": "Estimated tokens saved by cache",
            "default": 0
          },
          "estimated_savings_usd": {
            "type": "number",
            "title": "Estimated Savings Usd",
            "description": "Estimated cost saved by cache",
            "default": 0.0
          },
          "total_hits": {
            "type": "integer",
            "title": "Total Hits",
            "description": "Total cache hits since startup",
            "default": 0
          },
          "total_misses": {
            "type": "integer",
            "title": "Total Misses",
            "description": "Total cache misses since startup",
            "default": 0
          },
          "total_stores": {
            "type": "integer",
            "title": "Total Stores",
            "description": "Total cache stores since startup",
            "default": 0
          },
          "total_errors": {
            "type": "integer",
            "title": "Total Errors",
            "description": "Total cache errors since startup",
            "default": 0
          }
        },
        "type": "object",
        "required": [
          "total_entries",
          "hit_rate_1h",
          "hit_rate_24h",
          "entries_by_model"
        ],
        "title": "CacheStatsResponse",
        "description": "GET /api/v1/cache/stats response."
      },
      "ChatCompletionChoice": {
        "properties": {
          "index": {
            "type": "integer",
            "title": "Index"
          },
          "message": {
            "$ref": "#/components/schemas/ChatMessage"
          },
          "finish_reason": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "stop",
                  "length",
                  "tool_calls",
                  "content_filter"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Finish Reason"
          }
        },
        "type": "object",
        "required": [
          "index",
          "message"
        ],
        "title": "ChatCompletionChoice"
      },
      "ChatCompletionRequest": {
        "properties": {
          "model": {
            "type": "string",
            "title": "Model"
          },
          "messages": {
            "items": {
              "$ref": "#/components/schemas/ChatMessage"
            },
            "type": "array",
            "minItems": 1,
            "title": "Messages"
          },
          "temperature": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 2.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Temperature"
          },
          "top_p": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Top P"
          },
          "n": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "N",
            "default": 1
          },
          "stream": {
            "type": "boolean",
            "title": "Stream",
            "default": false
          },
          "stop": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stop"
          },
          "max_tokens": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Tokens"
          },
          "presence_penalty": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 2.0,
                "minimum": -2.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Presence Penalty"
          },
          "frequency_penalty": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 2.0,
                "minimum": -2.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Frequency Penalty"
          },
          "user": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User"
          },
          "prompt_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prompt Id",
            "description": "Prompt template slug or ID. When set, messages are rendered from the template."
          },
          "prompt_version": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prompt Version",
            "description": "Specific version number. Defaults to current published version."
          },
          "variables": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Variables",
            "description": "Template variable values for rendering (Mustache-style {{var}})."
          },
          "web_search": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Web Search",
            "description": "Enable web search augmentation. Injects web results into context before generation."
          }
        },
        "type": "object",
        "required": [
          "model",
          "messages"
        ],
        "title": "ChatCompletionRequest"
      },
      "ChatCompletionResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "object": {
            "type": "string",
            "const": "chat.completion",
            "title": "Object",
            "default": "chat.completion"
          },
          "created": {
            "type": "integer",
            "title": "Created"
          },
          "model": {
            "type": "string",
            "title": "Model"
          },
          "choices": {
            "items": {
              "$ref": "#/components/schemas/ChatCompletionChoice"
            },
            "type": "array",
            "title": "Choices"
          },
          "usage": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Usage"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "model",
          "choices"
        ],
        "title": "ChatCompletionResponse"
      },
      "ChatMessage": {
        "properties": {
          "role": {
            "type": "string",
            "enum": [
              "system",
              "user",
              "assistant",
              "tool"
            ],
            "title": "Role"
          },
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "tool_call_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Call Id"
          },
          "tool_calls": {
            "anyOf": [
              {
                "items": {},
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tool Calls"
          }
        },
        "type": "object",
        "required": [
          "role"
        ],
        "title": "ChatMessage"
      },
      "CollectionCreate": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Name"
          },
          "description": {
            "type": "string",
            "maxLength": 2000,
            "title": "Description",
            "default": ""
          },
          "chunk_size": {
            "type": "integer",
            "maximum": 8192.0,
            "minimum": 64.0,
            "title": "Chunk Size",
            "default": 512
          },
          "chunk_overlap": {
            "type": "integer",
            "maximum": 2048.0,
            "minimum": 0.0,
            "title": "Chunk Overlap",
            "default": 50
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "CollectionCreate"
      },
      "CollectionListResponse": {
        "properties": {
          "collections": {
            "items": {
              "$ref": "#/components/schemas/CollectionResponse"
            },
            "type": "array",
            "title": "Collections"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          }
        },
        "type": "object",
        "required": [
          "collections",
          "total"
        ],
        "title": "CollectionListResponse"
      },
      "CollectionResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "chunk_size": {
            "type": "integer",
            "title": "Chunk Size"
          },
          "chunk_overlap": {
            "type": "integer",
            "title": "Chunk Overlap"
          },
          "document_count": {
            "type": "integer",
            "title": "Document Count",
            "default": 0
          },
          "total_size_bytes": {
            "type": "integer",
            "title": "Total Size Bytes",
            "default": 0
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "description",
          "chunk_size",
          "chunk_overlap",
          "created_at",
          "updated_at"
        ],
        "title": "CollectionResponse"
      },
      "CollectionUpdate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          }
        },
        "type": "object",
        "title": "CollectionUpdate"
      },
      "CostBudget": {
        "properties": {
          "daily_limit_usd": {
            "type": "number",
            "exclusiveMinimum": 0.0,
            "title": "Daily Limit Usd",
            "description": "Max daily spend in USD."
          },
          "warning_threshold_pct": {
            "type": "integer",
            "maximum": 100.0,
            "minimum": 0.0,
            "title": "Warning Threshold Pct",
            "description": "Percentage of daily limit that triggers a warning.",
            "default": 80
          },
          "action_on_exceed": {
            "$ref": "#/components/schemas/BudgetAction",
            "description": "Action when daily limit exceeded.",
            "default": "downgrade"
          },
          "downgrade_model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Downgrade Model",
            "description": "Model to downgrade to (required if action is 'downgrade')."
          },
          "hard_limit_usd": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Hard Limit Usd",
            "description": "Absolute hard limit in USD. Always blocks regardless of action."
          },
          "hard_limit_action": {
            "$ref": "#/components/schemas/BudgetAction",
            "description": "Action when hard limit exceeded (always block).",
            "default": "block"
          }
        },
        "type": "object",
        "required": [
          "daily_limit_usd"
        ],
        "title": "CostBudget",
        "description": "Cost control configuration for a route."
      },
      "CreateABTestRequest": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 256,
            "minLength": 1,
            "title": "Name",
            "description": "Test name."
          },
          "variants": {
            "items": {
              "$ref": "#/components/schemas/app__prompts__schemas__ABVariant"
            },
            "type": "array",
            "minItems": 2,
            "title": "Variants",
            "description": "At least 2 variants."
          },
          "sticky_sessions": {
            "type": "boolean",
            "title": "Sticky Sessions",
            "description": "Same key \u2192 same variant.",
            "default": true
          },
          "metrics_to_track": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Metrics To Track",
            "description": "Metrics to record."
          },
          "start_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Start Date",
            "description": "ISO 8601 start date."
          },
          "end_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "End Date",
            "description": "ISO 8601 end date."
          }
        },
        "type": "object",
        "required": [
          "name",
          "variants"
        ],
        "title": "CreateABTestRequest",
        "description": "POST /api/v1/prompts/{slug}/ab-test"
      },
      "CreateBatchRequest": {
        "properties": {
          "input_file_id": {
            "type": "string",
            "title": "Input File Id",
            "description": "ID of the uploaded JSONL input file."
          },
          "endpoint": {
            "type": "string",
            "title": "Endpoint",
            "description": "The endpoint to use (e.g. /v1/chat/completions, /v1/embeddings)."
          },
          "completion_window": {
            "type": "string",
            "title": "Completion Window",
            "description": "Time window for batch completion.",
            "default": "24h"
          },
          "metadata": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata",
            "description": "Optional metadata key-value pairs."
          }
        },
        "type": "object",
        "required": [
          "input_file_id",
          "endpoint"
        ],
        "title": "CreateBatchRequest",
        "description": "POST /v1/batches \u2014 create a batch job."
      },
      "CreateDeploymentRequest": {
        "properties": {
          "model_id": {
            "type": "string",
            "title": "Model Id",
            "description": "ID of the model to deploy."
          },
          "scaling_tier": {
            "$ref": "#/components/schemas/ScalingTier",
            "description": "Autoscaling tier.",
            "default": "always-warm"
          },
          "min_replicas": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Min Replicas",
            "description": "Minimum replicas (0 for scale-to-zero).",
            "default": 1
          },
          "max_replicas": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Max Replicas",
            "description": "Maximum replicas.",
            "default": 4
          },
          "target_concurrency": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Target Concurrency",
            "description": "Target in-flight requests per replica.",
            "default": 8
          }
        },
        "type": "object",
        "required": [
          "model_id"
        ],
        "title": "CreateDeploymentRequest",
        "description": "POST /api/v1/deployments \u2014 create a new deployment."
      },
      "CreateExportRequest": {
        "properties": {
          "format": {
            "type": "string",
            "title": "Format",
            "description": "Report format: hipaa | soc2 | pci_dss | gdpr | ccpa | nist_800_53 | ferpa | custom | raw."
          },
          "date_range": {
            "$ref": "#/components/schemas/DateRange"
          },
          "include_content": {
            "type": "boolean",
            "title": "Include Content",
            "description": "Include request/response bodies (raw/custom only).",
            "default": false
          },
          "output_format": {
            "type": "string",
            "title": "Output Format",
            "description": "Output file format: csv | json.",
            "default": "csv"
          },
          "filters": {
            "$ref": "#/components/schemas/ExportFilters"
          },
          "custom_fields": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Custom Fields",
            "description": "Field names to include (custom format only)."
          }
        },
        "type": "object",
        "required": [
          "format",
          "date_range"
        ],
        "title": "CreateExportRequest",
        "description": "POST /api/v1/compliance/exports"
      },
      "CreateLegalHoldRequest": {
        "properties": {
          "reason": {
            "type": "string",
            "title": "Reason",
            "description": "Reason for the legal hold (e.g., litigation, regulatory investigation)."
          },
          "date_range": {
            "$ref": "#/components/schemas/DateRange",
            "description": "Date range of audit records to hold."
          },
          "reference": {
            "type": "string",
            "title": "Reference",
            "description": "External reference (case number, ticket ID).",
            "default": ""
          }
        },
        "type": "object",
        "required": [
          "reason",
          "date_range"
        ],
        "title": "CreateLegalHoldRequest",
        "description": "POST /api/v1/audit/legal-hold"
      },
      "CreatePromptRequest": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 256,
            "minLength": 1,
            "title": "Name",
            "description": "Human-readable prompt name."
          },
          "slug": {
            "type": "string",
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[a-z0-9][a-z0-9-]*[a-z0-9]$|^[a-z0-9]$",
            "title": "Slug",
            "description": "URL-safe slug (lowercase alphanumeric + hyphens)."
          },
          "description": {
            "type": "string",
            "maxLength": 1024,
            "title": "Description",
            "description": "Optional description.",
            "default": ""
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Tags",
            "description": "Tags for organization."
          }
        },
        "type": "object",
        "required": [
          "name",
          "slug"
        ],
        "title": "CreatePromptRequest",
        "description": "POST /api/v1/prompts"
      },
      "CreateRatingRequest": {
        "properties": {
          "request_id": {
            "type": "string",
            "minLength": 1,
            "title": "Request Id",
            "description": "Request ID to rate."
          },
          "rating": {
            "type": "integer",
            "maximum": 5.0,
            "minimum": 1.0,
            "title": "Rating",
            "description": "Quality rating (1-5)."
          },
          "feedback": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2048
              },
              {
                "type": "null"
              }
            ],
            "title": "Feedback",
            "description": "Optional text feedback."
          }
        },
        "type": "object",
        "required": [
          "request_id",
          "rating"
        ],
        "title": "CreateRatingRequest",
        "description": "POST /api/v1/prompts/{slug}/rate"
      },
      "CreateRuleRequest": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Human-readable rule name."
          },
          "type": {
            "type": "string",
            "title": "Type",
            "description": "Rule type: blocklist | topic_restriction | regex_filter | output_constraint | token_limit."
          },
          "action": {
            "type": "string",
            "title": "Action",
            "description": "Action: block | flag | warn.",
            "default": "block"
          },
          "config": {
            "additionalProperties": true,
            "type": "object",
            "title": "Config",
            "description": "Type-specific configuration."
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "default": true
          },
          "priority": {
            "type": "integer",
            "maximum": 10000.0,
            "minimum": 0.0,
            "title": "Priority",
            "default": 100
          }
        },
        "type": "object",
        "required": [
          "name",
          "type"
        ],
        "title": "CreateRuleRequest",
        "description": "POST /api/v1/guardrails/rules"
      },
      "CreateVersionRequest": {
        "properties": {
          "messages": {
            "items": {
              "$ref": "#/components/schemas/MessageItem"
            },
            "type": "array",
            "minItems": 1,
            "title": "Messages",
            "description": "Template messages."
          },
          "variables": {
            "additionalProperties": {
              "$ref": "#/components/schemas/VariableSchema"
            },
            "type": "object",
            "title": "Variables",
            "description": "Variable schema definitions."
          },
          "model_config": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ModelConfig"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional model config."
          },
          "changelog": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1024
              },
              {
                "type": "null"
              }
            ],
            "title": "Changelog",
            "description": "Change description."
          }
        },
        "type": "object",
        "required": [
          "messages"
        ],
        "title": "CreateVersionRequest",
        "description": "POST /api/v1/prompts/{slug}/versions"
      },
      "DateRange": {
        "properties": {
          "start": {
            "type": "string",
            "format": "date-time",
            "title": "Start"
          },
          "end": {
            "type": "string",
            "format": "date-time",
            "title": "End"
          }
        },
        "type": "object",
        "required": [
          "start",
          "end"
        ],
        "title": "DateRange"
      },
      "DeploymentListResponse": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/DeploymentResponse"
            },
            "type": "array",
            "title": "Data"
          },
          "count": {
            "type": "integer",
            "title": "Count"
          }
        },
        "type": "object",
        "required": [
          "data",
          "count"
        ],
        "title": "DeploymentListResponse",
        "description": "GET /api/v1/deployments response."
      },
      "DeploymentResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "model_id": {
            "type": "string",
            "title": "Model Id"
          },
          "scaling_tier": {
            "type": "string",
            "title": "Scaling Tier"
          },
          "min_replicas": {
            "type": "integer",
            "title": "Min Replicas"
          },
          "max_replicas": {
            "type": "integer",
            "title": "Max Replicas"
          },
          "target_concurrency": {
            "type": "integer",
            "title": "Target Concurrency"
          },
          "status": {
            "$ref": "#/components/schemas/DeploymentStatus"
          },
          "endpoint_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Endpoint Url"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "title": "Updated At"
          },
          "status_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status Url",
            "description": "Pollable URL for tracking deployment status."
          }
        },
        "type": "object",
        "required": [
          "id",
          "model_id",
          "scaling_tier",
          "min_replicas",
          "max_replicas",
          "target_concurrency",
          "status",
          "endpoint_url",
          "created_at",
          "updated_at"
        ],
        "title": "DeploymentResponse",
        "description": "Deployment record returned by all deployment endpoints."
      },
      "DeploymentStatus": {
        "type": "string",
        "enum": [
          "pending",
          "provisioning",
          "running",
          "failed",
          "terminated"
        ],
        "title": "DeploymentStatus",
        "description": "Deployment lifecycle status."
      },
      "DiffResponse": {
        "properties": {
          "version_from": {
            "type": "integer",
            "title": "Version From"
          },
          "version_to": {
            "type": "integer",
            "title": "Version To"
          },
          "messages": {
            "additionalProperties": true,
            "type": "object",
            "title": "Messages"
          },
          "variables": {
            "additionalProperties": true,
            "type": "object",
            "title": "Variables"
          },
          "model_config": {
            "additionalProperties": true,
            "type": "object",
            "title": "Model Config"
          }
        },
        "type": "object",
        "required": [
          "version_from",
          "version_to",
          "messages",
          "variables"
        ],
        "title": "DiffResponse",
        "description": "GET /api/v1/prompts/{slug}/diff response."
      },
      "DocumentListResponse": {
        "properties": {
          "documents": {
            "items": {
              "$ref": "#/components/schemas/DocumentResponse"
            },
            "type": "array",
            "title": "Documents"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          }
        },
        "type": "object",
        "required": [
          "documents",
          "total"
        ],
        "title": "DocumentListResponse"
      },
      "DocumentResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "collection_id": {
            "type": "string",
            "title": "Collection Id"
          },
          "filename": {
            "type": "string",
            "title": "Filename"
          },
          "content_type": {
            "type": "string",
            "title": "Content Type"
          },
          "file_size_bytes": {
            "type": "integer",
            "title": "File Size Bytes"
          },
          "chunk_count": {
            "type": "integer",
            "title": "Chunk Count",
            "default": 0
          },
          "status": {
            "$ref": "#/components/schemas/DocumentStatus"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          },
          "processed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Processed At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "collection_id",
          "filename",
          "content_type",
          "file_size_bytes",
          "status",
          "created_at"
        ],
        "title": "DocumentResponse"
      },
      "DocumentStatus": {
        "type": "string",
        "enum": [
          "pending",
          "processing",
          "completed",
          "failed"
        ],
        "title": "DocumentStatus"
      },
      "DocumentUploadResponse": {
        "properties": {
          "documents": {
            "items": {
              "$ref": "#/components/schemas/DocumentResponse"
            },
            "type": "array",
            "title": "Documents"
          },
          "message": {
            "type": "string",
            "title": "Message",
            "default": "Documents accepted for processing."
          }
        },
        "type": "object",
        "required": [
          "documents"
        ],
        "title": "DocumentUploadResponse"
      },
      "EmbeddingData": {
        "properties": {
          "object": {
            "type": "string",
            "const": "embedding",
            "title": "Object",
            "default": "embedding"
          },
          "index": {
            "type": "integer",
            "title": "Index"
          },
          "embedding": {
            "items": {
              "type": "number"
            },
            "type": "array",
            "title": "Embedding"
          }
        },
        "type": "object",
        "required": [
          "index",
          "embedding"
        ],
        "title": "EmbeddingData"
      },
      "EmbeddingRequest": {
        "properties": {
          "model": {
            "type": "string",
            "title": "Model"
          },
          "input": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              }
            ],
            "title": "Input"
          },
          "encoding_format": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "float",
                  "base64"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Encoding Format",
            "default": "float"
          },
          "dimensions": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dimensions"
          },
          "user": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User"
          }
        },
        "type": "object",
        "required": [
          "model",
          "input"
        ],
        "title": "EmbeddingRequest"
      },
      "EmbeddingResponse": {
        "properties": {
          "object": {
            "type": "string",
            "const": "list",
            "title": "Object",
            "default": "list"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/EmbeddingData"
            },
            "type": "array",
            "title": "Data"
          },
          "model": {
            "type": "string",
            "title": "Model"
          },
          "usage": {
            "$ref": "#/components/schemas/EmbeddingUsage"
          }
        },
        "type": "object",
        "required": [
          "data",
          "model",
          "usage"
        ],
        "title": "EmbeddingResponse"
      },
      "EmbeddingUsage": {
        "properties": {
          "prompt_tokens": {
            "type": "integer",
            "title": "Prompt Tokens"
          },
          "total_tokens": {
            "type": "integer",
            "title": "Total Tokens"
          }
        },
        "type": "object",
        "required": [
          "prompt_tokens",
          "total_tokens"
        ],
        "title": "EmbeddingUsage"
      },
      "ErrorBudgetResponse": {
        "properties": {
          "user_id": {
            "type": "string",
            "title": "User Id"
          },
          "window_days": {
            "type": "integer",
            "title": "Window Days"
          },
          "total_requests": {
            "type": "integer",
            "title": "Total Requests"
          },
          "tiers": {
            "items": {
              "$ref": "#/components/schemas/ErrorBudgetTier"
            },
            "type": "array",
            "title": "Tiers"
          }
        },
        "type": "object",
        "required": [
          "user_id",
          "window_days",
          "total_requests",
          "tiers"
        ],
        "title": "ErrorBudgetResponse"
      },
      "ErrorBudgetTier": {
        "properties": {
          "sla_target": {
            "type": "number",
            "title": "Sla Target",
            "description": "e.g. 0.999 for 99.9%"
          },
          "sla_label": {
            "type": "string",
            "title": "Sla Label",
            "description": "e.g. '99.9%'"
          },
          "allowed_errors": {
            "type": "number",
            "title": "Allowed Errors"
          },
          "actual_errors": {
            "type": "integer",
            "title": "Actual Errors"
          },
          "budget_remaining": {
            "type": "number",
            "title": "Budget Remaining",
            "description": "0.0\u20131.0, fraction remaining"
          },
          "burn_rate_1h": {
            "type": "number",
            "title": "Burn Rate 1H",
            "description": "Multiplier: 1.0 = on track, >1.0 = burning fast"
          }
        },
        "type": "object",
        "required": [
          "sla_target",
          "sla_label",
          "allowed_errors",
          "actual_errors",
          "budget_remaining",
          "burn_rate_1h"
        ],
        "title": "ErrorBudgetTier"
      },
      "ExportFilters": {
        "properties": {
          "models": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Models",
            "description": "Filter by model name(s)."
          },
          "modalities": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Modalities",
            "description": "Filter by modality (chat/embedding/transcription)."
          },
          "status_codes": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Status Codes",
            "description": "Filter by HTTP status code(s)."
          }
        },
        "type": "object",
        "title": "ExportFilters"
      },
      "ExportListResponse": {
        "properties": {
          "exports": {
            "items": {
              "$ref": "#/components/schemas/ExportResponse"
            },
            "type": "array",
            "title": "Exports"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          }
        },
        "type": "object",
        "required": [
          "exports",
          "total"
        ],
        "title": "ExportListResponse"
      },
      "ExportResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "user_id": {
            "type": "string",
            "title": "User Id"
          },
          "format": {
            "type": "string",
            "title": "Format"
          },
          "output_format": {
            "type": "string",
            "title": "Output Format"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "date_range": {
            "$ref": "#/components/schemas/DateRange"
          },
          "filters": {
            "$ref": "#/components/schemas/ExportFilters"
          },
          "record_count": {
            "type": "integer",
            "title": "Record Count",
            "default": 0
          },
          "file_size_bytes": {
            "type": "integer",
            "title": "File Size Bytes",
            "default": 0
          },
          "download_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Download Url"
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "user_id",
          "format",
          "output_format",
          "status",
          "date_range",
          "filters",
          "created_at"
        ],
        "title": "ExportResponse",
        "description": "Single export record."
      },
      "FileListResponse": {
        "properties": {
          "object": {
            "type": "string",
            "title": "Object",
            "default": "list"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/FileUploadResponse"
            },
            "type": "array",
            "title": "Data"
          }
        },
        "type": "object",
        "title": "FileListResponse",
        "description": "GET /v1/files response."
      },
      "FileUploadResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "object": {
            "type": "string",
            "title": "Object",
            "default": "file"
          },
          "bytes": {
            "type": "integer",
            "title": "Bytes",
            "default": 0
          },
          "created_at": {
            "type": "integer",
            "title": "Created At"
          },
          "filename": {
            "type": "string",
            "title": "Filename"
          },
          "purpose": {
            "type": "string",
            "title": "Purpose"
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "filename",
          "purpose"
        ],
        "title": "FileUploadResponse",
        "description": "POST /v1/files response."
      },
      "GenerateReportRequest": {
        "properties": {
          "framework": {
            "type": "string",
            "pattern": "^(hipaa|soc2|pci_dss|gdpr|ccpa|nist_800_53|ferpa)$",
            "title": "Framework",
            "description": "Compliance framework"
          },
          "period_start": {
            "type": "string",
            "format": "date-time",
            "title": "Period Start",
            "description": "Report period start (ISO 8601)"
          },
          "period_end": {
            "type": "string",
            "format": "date-time",
            "title": "Period End",
            "description": "Report period end (ISO 8601)"
          }
        },
        "type": "object",
        "required": [
          "framework",
          "period_start",
          "period_end"
        ],
        "title": "GenerateReportRequest"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "HealthResponse": {
        "properties": {
          "status": {
            "type": "string",
            "title": "Status",
            "description": "'healthy' or 'degraded'."
          },
          "version": {
            "type": "string",
            "title": "Version",
            "description": "API server version string."
          },
          "uptime_seconds": {
            "type": "number",
            "title": "Uptime Seconds",
            "description": "Seconds since startup."
          },
          "models_registered": {
            "type": "integer",
            "title": "Models Registered",
            "description": "Total models in registry (native API)."
          },
          "models_routable": {
            "type": "integer",
            "title": "Models Routable",
            "description": "Models available for inference."
          },
          "deployments_total": {
            "type": "integer",
            "title": "Deployments Total",
            "description": "All deployments (any status)."
          },
          "deployments_running": {
            "type": "integer",
            "title": "Deployments Running",
            "description": "Deployments in 'running' status."
          },
          "backends": {
            "additionalProperties": true,
            "type": "object",
            "title": "Backends",
            "description": "Backend health summary from health monitor."
          }
        },
        "type": "object",
        "required": [
          "status",
          "version",
          "uptime_seconds",
          "models_registered",
          "models_routable",
          "deployments_total",
          "deployments_running"
        ],
        "title": "HealthResponse",
        "description": "GET /api/v1/health \u2014 service health snapshot."
      },
      "InferenceContext": {
        "properties": {
          "endpoint": {
            "type": "string",
            "title": "Endpoint"
          },
          "model_requested": {
            "type": "string",
            "title": "Model Requested"
          },
          "token_count_estimate": {
            "type": "integer",
            "title": "Token Count Estimate",
            "default": 0
          },
          "message_count": {
            "type": "integer",
            "title": "Message Count",
            "default": 0
          },
          "headers": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Headers"
          },
          "customer_id": {
            "type": "string",
            "title": "Customer Id",
            "default": "default"
          },
          "api_key_id": {
            "type": "string",
            "title": "Api Key Id",
            "description": "API key identifier for sticky A/B sessions.",
            "default": ""
          }
        },
        "type": "object",
        "required": [
          "endpoint",
          "model_requested"
        ],
        "title": "InferenceContext",
        "description": "Request context used by routing strategies to make decisions."
      },
      "LatencyPercentiles": {
        "properties": {
          "model": {
            "type": "string",
            "title": "Model"
          },
          "modality": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Modality"
          },
          "p50_ms": {
            "type": "number",
            "title": "P50 Ms"
          },
          "p95_ms": {
            "type": "number",
            "title": "P95 Ms"
          },
          "p99_ms": {
            "type": "number",
            "title": "P99 Ms"
          },
          "request_count": {
            "type": "integer",
            "title": "Request Count"
          }
        },
        "type": "object",
        "required": [
          "model",
          "p50_ms",
          "p95_ms",
          "p99_ms",
          "request_count"
        ],
        "title": "LatencyPercentiles"
      },
      "LatencyResponse": {
        "properties": {
          "user_id": {
            "type": "string",
            "title": "User Id"
          },
          "window_hours": {
            "type": "integer",
            "title": "Window Hours"
          },
          "models": {
            "items": {
              "$ref": "#/components/schemas/LatencyPercentiles"
            },
            "type": "array",
            "title": "Models"
          }
        },
        "type": "object",
        "required": [
          "user_id",
          "window_hours",
          "models"
        ],
        "title": "LatencyResponse"
      },
      "LegalHoldListResponse": {
        "properties": {
          "holds": {
            "items": {
              "$ref": "#/components/schemas/LegalHoldResponse"
            },
            "type": "array",
            "title": "Holds"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          }
        },
        "type": "object",
        "required": [
          "holds",
          "total"
        ],
        "title": "LegalHoldListResponse"
      },
      "LegalHoldResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "user_id": {
            "type": "string",
            "title": "User Id"
          },
          "reason": {
            "type": "string",
            "title": "Reason"
          },
          "reference": {
            "type": "string",
            "title": "Reference"
          },
          "date_range": {
            "$ref": "#/components/schemas/DateRange"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          },
          "released_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Released At"
          },
          "active": {
            "type": "boolean",
            "title": "Active",
            "default": true
          }
        },
        "type": "object",
        "required": [
          "id",
          "user_id",
          "reason",
          "reference",
          "date_range",
          "created_at"
        ],
        "title": "LegalHoldResponse"
      },
      "MatchConfig": {
        "properties": {
          "endpoint": {
            "type": "string",
            "title": "Endpoint",
            "description": "Request path to match (exact).",
            "default": "/v1/chat/completions"
          },
          "models": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Models",
            "description": "Model names/globs to match. ['*'] matches all."
          },
          "headers": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Headers",
            "description": "Required request headers (key=value)."
          }
        },
        "type": "object",
        "title": "MatchConfig",
        "description": "Conditions that determine whether a route applies to a request."
      },
      "MessageItem": {
        "properties": {
          "role": {
            "type": "string",
            "title": "Role",
            "description": "Message role (system, user, assistant, function)."
          },
          "content": {
            "type": "string",
            "title": "Content",
            "description": "Message content with {{variable}} placeholders."
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "Optional name for function messages."
          }
        },
        "type": "object",
        "required": [
          "role",
          "content"
        ],
        "title": "MessageItem",
        "description": "A single message in the prompt template."
      },
      "Modality": {
        "type": "string",
        "enum": [
          "chat",
          "embedding",
          "transcription"
        ],
        "title": "Modality",
        "description": "Inference modality."
      },
      "ModelConfig": {
        "properties": {
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model",
            "description": "Model name/alias."
          },
          "temperature": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 2.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Temperature"
          },
          "max_tokens": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Tokens"
          },
          "top_p": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Top P"
          },
          "frequency_penalty": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 2.0,
                "minimum": -2.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Frequency Penalty"
          },
          "presence_penalty": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 2.0,
                "minimum": -2.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Presence Penalty"
          },
          "stop": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stop"
          }
        },
        "type": "object",
        "title": "ModelConfig",
        "description": "Optional model configuration per version."
      },
      "ModelObject": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "object": {
            "type": "string",
            "const": "model",
            "title": "Object",
            "default": "model"
          },
          "created": {
            "type": "integer",
            "title": "Created"
          },
          "owned_by": {
            "type": "string",
            "title": "Owned By"
          }
        },
        "type": "object",
        "required": [
          "id",
          "owned_by"
        ],
        "title": "ModelObject"
      },
      "ModelResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "version": {
            "type": "string",
            "title": "Version"
          },
          "architecture": {
            "type": "string",
            "title": "Architecture"
          },
          "parameter_count": {
            "type": "integer",
            "title": "Parameter Count"
          },
          "quantization": {
            "type": "string",
            "title": "Quantization"
          },
          "format": {
            "type": "string",
            "title": "Format"
          },
          "modality": {
            "type": "string",
            "title": "Modality"
          },
          "weight_uri": {
            "type": "string",
            "title": "Weight Uri"
          },
          "required_gpu_sku": {
            "type": "string",
            "title": "Required Gpu Sku"
          },
          "tp_degree": {
            "type": "integer",
            "title": "Tp Degree"
          },
          "status": {
            "$ref": "#/components/schemas/ModelStatus"
          },
          "engine_artifacts": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Engine Artifacts"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "version",
          "architecture",
          "parameter_count",
          "quantization",
          "format",
          "modality",
          "weight_uri",
          "required_gpu_sku",
          "tp_degree",
          "status",
          "engine_artifacts",
          "created_at",
          "updated_at"
        ],
        "title": "ModelResponse",
        "description": "Model record returned by all model endpoints."
      },
      "ModelStatus": {
        "type": "string",
        "enum": [
          "registered",
          "building",
          "ready",
          "deployed",
          "failed",
          "archived"
        ],
        "title": "ModelStatus",
        "description": "Model lifecycle status."
      },
      "PromptListResponse": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/PromptResponse"
            },
            "type": "array",
            "title": "Data"
          },
          "count": {
            "type": "integer",
            "title": "Count"
          }
        },
        "type": "object",
        "required": [
          "data",
          "count"
        ],
        "title": "PromptListResponse",
        "description": "GET /api/v1/prompts response."
      },
      "PromptResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "customer_id": {
            "type": "string",
            "title": "Customer Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "slug": {
            "type": "string",
            "title": "Slug"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "current_version": {
            "type": "integer",
            "title": "Current Version"
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Tags"
          },
          "archived": {
            "type": "boolean",
            "title": "Archived"
          },
          "use_count": {
            "type": "integer",
            "title": "Use Count",
            "default": 0
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "customer_id",
          "name",
          "slug",
          "description",
          "current_version",
          "tags",
          "archived",
          "created_at",
          "updated_at"
        ],
        "title": "PromptResponse",
        "description": "Prompt template record."
      },
      "QueryRequest": {
        "properties": {
          "query": {
            "type": "string",
            "maxLength": 10000,
            "minLength": 1,
            "title": "Query"
          },
          "collection_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Collection Ids"
          },
          "model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "search_type": {
            "$ref": "#/components/schemas/SearchType",
            "default": "hybrid"
          },
          "top_k": {
            "type": "integer",
            "maximum": 20.0,
            "minimum": 1.0,
            "title": "Top K",
            "default": 5
          },
          "stream": {
            "type": "boolean",
            "title": "Stream",
            "default": false
          },
          "include_sources": {
            "type": "boolean",
            "title": "Include Sources",
            "default": true
          },
          "system_prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "System Prompt"
          },
          "temperature": {
            "type": "number",
            "maximum": 2.0,
            "minimum": 0.0,
            "title": "Temperature",
            "default": 0.3
          },
          "max_tokens": {
            "type": "integer",
            "maximum": 32768.0,
            "minimum": 1.0,
            "title": "Max Tokens",
            "default": 1024
          },
          "web_search": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "$ref": "#/components/schemas/WebSearchOptions"
              },
              {
                "type": "null"
              }
            ],
            "title": "Web Search",
            "description": "Enable web search augmentation. Pass true for defaults or WebSearchOptions to customize."
          }
        },
        "type": "object",
        "required": [
          "query"
        ],
        "title": "QueryRequest"
      },
      "RatingResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "prompt_id": {
            "type": "string",
            "title": "Prompt Id"
          },
          "version": {
            "type": "integer",
            "title": "Version"
          },
          "request_id": {
            "type": "string",
            "title": "Request Id"
          },
          "ab_test_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ab Test Id"
          },
          "variant_idx": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Variant Idx"
          },
          "rating": {
            "type": "integer",
            "title": "Rating"
          },
          "feedback": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Feedback"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "prompt_id",
          "version",
          "request_id",
          "ab_test_id",
          "variant_idx",
          "rating",
          "feedback",
          "created_at"
        ],
        "title": "RatingResponse",
        "description": "Rating record."
      },
      "RecommendationCategory": {
        "type": "string",
        "enum": [
          "cost",
          "performance",
          "reliability"
        ],
        "title": "RecommendationCategory"
      },
      "RecommendationItem": {
        "properties": {
          "rule_id": {
            "type": "string",
            "title": "Rule Id"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "category": {
            "$ref": "#/components/schemas/RecommendationCategory"
          },
          "priority": {
            "$ref": "#/components/schemas/RecommendationPriority"
          },
          "estimated_savings_usd": {
            "type": "number",
            "title": "Estimated Savings Usd"
          },
          "action_label": {
            "type": "string",
            "title": "Action Label"
          },
          "action_url": {
            "type": "string",
            "title": "Action Url"
          }
        },
        "type": "object",
        "required": [
          "rule_id",
          "title",
          "description",
          "category",
          "priority",
          "estimated_savings_usd",
          "action_label",
          "action_url"
        ],
        "title": "RecommendationItem"
      },
      "RecommendationPriority": {
        "type": "string",
        "enum": [
          "high",
          "medium",
          "low"
        ],
        "title": "RecommendationPriority"
      },
      "RecommendationsResponse": {
        "properties": {
          "user_id": {
            "type": "string",
            "title": "User Id"
          },
          "window_days": {
            "type": "integer",
            "title": "Window Days"
          },
          "total_cost_usd": {
            "type": "number",
            "title": "Total Cost Usd"
          },
          "recommendations": {
            "items": {
              "$ref": "#/components/schemas/RecommendationItem"
            },
            "type": "array",
            "title": "Recommendations"
          }
        },
        "type": "object",
        "required": [
          "user_id",
          "window_days",
          "total_cost_usd",
          "recommendations"
        ],
        "title": "RecommendationsResponse"
      },
      "RegisterBackendRequest": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Name",
            "description": "Display name for this backend"
          },
          "provider": {
            "type": "string",
            "pattern": "^(openai|azure_openai|azure_foundry|anthropic|google|vllm|custom)$",
            "title": "Provider"
          },
          "base_url": {
            "type": "string",
            "minLength": 1,
            "title": "Base Url",
            "description": "Base URL for the inference endpoint"
          },
          "model_name": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Model Name",
            "description": "Model identifier for routing"
          },
          "modality": {
            "type": "string",
            "pattern": "^(chat|embedding|transcription)$",
            "title": "Modality",
            "default": "chat"
          },
          "api_key_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key Id",
            "description": "ID of a provider key for authentication"
          },
          "is_default": {
            "type": "boolean",
            "title": "Is Default",
            "description": "Set as default backend for this modality",
            "default": false
          },
          "data_classification_max": {
            "type": "string",
            "pattern": "^(public|internal|confidential|phi)$",
            "title": "Data Classification Max",
            "default": "public"
          }
        },
        "type": "object",
        "required": [
          "name",
          "provider",
          "base_url",
          "model_name"
        ],
        "title": "RegisterBackendRequest"
      },
      "RegisterModelRequest": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 256,
            "minLength": 1,
            "title": "Name",
            "description": "Model name (e.g., 'llama-3.1-70b-instruct')."
          },
          "version": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "title": "Version",
            "description": "Version string (e.g., '1.0', 'v2024.03'). Immutable once registered."
          },
          "architecture": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "title": "Architecture",
            "description": "Model architecture (e.g., 'llama', 'qwen', 'whisper', 'bert')."
          },
          "parameter_count": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Parameter Count",
            "description": "Number of parameters (e.g., 70000000000 for 70B).",
            "default": 0
          },
          "quantization": {
            "type": "string",
            "title": "Quantization",
            "description": "Quantization format (fp16, int8, int4, etc.).",
            "default": "fp16"
          },
          "format": {
            "type": "string",
            "title": "Format",
            "description": "Weight format (safetensors, onnx, checkpoint).",
            "default": "safetensors"
          },
          "modality": {
            "$ref": "#/components/schemas/Modality"
          },
          "weight_uri": {
            "type": "string",
            "minLength": 1,
            "title": "Weight Uri",
            "description": "URI to model weights (az://, hf://, s3://)."
          },
          "required_gpu_sku": {
            "type": "string",
            "minLength": 1,
            "title": "Required Gpu Sku",
            "description": "Azure VM SKU (e.g., 'Standard_ND96asr_v4')."
          },
          "tp_degree": {
            "type": "integer",
            "maximum": 8.0,
            "minimum": 1.0,
            "title": "Tp Degree",
            "description": "Tensor parallelism degree (1 = single GPU).",
            "default": 1
          }
        },
        "type": "object",
        "required": [
          "name",
          "version",
          "architecture",
          "modality",
          "weight_uri",
          "required_gpu_sku"
        ],
        "title": "RegisterModelRequest",
        "description": "POST /api/v1/models \u2014 register a new model version."
      },
      "RenderRequest": {
        "properties": {
          "version": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version",
            "description": "Version to render. Defaults to current_version."
          },
          "variables": {
            "additionalProperties": true,
            "type": "object",
            "title": "Variables",
            "description": "Variable values to substitute."
          }
        },
        "type": "object",
        "title": "RenderRequest",
        "description": "POST /api/v1/prompts/{slug}/render"
      },
      "RenderResponse": {
        "properties": {
          "messages": {
            "items": {
              "additionalProperties": {
                "type": "string"
              },
              "type": "object"
            },
            "type": "array",
            "title": "Messages"
          },
          "model_config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Config"
          },
          "version": {
            "type": "integer",
            "title": "Version"
          },
          "prompt_slug": {
            "type": "string",
            "title": "Prompt Slug"
          }
        },
        "type": "object",
        "required": [
          "messages",
          "version",
          "prompt_slug"
        ],
        "title": "RenderResponse",
        "description": "Rendered prompt with variables substituted."
      },
      "RequestCountsResponse": {
        "properties": {
          "total": {
            "type": "integer",
            "title": "Total",
            "default": 0
          },
          "completed": {
            "type": "integer",
            "title": "Completed",
            "default": 0
          },
          "failed": {
            "type": "integer",
            "title": "Failed",
            "default": 0
          }
        },
        "type": "object",
        "title": "RequestCountsResponse",
        "description": "Request processing progress."
      },
      "RetentionReportResponse": {
        "properties": {
          "generated_at": {
            "type": "string",
            "title": "Generated At"
          },
          "tier": {
            "type": "string",
            "title": "Tier"
          },
          "pg_records_total": {
            "type": "integer",
            "title": "Pg Records Total",
            "default": 0
          },
          "pg_records_prunable": {
            "type": "integer",
            "title": "Pg Records Prunable",
            "default": 0
          },
          "pg_oldest_record": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pg Oldest Record"
          },
          "blob_records_total": {
            "type": "integer",
            "title": "Blob Records Total",
            "default": 0
          },
          "legal_holds_active": {
            "type": "integer",
            "title": "Legal Holds Active",
            "default": 0
          },
          "storage_bytes_estimate": {
            "type": "integer",
            "title": "Storage Bytes Estimate",
            "default": 0
          },
          "compliant": {
            "type": "boolean",
            "title": "Compliant",
            "default": true
          },
          "warnings": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Warnings"
          }
        },
        "type": "object",
        "required": [
          "generated_at",
          "tier"
        ],
        "title": "RetentionReportResponse",
        "description": "GET /api/v1/audit/retention/report"
      },
      "RetentionResponse": {
        "properties": {
          "tier": {
            "type": "string",
            "title": "Tier"
          },
          "pg_retention_days": {
            "type": "integer",
            "title": "Pg Retention Days"
          },
          "blob_hot_days": {
            "type": "integer",
            "title": "Blob Hot Days"
          },
          "blob_cool_days": {
            "type": "integer",
            "title": "Blob Cool Days"
          },
          "blob_archive_days": {
            "type": "integer",
            "title": "Blob Archive Days"
          },
          "total_retention_days": {
            "type": "integer",
            "title": "Total Retention Days"
          },
          "minimum_days": {
            "type": "integer",
            "title": "Minimum Days"
          },
          "legal_holds_active": {
            "type": "integer",
            "title": "Legal Holds Active",
            "default": 0
          }
        },
        "type": "object",
        "required": [
          "tier",
          "pg_retention_days",
          "blob_hot_days",
          "blob_cool_days",
          "blob_archive_days",
          "total_retention_days",
          "minimum_days"
        ],
        "title": "RetentionResponse",
        "description": "GET /api/v1/audit/retention"
      },
      "RouteConfig": {
        "properties": {
          "route_id": {
            "type": "string",
            "title": "Route Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "customer_id": {
            "type": "string",
            "title": "Customer Id",
            "default": "default"
          },
          "match": {
            "$ref": "#/components/schemas/MatchConfig"
          },
          "strategy": {
            "$ref": "#/components/schemas/RoutingStrategy",
            "default": "direct"
          },
          "rules": {
            "items": {
              "$ref": "#/components/schemas/RoutingRule"
            },
            "type": "array",
            "title": "Rules"
          },
          "fallback_chain": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Fallback Chain"
          },
          "ab_test": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ABTestConfig-Output"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_budget": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CostBudget"
              },
              {
                "type": "null"
              }
            ]
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "default": true
          },
          "priority": {
            "type": "integer",
            "title": "Priority",
            "description": "Higher = evaluated first.",
            "default": 0
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "RouteConfig",
        "description": "Complete route configuration \u2014 the unit of storage."
      },
      "RouteCreate": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "customer_id": {
            "type": "string",
            "title": "Customer Id",
            "default": "default"
          },
          "match": {
            "$ref": "#/components/schemas/MatchConfig"
          },
          "strategy": {
            "$ref": "#/components/schemas/RoutingStrategy",
            "default": "direct"
          },
          "rules": {
            "items": {
              "$ref": "#/components/schemas/RoutingRule"
            },
            "type": "array",
            "title": "Rules"
          },
          "fallback_chain": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Fallback Chain"
          },
          "ab_test": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ABTestConfig-Input"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_budget": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CostBudget"
              },
              {
                "type": "null"
              }
            ]
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "default": true
          },
          "priority": {
            "type": "integer",
            "title": "Priority",
            "default": 0
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "RouteCreate",
        "description": "Request body for creating a route."
      },
      "RouteListResponse": {
        "properties": {
          "routes": {
            "items": {
              "$ref": "#/components/schemas/RouteConfig"
            },
            "type": "array",
            "title": "Routes"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          }
        },
        "type": "object",
        "required": [
          "routes",
          "total"
        ],
        "title": "RouteListResponse",
        "description": "Response for listing routes."
      },
      "RouteUpdate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "match": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MatchConfig"
              },
              {
                "type": "null"
              }
            ]
          },
          "strategy": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RoutingStrategy"
              },
              {
                "type": "null"
              }
            ]
          },
          "rules": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/RoutingRule"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rules"
          },
          "fallback_chain": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fallback Chain"
          },
          "ab_test": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ABTestConfig-Input"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost_budget": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CostBudget"
              },
              {
                "type": "null"
              }
            ]
          },
          "enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enabled"
          },
          "priority": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Priority"
          }
        },
        "type": "object",
        "title": "RouteUpdate",
        "description": "Request body for updating a route (all fields optional)."
      },
      "RoutingDecision": {
        "properties": {
          "model": {
            "type": "string",
            "title": "Model",
            "description": "Target model name to proxy to."
          },
          "fallback_chain": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Fallback Chain",
            "description": "Remaining fallback models if primary fails."
          },
          "ab_variant": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ab Variant",
            "description": "A/B test variant name if applicable."
          },
          "route_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Route Id",
            "description": "Route config ID that produced this decision."
          },
          "strategy": {
            "type": "string",
            "title": "Strategy",
            "description": "Strategy that was used.",
            "default": "direct"
          }
        },
        "type": "object",
        "required": [
          "model"
        ],
        "title": "RoutingDecision",
        "description": "The result of evaluating routing rules for a request."
      },
      "RoutingRule": {
        "properties": {
          "condition": {
            "type": "string",
            "title": "Condition",
            "description": "Evaluation condition (e.g., 'token_count < 100')."
          },
          "target": {
            "type": "string",
            "title": "Target",
            "description": "Target model name to route to."
          },
          "weight": {
            "type": "integer",
            "maximum": 100.0,
            "minimum": 0.0,
            "title": "Weight",
            "description": "Weight for random/A-B selection (0-100).",
            "default": 100
          }
        },
        "type": "object",
        "required": [
          "condition",
          "target"
        ],
        "title": "RoutingRule",
        "description": "A single routing rule within a strategy."
      },
      "RoutingStrategy": {
        "type": "string",
        "enum": [
          "direct",
          "complexity",
          "cost",
          "latency",
          "random",
          "fallback"
        ],
        "title": "RoutingStrategy",
        "description": "Supported routing strategies."
      },
      "RuleListResponse": {
        "properties": {
          "rules": {
            "items": {
              "$ref": "#/components/schemas/RuleResponse"
            },
            "type": "array",
            "title": "Rules"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          }
        },
        "type": "object",
        "required": [
          "rules",
          "total"
        ],
        "title": "RuleListResponse",
        "description": "List rules response."
      },
      "RuleResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "customer_id": {
            "type": "string",
            "title": "Customer Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "type": {
            "type": "string",
            "title": "Type"
          },
          "action": {
            "type": "string",
            "title": "Action"
          },
          "config": {
            "additionalProperties": true,
            "type": "object",
            "title": "Config"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled"
          },
          "priority": {
            "type": "integer",
            "title": "Priority"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "customer_id",
          "name",
          "type",
          "action",
          "config",
          "enabled",
          "priority",
          "created_at",
          "updated_at"
        ],
        "title": "RuleResponse",
        "description": "Single rule response."
      },
      "ScalingTier": {
        "type": "string",
        "enum": [
          "always-warm",
          "scale-to-zero"
        ],
        "title": "ScalingTier",
        "description": "Autoscaling tier for a deployment."
      },
      "SearchRequest": {
        "properties": {
          "query": {
            "type": "string",
            "maxLength": 10000,
            "minLength": 1,
            "title": "Query"
          },
          "collection_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Collection Ids",
            "description": "Filter by collection IDs"
          },
          "search_type": {
            "$ref": "#/components/schemas/SearchType",
            "default": "hybrid"
          },
          "top_k": {
            "type": "integer",
            "maximum": 50.0,
            "minimum": 1.0,
            "title": "Top K",
            "default": 10
          },
          "score_threshold": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Score Threshold"
          },
          "filters": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Filters"
          }
        },
        "type": "object",
        "required": [
          "query"
        ],
        "title": "SearchRequest"
      },
      "SearchResponse": {
        "properties": {
          "results": {
            "items": {
              "$ref": "#/components/schemas/SearchResult"
            },
            "type": "array",
            "title": "Results"
          },
          "total_results": {
            "type": "integer",
            "title": "Total Results"
          },
          "search_type": {
            "$ref": "#/components/schemas/SearchType"
          },
          "usage": {
            "additionalProperties": {
              "type": "integer"
            },
            "type": "object",
            "title": "Usage"
          }
        },
        "type": "object",
        "required": [
          "results",
          "total_results",
          "search_type"
        ],
        "title": "SearchResponse"
      },
      "SearchResult": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "content": {
            "type": "string",
            "title": "Content"
          },
          "score": {
            "type": "number",
            "title": "Score"
          },
          "collection_id": {
            "type": "string",
            "title": "Collection Id"
          },
          "document_id": {
            "type": "string",
            "title": "Document Id"
          },
          "chunk_index": {
            "type": "integer",
            "title": "Chunk Index"
          },
          "source_filename": {
            "type": "string",
            "title": "Source Filename"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object",
            "title": "Metadata"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "content",
          "score",
          "collection_id",
          "document_id",
          "chunk_index",
          "source_filename"
        ],
        "title": "SearchResult"
      },
      "SearchType": {
        "type": "string",
        "enum": [
          "vector",
          "hybrid",
          "keyword"
        ],
        "title": "SearchType"
      },
      "TestRuleRequest": {
        "properties": {
          "rule": {
            "$ref": "#/components/schemas/CreateRuleRequest",
            "description": "Rule to test (not persisted)."
          },
          "content": {
            "type": "string",
            "title": "Content",
            "description": "Content to test against the rule."
          },
          "direction": {
            "type": "string",
            "title": "Direction",
            "description": "input | output.",
            "default": "input"
          }
        },
        "type": "object",
        "required": [
          "rule",
          "content"
        ],
        "title": "TestRuleRequest",
        "description": "POST /api/v1/guardrails/rules/test \u2014 dry-run a rule."
      },
      "TestRuleResponse": {
        "properties": {
          "matched": {
            "type": "boolean",
            "title": "Matched"
          },
          "detail": {
            "type": "string",
            "title": "Detail",
            "default": ""
          }
        },
        "type": "object",
        "required": [
          "matched"
        ],
        "title": "TestRuleResponse",
        "description": "Dry-run result."
      },
      "TimeseriesBucket": {
        "properties": {
          "timestamp": {
            "type": "string",
            "title": "Timestamp"
          },
          "requests": {
            "type": "integer",
            "title": "Requests"
          },
          "errors": {
            "type": "integer",
            "title": "Errors"
          },
          "avg_latency_ms": {
            "type": "number",
            "title": "Avg Latency Ms"
          },
          "p99_latency_ms": {
            "type": "number",
            "title": "P99 Latency Ms"
          }
        },
        "type": "object",
        "required": [
          "timestamp",
          "requests",
          "errors",
          "avg_latency_ms",
          "p99_latency_ms"
        ],
        "title": "TimeseriesBucket"
      },
      "TimeseriesResponse": {
        "properties": {
          "user_id": {
            "type": "string",
            "title": "User Id"
          },
          "window_hours": {
            "type": "integer",
            "title": "Window Hours"
          },
          "bucket_minutes": {
            "type": "integer",
            "title": "Bucket Minutes"
          },
          "buckets": {
            "items": {
              "$ref": "#/components/schemas/TimeseriesBucket"
            },
            "type": "array",
            "title": "Buckets"
          }
        },
        "type": "object",
        "required": [
          "user_id",
          "window_hours",
          "bucket_minutes",
          "buckets"
        ],
        "title": "TimeseriesResponse"
      },
      "TranscriptionResponse": {
        "properties": {
          "text": {
            "type": "string",
            "title": "Text"
          }
        },
        "type": "object",
        "required": [
          "text"
        ],
        "title": "TranscriptionResponse"
      },
      "UpdateBackendRequest": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "provider": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(openai|azure_openai|azure_foundry|anthropic|google|vllm|custom)$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Provider"
          },
          "base_url": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Base Url"
          },
          "model_name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Name"
          },
          "modality": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(chat|embedding|transcription)$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Modality"
          },
          "api_key_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key Id"
          },
          "is_default": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Default"
          },
          "data_classification_max": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(public|internal|confidential|phi)$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Data Classification Max"
          },
          "enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enabled"
          }
        },
        "type": "object",
        "title": "UpdateBackendRequest"
      },
      "UpdateDeploymentRequest": {
        "properties": {
          "scaling_tier": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ScalingTier"
              },
              {
                "type": "null"
              }
            ]
          },
          "min_replicas": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Min Replicas"
          },
          "max_replicas": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Replicas"
          },
          "target_concurrency": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Target Concurrency"
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DeploymentStatus"
              },
              {
                "type": "null"
              }
            ],
            "description": "New deployment status (used by workflow callbacks)."
          },
          "endpoint_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Endpoint Url",
            "description": "Backend URL \u2014 set when deployment reaches 'running'."
          }
        },
        "type": "object",
        "title": "UpdateDeploymentRequest",
        "description": "PATCH /api/v1/deployments/{id} \u2014 update scaling config or status.\n\nStatus updates are used by the deploy workflow to report progress:\n``pending \u2192 provisioning \u2192 running`` or ``\u2192 failed``.\n\nWhen transitioning to ``running``, also set ``endpoint_url`` so the\nmodel can be registered in the routing table for inference traffic."
      },
      "UpdateModelRequest": {
        "properties": {
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ModelStatus"
              },
              {
                "type": "null"
              }
            ],
            "description": "New lifecycle status."
          },
          "engine_artifacts": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Engine Artifacts",
            "description": "Map of GPU SKU \u2192 compiled engine blob URI."
          }
        },
        "type": "object",
        "title": "UpdateModelRequest",
        "description": "PATCH /api/v1/models/{id} \u2014 update model status (build pipeline callback).\n\nOnly ``status`` and ``engine_artifacts`` are mutable.  Everything\nelse is immutable once registered \u2014 create a new version instead."
      },
      "UpdatePromptRequest": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 256,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1024
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          }
        },
        "type": "object",
        "title": "UpdatePromptRequest",
        "description": "PATCH /api/v1/prompts/{slug}"
      },
      "UpdateRetentionRequest": {
        "properties": {
          "pg_retention_days": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Pg Retention Days"
          },
          "blob_hot_days": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Blob Hot Days"
          },
          "blob_cool_days": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Blob Cool Days"
          },
          "blob_archive_days": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Blob Archive Days"
          },
          "total_retention_days": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Retention Days"
          }
        },
        "type": "object",
        "title": "UpdateRetentionRequest",
        "description": "PATCH /api/v1/audit/retention"
      },
      "UpdateRuleRequest": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "action": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Action"
          },
          "config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Config"
          },
          "enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Enabled"
          },
          "priority": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 10000.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Priority"
          }
        },
        "type": "object",
        "title": "UpdateRuleRequest",
        "description": "PATCH /api/v1/guardrails/rules/{id}"
      },
      "UpdateVersionRequest": {
        "properties": {
          "messages": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/MessageItem"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Messages"
          },
          "variables": {
            "anyOf": [
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/VariableSchema"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Variables"
          },
          "model_config": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ModelConfig"
              },
              {
                "type": "null"
              }
            ]
          },
          "changelog": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Changelog"
          }
        },
        "type": "object",
        "title": "UpdateVersionRequest",
        "description": "PATCH /api/v1/prompts/{slug}/versions/{version} \u2014 draft only."
      },
      "Usage": {
        "properties": {
          "prompt_tokens": {
            "type": "integer",
            "title": "Prompt Tokens"
          },
          "completion_tokens": {
            "type": "integer",
            "title": "Completion Tokens"
          },
          "total_tokens": {
            "type": "integer",
            "title": "Total Tokens"
          }
        },
        "type": "object",
        "required": [
          "prompt_tokens",
          "completion_tokens",
          "total_tokens"
        ],
        "title": "Usage"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "VariableSchema": {
        "properties": {
          "type": {
            "$ref": "#/components/schemas/VariableType",
            "description": "Variable type.",
            "default": "string"
          },
          "required": {
            "type": "boolean",
            "title": "Required",
            "description": "Whether the variable is required.",
            "default": false
          },
          "default": {
            "title": "Default",
            "description": "Default value if not provided."
          },
          "description": {
            "type": "string",
            "title": "Description",
            "description": "Human-readable description.",
            "default": ""
          }
        },
        "type": "object",
        "title": "VariableSchema",
        "description": "Schema definition for a single template variable."
      },
      "VariableType": {
        "type": "string",
        "enum": [
          "string",
          "number",
          "boolean",
          "array"
        ],
        "title": "VariableType",
        "description": "Supported variable types for prompt templates."
      },
      "VersionListResponse": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/VersionResponse"
            },
            "type": "array",
            "title": "Data"
          },
          "count": {
            "type": "integer",
            "title": "Count"
          }
        },
        "type": "object",
        "required": [
          "data",
          "count"
        ],
        "title": "VersionListResponse",
        "description": "GET /api/v1/prompts/{slug}/versions response."
      },
      "VersionResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "prompt_id": {
            "type": "string",
            "title": "Prompt Id"
          },
          "version": {
            "type": "integer",
            "title": "Version"
          },
          "status": {
            "$ref": "#/components/schemas/VersionStatus"
          },
          "messages": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Messages"
          },
          "variables": {
            "additionalProperties": true,
            "type": "object",
            "title": "Variables"
          },
          "model_config": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Config"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          },
          "created_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By"
          },
          "changelog": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Changelog"
          }
        },
        "type": "object",
        "required": [
          "id",
          "prompt_id",
          "version",
          "status",
          "messages",
          "variables",
          "created_at",
          "created_by",
          "changelog"
        ],
        "title": "VersionResponse",
        "description": "Prompt version record."
      },
      "VersionStatus": {
        "type": "string",
        "enum": [
          "draft",
          "published",
          "archived"
        ],
        "title": "VersionStatus",
        "description": "Prompt version lifecycle status."
      },
      "WebSearchOptions": {
        "properties": {
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "description": "Enable web search for this request.",
            "default": true
          },
          "top_k": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 20.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Top K",
            "description": "Override number of web results."
          },
          "fetch_pages": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 10.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Fetch Pages",
            "description": "Override number of pages to fetch full content for."
          }
        },
        "type": "object",
        "title": "WebSearchOptions",
        "description": "Options for web search augmentation."
      },
      "app__prompts__schemas__ABVariant": {
        "properties": {
          "version": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Version",
            "description": "Prompt version number."
          },
          "weight": {
            "type": "integer",
            "maximum": 100.0,
            "minimum": 0.0,
            "title": "Weight",
            "description": "Traffic weight (0-100)."
          },
          "label": {
            "type": "string",
            "maxLength": 128,
            "title": "Label",
            "description": "Human-readable variant label.",
            "default": ""
          }
        },
        "type": "object",
        "required": [
          "version",
          "weight"
        ],
        "title": "ABVariant",
        "description": "A single A/B test variant."
      },
      "app__router__schemas__ABVariant": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "model": {
            "type": "string",
            "title": "Model"
          },
          "weight": {
            "type": "integer",
            "maximum": 100.0,
            "minimum": 0.0,
            "title": "Weight",
            "description": "Traffic percentage (0-100)."
          }
        },
        "type": "object",
        "required": [
          "name",
          "model",
          "weight"
        ],
        "title": "ABVariant",
        "description": "A single A/B test variant."
      },
      "app__schemas__models__ModelListResponse": {
        "properties": {
          "object": {
            "type": "string",
            "const": "list",
            "title": "Object",
            "default": "list"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/ModelObject"
            },
            "type": "array",
            "title": "Data"
          }
        },
        "type": "object",
        "required": [
          "data"
        ],
        "title": "ModelListResponse"
      },
      "app__schemas__native__ModelListResponse": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/ModelResponse"
            },
            "type": "array",
            "title": "Data"
          },
          "count": {
            "type": "integer",
            "title": "Count"
          }
        },
        "type": "object",
        "required": [
          "data",
          "count"
        ],
        "title": "ModelListResponse",
        "description": "GET /api/v1/models response."
      }
    },
    "securitySchemes": {
      "HTTPBearer": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  }
}
