{
  "/prompts": {
    "post": {
      "tags": [
        "Prompt Management"
      ],
      "summary": "Create Prompt",
      "description": "Create a new prompt\n\n\ud83d\udc49 [Prompt docs](https://docs.litellm.ai/docs/proxy/prompt_management)\n\nExample Request:\n```bash\ncurl -X POST \"http://localhost:4000/prompts\" \\\n    -H \"Authorization: Bearer <your_api_key>\" \\\n    -H \"Content-Type: application/json\" \\\n    -d '{\n        \"prompt_id\": \"my_prompt\",\n        \"litellm_params\": {\n            \"prompt_id\": \"json_prompt\",\n            \"prompt_integration\": \"dotprompt\",\n            ### EITHER prompt_directory OR prompt_data MUST BE PROVIDED\n            \"prompt_directory\": \"/path/to/dotprompt/folder\",\n            \"prompt_data\": {\"json_prompt\": {\"content\": \"This is a prompt\", \"metadata\": {\"model\": \"gpt-4\"}}}\n        },\n        \"prompt_info\": {\n            \"prompt_type\": \"config\"\n        }\n    }'\n```",
      "operationId": "create_prompt_prompts_post",
      "requestBody": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Prompt"
            }
          }
        },
        "required": true
      },
      "responses": {
        "200": {
          "description": "Successful Response",
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        },
        "422": {
          "description": "Validation Error",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HTTPValidationError"
              }
            }
          }
        }
      },
      "security": [
        {
          "APIKeyHeader": []
        }
      ]
    }
  },
  "/prompts/list": {
    "get": {
      "tags": [
        "Prompt Management"
      ],
      "summary": "List Prompts",
      "description": "List the prompts that are available on the proxy server\n\n\ud83d\udc49 [Prompt docs](https://docs.litellm.ai/docs/proxy/prompt_management)\n\nExample Request:\n```bash\ncurl -X GET \"http://localhost:4000/prompts/list\" -H \"Authorization: Bearer <your_api_key>\"\n```\n\nExample Response:\n```json\n{\n    \"prompts\": [\n        {\n            \"prompt_id\": \"my_prompt_id\",\n            \"litellm_params\": {\n                \"prompt_id\": \"my_prompt_id\",\n                \"prompt_integration\": \"dotprompt\",\n                \"prompt_directory\": \"/path/to/prompts\"\n            },\n            \"prompt_info\": {\n                \"prompt_type\": \"config\"\n            },\n            \"created_at\": \"2023-11-09T12:34:56.789Z\",\n            \"updated_at\": \"2023-11-09T12:34:56.789Z\"\n        }\n    ]\n}\n```",
      "operationId": "list_prompts_prompts_list_get",
      "security": [
        {
          "APIKeyHeader": []
        }
      ],
      "parameters": [
        {
          "name": "environment",
          "in": "query",
          "required": false,
          "schema": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Environment"
          }
        }
      ],
      "responses": {
        "200": {
          "description": "Successful Response",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ListPromptsResponse"
              }
            }
          }
        },
        "422": {
          "description": "Validation Error",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HTTPValidationError"
              }
            }
          }
        }
      }
    }
  },
  "/prompts/test": {
    "post": {
      "tags": [
        "Prompt Management"
      ],
      "summary": "Test Prompt",
      "description": "Test a prompt by rendering it with variables and executing an LLM call.\n\nThis endpoint allows testing prompts before saving them to the database.\nThe response is always streamed.\n\n\ud83d\udc49 [Prompt docs](https://docs.litellm.ai/docs/proxy/prompt_management)\n\nExample Request:\n```bash\ncurl -X POST \"http://localhost:4000/prompts/test\" \\\n    -H \"Authorization: Bearer <your_api_key>\" \\\n    -H \"Content-Type: application/json\" \\\n    -d '{\n        \"dotprompt_content\": \"---\\nmodel: gpt-4o\\ntemperature: 0.7\\n---\\n\\nUser: Hello {{name}}\",\n        \"prompt_variables\": {\n            \"name\": \"World\"\n        }\n    }'\n```",
      "operationId": "test_prompt_prompts_test_post",
      "requestBody": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/TestPromptRequest"
            }
          }
        },
        "required": true
      },
      "responses": {
        "200": {
          "description": "Successful Response",
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        },
        "422": {
          "description": "Validation Error",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HTTPValidationError"
              }
            }
          }
        }
      },
      "security": [
        {
          "APIKeyHeader": []
        }
      ]
    }
  },
  "/prompts/{prompt_id}": {
    "get": {
      "tags": [
        "Prompt Management"
      ],
      "summary": "Get Prompt Info",
      "description": "Get detailed information about a specific prompt by ID, including prompt content\n\n    \ud83d\udc49 [Prompt docs](https://docs.litellm.ai/docs/proxy/prompt_management)\n\n    Example Request:\n    ```bash\n    curl -X GET \"http://localhost:4000/prompts/my_prompt_id/info\" \\\n        -H \"Authorization: Bearer <your_api_key>\"\n    ```\n\n    Example Response:\n    ```json\n    {\n        \"prompt_id\": \"my_prompt_id\",\n        \"litellm_params\": {\n            \"prompt_id\": \"my_prompt_id\",\n            \"prompt_integration\": \"dotprompt\",\n            \"prompt_directory\": \"/path/to/prompts\"\n        },\n        \"prompt_info\": {\n            \"prompt_type\": \"config\"\n        },\n        \"created_at\": \"2023-11-09T12:34:56.789Z\",\n        \"updated_at\": \"2023-11-09T12:34:56.789Z\",\n        \"content\": \"System: You are a helpful assistant.\n\nUser: {{user_message}}\"\n    }\n    ```",
      "operationId": "get_prompt_info_prompts__prompt_id__get",
      "security": [
        {
          "APIKeyHeader": []
        }
      ],
      "parameters": [
        {
          "name": "prompt_id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "title": "Prompt Id"
          }
        },
        {
          "name": "environment",
          "in": "query",
          "required": false,
          "schema": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Environment"
          }
        }
      ],
      "responses": {
        "200": {
          "description": "Successful Response",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PromptInfoResponse"
              }
            }
          }
        },
        "422": {
          "description": "Validation Error",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HTTPValidationError"
              }
            }
          }
        }
      }
    },
    "put": {
      "tags": [
        "Prompt Management"
      ],
      "summary": "Update Prompt",
      "description": "Update an existing prompt\n\n\ud83d\udc49 [Prompt docs](https://docs.litellm.ai/docs/proxy/prompt_management)\n\nExample Request:\n```bash\ncurl -X PUT \"http://localhost:4000/prompts/my_prompt_id\" \\\n    -H \"Authorization: Bearer <your_api_key>\" \\\n    -H \"Content-Type: application/json\" \\\n    -d '{\n        \"prompt_id\": \"my_prompt\",\n        \"litellm_params\": {\n            \"prompt_id\": \"my_prompt\",\n                \"prompt_integration\": \"dotprompt\",\n                \"prompt_directory\": \"/path/to/prompts\"\n            },\n            \"prompt_info\": {\n                \"prompt_type\": \"config\"\n            }\n        }\n    }'\n```",
      "operationId": "update_prompt_prompts__prompt_id__put",
      "security": [
        {
          "APIKeyHeader": []
        }
      ],
      "parameters": [
        {
          "name": "prompt_id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "title": "Prompt Id"
          }
        }
      ],
      "requestBody": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Prompt"
            }
          }
        }
      },
      "responses": {
        "200": {
          "description": "Successful Response",
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        },
        "422": {
          "description": "Validation Error",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HTTPValidationError"
              }
            }
          }
        }
      }
    },
    "delete": {
      "tags": [
        "Prompt Management"
      ],
      "summary": "Delete Prompt",
      "description": "Delete a prompt\n\n\ud83d\udc49 [Prompt docs](https://docs.litellm.ai/docs/proxy/prompt_management)\n\nExample Request:\n```bash\ncurl -X DELETE \"http://localhost:4000/prompts/my_prompt_id\" \\\n    -H \"Authorization: Bearer <your_api_key>\"\n```\n\nExample Response:\n```json\n{\n    \"message\": \"Prompt my_prompt_id deleted successfully\"\n}\n```",
      "operationId": "delete_prompt_prompts__prompt_id__delete",
      "security": [
        {
          "APIKeyHeader": []
        }
      ],
      "parameters": [
        {
          "name": "prompt_id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "title": "Prompt Id"
          }
        },
        {
          "name": "environment",
          "in": "query",
          "required": false,
          "schema": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Environment"
          }
        }
      ],
      "responses": {
        "200": {
          "description": "Successful Response",
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        },
        "422": {
          "description": "Validation Error",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HTTPValidationError"
              }
            }
          }
        }
      }
    },
    "patch": {
      "tags": [
        "Prompt Management"
      ],
      "summary": "Patch Prompt",
      "description": "Partially update an existing prompt\n\n\ud83d\udc49 [Prompt docs](https://docs.litellm.ai/docs/proxy/prompt_management)\n\nThis endpoint allows updating specific fields of a prompt without sending the entire object.\nOnly the following fields can be updated:\n- litellm_params: LiteLLM parameters for the prompt\n- prompt_info: Additional information about the prompt\n\nExample Request:\n```bash\ncurl -X PATCH \"http://localhost:4000/prompts/my_prompt_id\" \\\n    -H \"Authorization: Bearer <your_api_key>\" \\\n    -H \"Content-Type: application/json\" \\\n    -d '{\n        \"prompt_info\": {\n            \"prompt_type\": \"db\"\n        }\n    }'\n```",
      "operationId": "patch_prompt_prompts__prompt_id__patch",
      "security": [
        {
          "APIKeyHeader": []
        }
      ],
      "parameters": [
        {
          "name": "prompt_id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "title": "Prompt Id"
          }
        },
        {
          "name": "environment",
          "in": "query",
          "required": false,
          "schema": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Environment"
          }
        }
      ],
      "requestBody": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PatchPromptRequest"
            }
          }
        }
      },
      "responses": {
        "200": {
          "description": "Successful Response",
          "content": {
            "application/json": {
              "schema": {}
            }
          }
        },
        "422": {
          "description": "Validation Error",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HTTPValidationError"
              }
            }
          }
        }
      }
    }
  },
  "/prompts/{prompt_id}/info": {
    "get": {
      "tags": [
        "Prompt Management"
      ],
      "summary": "Get Prompt Info",
      "description": "Get detailed information about a specific prompt by ID, including prompt content\n\n    \ud83d\udc49 [Prompt docs](https://docs.litellm.ai/docs/proxy/prompt_management)\n\n    Example Request:\n    ```bash\n    curl -X GET \"http://localhost:4000/prompts/my_prompt_id/info\" \\\n        -H \"Authorization: Bearer <your_api_key>\"\n    ```\n\n    Example Response:\n    ```json\n    {\n        \"prompt_id\": \"my_prompt_id\",\n        \"litellm_params\": {\n            \"prompt_id\": \"my_prompt_id\",\n            \"prompt_integration\": \"dotprompt\",\n            \"prompt_directory\": \"/path/to/prompts\"\n        },\n        \"prompt_info\": {\n            \"prompt_type\": \"config\"\n        },\n        \"created_at\": \"2023-11-09T12:34:56.789Z\",\n        \"updated_at\": \"2023-11-09T12:34:56.789Z\",\n        \"content\": \"System: You are a helpful assistant.\n\nUser: {{user_message}}\"\n    }\n    ```",
      "operationId": "get_prompt_info_prompts__prompt_id__info_get",
      "security": [
        {
          "APIKeyHeader": []
        }
      ],
      "parameters": [
        {
          "name": "prompt_id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "title": "Prompt Id"
          }
        },
        {
          "name": "environment",
          "in": "query",
          "required": false,
          "schema": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Environment"
          }
        }
      ],
      "responses": {
        "200": {
          "description": "Successful Response",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PromptInfoResponse"
              }
            }
          }
        },
        "422": {
          "description": "Validation Error",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HTTPValidationError"
              }
            }
          }
        }
      }
    }
  },
  "/prompts/{prompt_id}/versions": {
    "get": {
      "tags": [
        "Prompt Management"
      ],
      "summary": "Get Prompt Versions",
      "description": "Get all versions of a specific prompt by base prompt ID\n\n\ud83d\udc49 [Prompt docs](https://docs.litellm.ai/docs/proxy/prompt_management)\n\nExample Request:\n```bash\ncurl -X GET \"http://localhost:4000/prompts/jack_success/versions\" \\\n    -H \"Authorization: Bearer <your_api_key>\"\n```\n\nExample Response:\n```json\n{\n    \"prompts\": [\n        {\n            \"prompt_id\": \"jack_success.v1\",\n            \"litellm_params\": {...},\n            \"prompt_info\": {\"prompt_type\": \"db\"},\n            \"created_at\": \"2023-11-09T12:34:56.789Z\",\n            \"updated_at\": \"2023-11-09T12:34:56.789Z\"\n        },\n        {\n            \"prompt_id\": \"jack_success.v2\",\n            \"litellm_params\": {...},\n            \"prompt_info\": {\"prompt_type\": \"db\"},\n            \"created_at\": \"2023-11-09T13:45:12.345Z\",\n            \"updated_at\": \"2023-11-09T13:45:12.345Z\"\n        }\n    ]\n}\n```",
      "operationId": "get_prompt_versions_prompts__prompt_id__versions_get",
      "security": [
        {
          "APIKeyHeader": []
        }
      ],
      "parameters": [
        {
          "name": "prompt_id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "title": "Prompt Id"
          }
        },
        {
          "name": "environment",
          "in": "query",
          "required": false,
          "schema": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Environment"
          }
        }
      ],
      "responses": {
        "200": {
          "description": "Successful Response",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ListPromptsResponse"
              }
            }
          }
        },
        "422": {
          "description": "Validation Error",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/HTTPValidationError"
              }
            }
          }
        }
      }
    }
  }
}