Presentation, Documents, Graphic Generator

Presentation, Documents, Graphic Generator · GPT-Aktionen

AI Tool Templates API

API for generating AI tool templates.

  • POST /aitooltemplates/templates/gptRetrieve and display base templates for user projects.

    This endpoint accepts the user's project description, category, and subcategory to search for and return suitable base templates.

  • POST /aitooltemplates/content/generateGenerate a Visme design link based on user's selected template.

    This endpoint generates a link to Visme, providing access to the design based on the user's selected base template. It utilizes the chat ID and template details to create the customized design.

Ursprüngliches API-Schema
{
  "openapi": "3.1.0",
  "info": {
    "title": "AI Tool Templates API",
    "description": "API for generating AI tool templates.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://my.visme.co",
      "description": "Production server"
    }
  ],
  "paths": {
    "/aitooltemplates/templates/gpt": {
      "post": {
        "operationId": "searchBaseTemplates",
        "x-openai-isConsequential": false,
        "summary": "Retrieve and display base templates for user projects.",
        "description": "This endpoint accepts the user's project description, category, and subcategory to search for and return suitable base templates.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "templateDescription": {
                    "type": "string",
                    "description": "Search query that will return relevant template, include a summarized version of what template should contain."
                  },
                  "templateCategory": {
                    "type": "string",
                    "description": "Category of the template.",
                    "enum": [
                      "presentations",
                      "documents",
                      "printables",
                      "social graphics"
                    ]
                  },
                  "subcategory": {
                    "type": "string",
                    "description": "The subcategory of the template within the specified category. in case of presentation, send subcategory also presenation"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A response containing the chat ID and an array of matched templates.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ChatID": {
                      "type": "string",
                      "description": "A randomly generated 8-digit chat ID."
                    },
                    "Template": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "templateID": {
                            "type": "string",
                            "description": "The unique identifier for the template."
                          },
                          "Thumbnails": {
                            "type": "string",
                            "format": "uri",
                            "description": "URL to the thumbnail image of the template. which should be clickable"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request if the input data is not valid."
          },
          "500": {
            "description": "Internal server error when the application fails to process the request."
          }
        }
      }
    },
    "/aitooltemplates/content/generate": {
      "post": {
        "operationId": "generate AI Template",
        "x-openai-isConsequential": false,
        "summary": "Generate a Visme design link based on user's selected template.",
        "description": "This endpoint generates a link to Visme, providing access to the design based on the user's selected base template. It utilizes the chat ID and template details to create the customized design.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "chatID": {
                    "type": "string",
                    "description": "The chat ID, which is returned by GPTTemplates"
                  },
                  "templateId": {
                    "type": "string",
                    "description": "The template ID."
                  },
                  "description": {
                    "type": "string",
                    "description": "User's requirement that template shall contain. all the information have to be captured except color theme in this parameter . make sure to have data, figures user provided . Also this desciption should be in Users language. if it was Arabic then this description should be arabic . make sure to contain all information and text to make the users content. too much summarization will be bad for content"
                  },
                  "templateType": {
                    "type": "string",
                    "description": "The type of the template."
                  },
                  "colorTheme": {
                    "type": "string",
                    "description": "The color theme for the template it the user has specified",
                    "default": "Default"
                  }
                },
                "required": [
                  "templateId",
                  "description",
                  "templateType",
                  "colorTheme"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Template generated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "chatID": {
                      "type": "string",
                      "description": "The chat ID."
                    },
                    "url": {
                      "type": "string",
                      "description": "The URL where the user can access the generated template."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}