Cayodis - UI Components generator

Cayodis - UI Components generator · Ações GPT

UXGPT API

API for interacting with the UXGPT service, generating and iterating components.

  • POST /generateGenerates a new component or iterates an existing one based on the provided HTML string and optional UUID for iteration.
  • POST /check-user-modificationsChecks for user modifications on a component.

    This endpoint is used to get the latest updates made by the user on the component.

Esquema API original
{
  "openapi": "3.1.0",
  "info": {
    "title": "UXGPT API",
    "description": "API for interacting with the UXGPT service, generating and iterating components.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://cayodisgpt.vercel.app/api",
      "description": "UXGPT API server"
    }
  ],
  "paths": {
    "/generate": {
      "post": {
        "operationId": "generateOrIterateComponent",
        "summary": "Generates a new component or iterates an existing one based on the provided HTML string and optional UUID for iteration.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "string_of_html": {
                    "type": "string",
                    "description": "String representation of the HTML component."
                  },
                  "uuid_for_iteration": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Optional UUID of an existing component to iterate upon. Only provided for iteration."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response with a UUID and a URL",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "uuid": {
                      "type": "string",
                      "format": "uuid",
                      "description": "A randomly generated UUID (version 4) associated with the generated or iterated component."
                    },
                    "url": {
                      "type": "string",
                      "format": "uri",
                      "description": "The URL where the generated or iterated component can be accessed or interacted with."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request if the input is invalid"
          }
        }
      }
    },
    "/check-user-modifications": {
      "post": {
        "operationId": "checkUserModifications",
        "summary": "Checks for user modifications on a component.",
        "description": "This endpoint is used to get the latest updates made by the user on the component.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "uuid_for_iteration": {
                    "type": "string",
                    "format": "uuid",
                    "description": "The UUID that is being used in the context of the conversation."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Response with the UUID, updated code, and status.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "uuid": {
                      "type": "string",
                      "format": "uuid",
                      "description": "The UUID corresponding to the component."
                    },
                    "updated_code": {
                      "type": "string",
                      "description": "The updated code of the component after the user's modifications."
                    },
                    "status": {
                      "type": "integer",
                      "format": "int32",
                      "description": "The HTTP status code of the response."
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}