GPT Website Builder

GPT Website Builder · GPT アクション

AI Website Builder API

API for building and editing a website using. If website not passed in it creates a new website, if url exists then use that to update the website.

  • POST /new-websiteCreates a new website

    This endpoint creates a new website with the provided HTML content and returns back the html along with url of the newly created website.

  • POST /update-websiteUpdates an existing website

    This endpoint updates the HTML content of an existing website identified by a URL.

元の API スキーマ
{
  "openapi": "3.0.0",
  "info": {
    "title": "AI Website Builder API",
    "version": "1.0.0",
    "description": "API for building and editing a website using. If website not passed in it creates a new website, if url exists then use that to update the website."
  },
  "servers": [
    {
      "url": "https://ai-website-builder.up.railway.app/api/ui",
      "description": "Production server"
    }
  ],
  "paths": {
    "/new-website": {
      "post": {
        "summary": "Creates a new website",
        "description": "This endpoint creates a new website with the provided HTML content and returns back the html along with url of the newly created website.",
        "operationId": "createNewWebsite",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "html": {
                    "type": "string",
                    "description": "HTML content for the new website."
                  }
                },
                "required": [
                  "html"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "New website created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string",
                      "description": "URL of the newly created website"
                    },
                    "website_content": {
                      "type": "string",
                      "description": "HTML content of the new website"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/update-website": {
      "post": {
        "summary": "Updates an existing website",
        "description": "This endpoint updates the HTML content of an existing website identified by a URL.",
        "operationId": "updateWebsite",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "html": {
                    "type": "string",
                    "description": "New HTML content for the website."
                  },
                  "website_url": {
                    "type": "string",
                    "description": "URL of the website to be updated."
                  }
                },
                "required": [
                  "html",
                  "website_url"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Website updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "website_content": {
                      "type": "string",
                      "description": "Updated HTML content of the website"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    }
  }
}