---
updatedAt: 2025-08-11T17:51:01.000Z
agentTools:
  projectIndex: https://netra-apex.readme.io/llms.txt
---

# Toggle Cache

Enable or disable LLM response caching.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Netra AI Optimization Platform API",
    "version": "1.0.0",
    "description": "Enterprise-grade system for optimizing AI workloads. This API provides endpoints for agent orchestration, workflow management, and AI optimization tools.",
    "contact": {
      "name": "Netra Support",
      "email": "support@netra.ai",
      "url": "https://netra.ai/support"
    },
    "license": {
      "name": "Proprietary",
      "url": "https://netra.ai/license"
    }
  },
  "paths": {
    "/api/llm-cache/toggle": {
      "post": {
        "tags": [
          "llm-cache"
        ],
        "summary": "Toggle Cache",
        "description": "Enable or disable LLM response caching.",
        "operationId": "toggle_cache_api_llm_cache_toggle_post",
        "parameters": [
          {
            "name": "enabled",
            "in": "query",
            "required": true,
            "schema": {
              "type": "boolean",
              "title": "Enabled"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "boolean"
                  },
                  "title": "Response Toggle Cache Api Llm Cache Toggle Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      }
    }
  },
  "servers": [
    {
      "url": "http://localhost:8000",
      "description": "Local development server"
    },
    {
      "url": "https://api.netra.ai",
      "description": "Production server"
    },
    {
      "url": "https://staging-api.netra.ai",
      "description": "Staging server"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    },
    {
      "apiKey": []
    }
  ]
}
```