{
  "/health": {
    "get": {
      "tags": [
        "health"
      ],
      "summary": "Health Endpoint",
      "description": "\ud83d\udea8 USE `/health/liveliness` to health check the proxy \ud83d\udea8\n\nSee more \ud83d\udc49 https://docs.litellm.ai/docs/proxy/health\n\n\nCheck the health of all the endpoints in config.yaml\n\nTo run health checks in the background, add this to config.yaml:\n```\ngeneral_settings:\n    # ... other settings\n    background_health_checks: True\n```\nelse, the health checks will be run on models when /health is called.",
      "operationId": "health_endpoint_health_get",
      "security": [
        {
          "APIKeyHeader": []
        }
      ],
      "parameters": [
        {
          "name": "model",
          "in": "query",
          "required": false,
          "schema": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Specify the model name (optional)",
            "title": "Model"
          },
          "description": "Specify the model name (optional)"
        },
        {
          "name": "model_id",
          "in": "query",
          "required": false,
          "schema": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Specify the model ID (optional)",
            "title": "Model Id"
          },
          "description": "Specify the model ID (optional)"
        }
      ],
      "responses": {
        "200": {
          "description": "Successful Response",
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        },
        "422": {
          "description": "Validation Error",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HTTPValidationError"
              }
            }
          }
        }
      }
    }
  },
  "/health/backlog": {
    "get": {
      "tags": [
        "health"
      ],
      "summary": "Health Backlog",
      "description": "Returns the number of HTTP requests currently in-flight on this uvicorn worker.\n\nUse this to measure per-pod queue depth. A high value means the worker is\nprocessing many concurrent requests \u2014 requests arriving now will have to wait\nfor the event loop to get to them, adding latency before LiteLLM even starts\nits own timer.",
      "operationId": "health_backlog_health_backlog_get",
      "responses": {
        "200": {
          "description": "Successful Response",
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        }
      },
      "security": [
        {
          "APIKeyHeader": []
        }
      ]
    }
  },
  "/health/history": {
    "get": {
      "tags": [
        "health"
      ],
      "summary": "Health Check History Endpoint",
      "description": "Get health check history for models\n\nReturns historical health check data with optional filtering.",
      "operationId": "health_check_history_endpoint_health_history_get",
      "security": [
        {
          "APIKeyHeader": []
        }
      ],
      "parameters": [
        {
          "name": "model",
          "in": "query",
          "required": false,
          "schema": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Filter by specific model name",
            "title": "Model"
          },
          "description": "Filter by specific model name"
        },
        {
          "name": "status_filter",
          "in": "query",
          "required": false,
          "schema": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Filter by status (healthy/unhealthy)",
            "title": "Status Filter"
          },
          "description": "Filter by status (healthy/unhealthy)"
        },
        {
          "name": "limit",
          "in": "query",
          "required": false,
          "schema": {
            "type": "integer",
            "maximum": 1000,
            "minimum": 1,
            "description": "Number of records to return",
            "default": 100,
            "title": "Limit"
          },
          "description": "Number of records to return"
        },
        {
          "name": "offset",
          "in": "query",
          "required": false,
          "schema": {
            "type": "integer",
            "minimum": 0,
            "description": "Number of records to skip",
            "default": 0,
            "title": "Offset"
          },
          "description": "Number of records to skip"
        }
      ],
      "responses": {
        "200": {
          "description": "Successful Response",
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        },
        "422": {
          "description": "Validation Error",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HTTPValidationError"
              }
            }
          }
        }
      }
    }
  },
  "/health/latest": {
    "get": {
      "tags": [
        "health"
      ],
      "summary": "Latest Health Checks Endpoint",
      "description": "Get the latest health check status for all models\n\nReturns the most recent health check result for each model.",
      "operationId": "latest_health_checks_endpoint_health_latest_get",
      "responses": {
        "200": {
          "description": "Successful Response",
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        }
      },
      "security": [
        {
          "APIKeyHeader": []
        }
      ]
    }
  },
  "/health/license": {
    "get": {
      "tags": [
        "health"
      ],
      "summary": "Health License Endpoint",
      "description": "Return metadata about the configured LiteLLM license without exposing the key.",
      "operationId": "health_license_endpoint_health_license_get",
      "responses": {
        "200": {
          "description": "Successful Response",
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        }
      },
      "security": [
        {
          "APIKeyHeader": []
        }
      ]
    }
  },
  "/health/liveliness": {
    "get": {
      "tags": [
        "health"
      ],
      "summary": "Health Liveliness",
      "description": "Unprotected endpoint for checking if worker is alive",
      "operationId": "health_liveliness_health_liveliness_get",
      "responses": {
        "200": {
          "description": "Successful Response",
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        }
      }
    },
    "options": {
      "tags": [
        "health"
      ],
      "summary": "Health Liveliness Options",
      "description": "Options endpoint for health/liveliness check.",
      "operationId": "health_liveliness_options_health_liveliness_options",
      "responses": {
        "200": {
          "description": "Successful Response",
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        }
      }
    }
  },
  "/health/liveness": {
    "get": {
      "tags": [
        "health"
      ],
      "summary": "Health Liveliness",
      "description": "Unprotected endpoint for checking if worker is alive",
      "operationId": "health_liveliness_health_liveness_get",
      "responses": {
        "200": {
          "description": "Successful Response",
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        }
      }
    },
    "options": {
      "tags": [
        "health"
      ],
      "summary": "Health Liveliness Options",
      "description": "Options endpoint for health/liveliness check.",
      "operationId": "health_liveliness_options_health_liveness_options",
      "responses": {
        "200": {
          "description": "Successful Response",
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        }
      }
    }
  },
  "/health/readiness": {
    "get": {
      "tags": [
        "health"
      ],
      "summary": "Health Readiness",
      "description": "Unprotected endpoint for checking if worker can receive requests",
      "operationId": "health_readiness_health_readiness_get",
      "responses": {
        "200": {
          "description": "Successful Response",
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        }
      },
      "security": [
        {
          "APIKeyHeader": []
        }
      ]
    },
    "options": {
      "tags": [
        "health"
      ],
      "summary": "Health Readiness Options",
      "description": "Options endpoint for health/readiness check.",
      "operationId": "health_readiness_options_health_readiness_options",
      "responses": {
        "200": {
          "description": "Successful Response",
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        }
      },
      "security": [
        {
          "APIKeyHeader": []
        }
      ]
    }
  },
  "/health/services": {
    "get": {
      "tags": [
        "health"
      ],
      "summary": "Health Services Endpoint",
      "description": "Use this admin-only endpoint to check if the service is healthy.\n\nExample:\n```\ncurl -L -X GET 'http://0.0.0.0:4000/health/services?service=datadog'     -H 'Authorization: Bearer sk-1234'\n```",
      "operationId": "health_services_endpoint_health_services_get",
      "security": [
        {
          "APIKeyHeader": []
        }
      ],
      "parameters": [
        {
          "name": "service",
          "in": "query",
          "required": true,
          "schema": {
            "anyOf": [
              {
                "enum": [
                  "slack_budget_alerts",
                  "langfuse",
                  "langfuse_otel",
                  "slack",
                  "openmeter",
                  "webhook",
                  "email",
                  "braintrust",
                  "datadog",
                  "datadog_llm_observability",
                  "generic_api",
                  "arize",
                  "sqs"
                ],
                "type": "string"
              },
              {
                "type": "string"
              }
            ],
            "description": "Specify the service being hit.",
            "title": "Service"
          },
          "description": "Specify the service being hit."
        }
      ],
      "responses": {
        "200": {
          "description": "Successful Response",
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        },
        "422": {
          "description": "Validation Error",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HTTPValidationError"
              }
            }
          }
        }
      }
    }
  },
  "/health/shared-status": {
    "get": {
      "tags": [
        "health"
      ],
      "summary": "Shared Health Check Status Endpoint",
      "description": "Get the status of shared health check coordination across pods.\n\nReturns information about Redis connectivity, lock status, and cache status.",
      "operationId": "shared_health_check_status_endpoint_health_shared_status_get",
      "responses": {
        "200": {
          "description": "Successful Response",
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        }
      },
      "security": [
        {
          "APIKeyHeader": []
        }
      ]
    }
  },
  "/health/test_connection": {
    "post": {
      "tags": [
        "health"
      ],
      "summary": "Test Model Connection",
      "description": "Test a direct connection to a specific model.\n\nThis endpoint allows you to verify if your proxy can successfully connect to a specific model.\nIt's useful for troubleshooting model connectivity issues without going through the full proxy routing.\n\nExample:\n```bash\n# If model is configured in proxy_config.yaml, you only need to specify the model name:\ncurl -X POST 'http://localhost:4000/health/test_connection' \\\n  -H 'Authorization: Bearer sk-1234' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"litellm_params\": {\n        \"model\": \"gpt-4o\"\n    },\n    \"mode\": \"chat\"\n  }'\n\n# The endpoint will automatically use api_key, api_base, etc. from proxy_config.yaml\n\n# You can also override specific params or test with custom credentials:\ncurl -X POST 'http://localhost:4000/health/test_connection' \\\n  -H 'Authorization: Bearer sk-1234' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"litellm_params\": {\n        \"model\": \"azure/gpt-4o\",\n        \"api_key\": \"os.environ/AZURE_OPENAI_API_KEY\",\n        \"api_base\": \"os.environ/AZURE_OPENAI_ENDPOINT\",\n        \"api_version\": \"2024-10-21\"\n    },\n    \"mode\": \"chat\"\n  }'\n```\n\nNote: \n- If the model is configured in proxy_config.yaml, credentials (api_key, api_base, etc.) \n  will be automatically loaded from the config (with resolved environment variables).\n- You can override specific params by including them in the request.\n- You can use `os.environ/VARIABLE_NAME` syntax to reference environment variables,\n  which will be resolved automatically (same as in proxy_config.yaml).\n\nReturns:\n    dict: A dictionary containing the health check result with either success information or error details.",
      "operationId": "test_model_connection_health_test_connection_post",
      "requestBody": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Body_test_model_connection_health_test_connection_post"
            }
          }
        }
      },
      "responses": {
        "200": {
          "description": "Successful Response",
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        },
        "422": {
          "description": "Validation Error",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HTTPValidationError"
              }
            }
          }
        }
      },
      "security": [
        {
          "APIKeyHeader": []
        }
      ]
    }
  }
}