{
  "openapi": "3.1.0",
  "info": {
    "title": "Base64 Encoder and Decoder API",
    "description": "API for blazing fast Base64 text encoding and decoding.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://your-production-url.com",
      "description": "Production server"
    }
  ],
  "paths": {
    "/api/encode": {
      "post": {
        "summary": "Encode text to Base64",
        "operationId": "encodeBase64",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "description": "The raw text string to encode."
                  },
                  "charset": {
                    "type": "string",
                    "description": "Character encoding to use (e.g. utf-8, iso-8859-1, windows-1252, shift_jis). Defaults to utf-8.",
                    "default": "utf-8"
                  }
                },
                "required": ["text"]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful encoding",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "base64": {
                      "type": "string",
                      "description": "The Base64 encoded result"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/decode": {
      "post": {
        "summary": "Decode Base64 to text",
        "operationId": "decodeBase64",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "base64": {
                    "type": "string",
                    "description": "The Base64 encoded string to decode."
                  },
                  "charset": {
                    "type": "string",
                    "description": "Character encoding to use when decoding (e.g. utf-8, iso-8859-1, windows-1252, shift_jis). Defaults to utf-8.",
                    "default": "utf-8"
                  }
                },
                "required": ["base64"]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful decoding",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "text": {
                      "type": "string",
                      "description": "The decoded raw text result"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
