Word Cloud Maker

Word Cloud Maker · GPT-Aktionen

WordCloud Functionality

API to create a Wordcloud from a text provided by a user.

  • POST /wordcloud/maskCreate Wordcloud from black mask
  • POST /wordcloud/simpleCreate Simple WordCloud
Ursprüngliches API-Schema
{
  "openapi": "3.1.0",
  "info": {
    "title": "WordCloud Functionality",
    "version": "1.0.0",
    "description": "API to create a Wordcloud from a text provided by a user."
  },
  "servers": [
    {
      "url": "https://api.sharpagents.ai",
      "description": "API server for creating Wordclouds."
    }
  ],
  "paths": {
    "/wordcloud/mask": {
      "post": {
        "summary": "Create Wordcloud from black mask",
        "operationId": "BlackCloud",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "object": {
                    "type": "string",
                    "description": "Indicates the person/animal/object."
                  },
                  "words": {
                    "type": "string",
                    "description": "Indicates the words to be used and the frequency with which they appear, represented by an integer for each one."
                  },
                  "lang": {
                    "type": "string",
                    "description": "String with the language of the text in its respective ISO code."
                  },
                  "background_color": {
                    "type": "string",
                    "description": "Set the background color of the Wordcloud. Default is white.",
                    "default": "white"
                  },
                  "contour_width": {
                    "type": "integer",
                    "description": "Defines the mask contour thickness. Default is 1.",
                    "default": 1
                  },
                  "contour_color": {
                    "type": "string",
                    "description": "Defines the mask contour color. Default is black.",
                    "default": "black"
                  },
                  "colors": {
                    "type": "array",
                    "description": "Defines the colors that the text will have. Accepts colors in English, hexadecimal, RGB, HSL, or a combination of these.",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "object",
                  "words",
                  "lang"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Wordcloud created successfully.",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input."
          },
          "500": {
            "description": "Server error."
          }
        }
      }
    },
    "/wordcloud/simple": {
      "post": {
        "summary": "Create Simple WordCloud",
        "operationId": "SimpleCloud",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "words": {
                    "type": "string",
                    "description": "Indicates the words to be used."
                  },
                  "lang": {
                    "type": "string",
                    "description": "String with the language of the text in its respective ISO code."
                  },
                  "background_color": {
                    "type": "string",
                    "description": "Set the background color of the Wordcloud. Default is white.",
                    "default": "white"
                  },
                  "colors": {
                    "type": "array",
                    "description": "Defines the colors that the text will have. Accepts colors in English, hexadecimal, RGB, HSL, or a combination of these.",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "words",
                  "lang"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Wordcloud created successfully.",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input."
          },
          "500": {
            "description": "Server error."
          }
        }
      }
    }
  }
}