Code Runner

Code Runner · Ações GPT

edgeruntime api

  • POST /api/htmlrun HTML/JS/CSS code with built-in Tailwind CSS

    This endpoint run HTML/JS/CSS code with built-in Tailwind CSS

Esquema API original
{
  "openapi": "3.1.0",
  "info": {
    "title": "edgeruntime api",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://www.edgeruntime.ai/"
    }
  ],
  "paths": {
    "/api/html": {
      "post": {
        "summary": "run HTML/JS/CSS code with built-in Tailwind CSS",
        "description": "This endpoint run HTML/JS/CSS code with built-in Tailwind CSS",
        "operationId": "runCode",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "description": "code to be converted",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PreviewHTMLRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreviewHTMLResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Unauthorized - Authentication credentials were missing or incorrect."
          },
          "429": {
            "description": "Too many requests - Rate limit exceeded."
          },
          "500": {
            "description": "Server error"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key"
      }
    },
    "schemas": {
      "ConvertCodeToImageRequest": {
        "type": "object",
        "properties": {
          "content": {
            "type": "string",
            "description": "the code to be converted"
          },
          "language": {
            "type": "string",
            "description": "the language of the code"
          }
        },
        "required": [
          "content"
        ]
      },
      "ConvertCodeToImageResponse": {
        "type": "object",
        "properties": {
          "link": {
            "type": "string",
            "format": "uri",
            "description": "URL link to the generated image of the code"
          }
        }
      },
      "ConvertMermaidToImageRequest": {
        "type": "object",
        "properties": {
          "content": {
            "type": "string",
            "description": "mermaid text content"
          }
        },
        "required": [
          "content"
        ]
      },
      "ConvertMermaidToImageResponse": {
        "type": "object",
        "properties": {
          "link": {
            "type": "string",
            "format": "uri",
            "description": "URL link to the generated image"
          }
        }
      },
      "PreviewHTMLRequest": {
        "type": "object",
        "properties": {
          "content": {
            "type": "object",
            "properties": {
              "html": {
                "type": "string",
                "description": "the HTML code to be run"
              },
              "css": {
                "type": "string",
                "description": "the CSS code to be run"
              },
              "js": {
                "type": "string",
                "description": "the JavaScript code to be run"
              }
            }
          }
        },
        "required": [
          "content"
        ]
      },
      "PreviewHTMLResponse": {
        "type": "object",
        "properties": {
          "link": {
            "type": "string",
            "format": "uri",
            "description": "URL link to the preview the HTML code"
          }
        }
      },
      "ConvertMarkdownToMindMapRequest": {
        "type": "object",
        "properties": {
          "content": {
            "type": "string",
            "description": "Markdown text content"
          }
        },
        "required": [
          "content"
        ]
      },
      "ConvertMarkdownToMindMapResponse": {
        "type": "object",
        "properties": {
          "link": {
            "type": "string",
            "format": "uri",
            "description": "URL link to the generated image"
          }
        }
      },
      "ConvertMarkdownToMobileImageRequest": {
        "type": "object",
        "properties": {
          "content": {
            "type": "string",
            "description": "Markdown text content"
          }
        },
        "required": [
          "content"
        ]
      },
      "ConvertMarkdownToMobileImageResponse": {
        "type": "object",
        "properties": {
          "link": {
            "type": "string",
            "format": "uri",
            "description": "URL link to the generated image"
          }
        }
      },
      "ConvertMarkdownToSlidesRequest": {
        "type": "object",
        "properties": {
          "content": {
            "type": "string",
            "description": "Markdown text content"
          }
        },
        "required": [
          "content"
        ]
      },
      "ConvertMarkdownToSlidesResponse": {
        "type": "object",
        "properties": {
          "link": {
            "type": "string",
            "format": "uri",
            "description": "URL link to the generated slides"
          }
        }
      }
    }
  },
  "tags": []
}