DesignerGPT

DesignerGPT · GPT Actions

Webpage Generator API

  • POST /create-pageGenerates a webpage based on provided HTML content
原始 API 定义
{
  "openapi": "3.0.0",
  "info": {
    "title": "Webpage Generator API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://webgeneratorserver.skirano.repl.co",
      "description": "Main production server"
    }
  ],
  "paths": {
    "/create-page": {
      "post": {
        "summary": "Generates a webpage based on provided HTML content",
        "operationId": "generateWebpage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "page_code": {
                    "type": "string",
                    "description": "The HTML content for the web page"
                  }
                },
                "required": [
                  "page_code"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webpage successfully generated",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string",
                  "example": "https://example.com/generated_page"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          }
        }
      }
    }
  }
}