PromoAI - Video GPT Generator

PromoAI - Video GPT Generator · Actions GPT

PromoAI Action API

Provides PromoAI API for OpenAI's GPT action

  • POST /api/v2/promoVideos/brand/get-infogetBrandInfo

    Get brand info based on the internet domain.

  • POST /services/autopilot/v1/chat-gpt-business-infostoreBrandInfoGetVideos

    Stores business info that is a result coversation between user and PromoAI GPT, returns a thumbnail url and a redirect link to marketing videos batch being generated for that business on promo.com platform.

Schéma original API
{
  "openapi": "3.0.0",
  "info": {
    "description": "Provides PromoAI API for OpenAI's GPT action",
    "version": "1.0.0",
    "title": "PromoAI Action API"
  },
  "servers": [
    {
      "url": "https://promo.com"
    }
  ],
  "paths": {
    "/api/v2/promoVideos/brand/get-info": {
      "post": {
        "operationId": "getBrandInfo",
        "description": "Get brand info based on the internet domain.",
        "x-openai-isConsequential": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "domain": {
                    "type": "string",
                    "example": "pambazzelle.com",
                    "description": "The internet domain associated with the brand for which the info will be retrived."
                  }
                },
                "required": [
                  "domain"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Get brand info successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetBrandInfoResponse"
                }
              }
            }
          },
          "400": {
            "description": "Failed to get brand info",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/services/autopilot/v1/chat-gpt-business-info": {
      "post": {
        "operationId": "storeBrandInfoGetVideos",
        "description": "Stores business info that is a result coversation between user and PromoAI GPT, returns a thumbnail url and a redirect link to marketing videos batch being generated for that business on promo.com platform.",
        "x-openai-isConsequential": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatGPTBusinessInfo"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StoreChatGPTBusinessInfoResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Problem": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "example": "invalid_request",
            "description": "error code"
          },
          "detail": {
            "type": "string",
            "example": "Missing required parameter: domain"
          }
        }
      },
      "GetBrandInfoResponse": {
        "type": "object",
        "properties": {
          "domain": {
            "type": "string",
            "example": "pambazzelle.com",
            "description": "The internet domain associated with the brand."
          },
          "name": {
            "type": "string",
            "example": "Pam Bazzelle",
            "description": "The name of the brand."
          },
          "description": {
            "type": "string",
            "example": "Specializing in up-sizers, down-sizers, or those relocating, we assist buyers and sellers who are transitioning to their new dream home to accommodate their new lifestyle.",
            "description": "A brief description of the business related to the brand."
          },
          "logo_url": {
            "type": "string",
            "example": "https://s.promo.com/HJAac5ng",
            "description": "URL to the brand's logo image."
          },
          "colors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "#cd090a",
              "#3b444d",
              "#ffffff"
            ],
            "description": "A list of color codes, in HEX format, representing the brand's color scheme."
          },
          "color_images": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A list of color thumbnails, in order the same as `colors`.",
            "example": [
              "https://s.promo.com/L8yLZ232",
              "https://s.promo.com/kflgTedi",
              "https://s.promo.com/IUnq3Y14"
            ]
          }
        }
      },
      "ChatGPTBusinessInfo": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "Pam Bazzelle",
            "description": "Name of the business to generate videos for."
          },
          "description": {
            "type": "string",
            "example": "Specializing in up-sizers, down-sizers, or those relocating, we assist buyers and sellers who are transitioning to their new dream home to accommodate their new lifestyle. We work in LA area.",
            "description": "A brief description of the business to generate videos for."
          },
          "domain": {
            "type": "string",
            "example": "pambazzelle.com",
            "description": "Internet domain of the business to generate videos for, usually the same as used in storeBrandInfoGetVideos operation. If user did not provide any domain, use an empty sting."
          }
        },
        "required": [
          "name",
          "description",
          "domain"
        ]
      },
      "StoreChatGPTBusinessInfoResponse": {
        "type": "object",
        "properties": {
          "redirect_url": {
            "type": "string",
            "example": "https://s.promo.com/qjGNfS6c",
            "description": "This is a link to promo.com to see generated videos that are result of the GPT. Present to user in a form of a markdown link, f.e. \"Click [here](https://s.promo.com/qjGNfS6c)\""
          },
          "thumbnail_url": {
            "type": "string",
            "example": "https://s.promo.com/b8yaafEe",
            "description": "Url to an image file, to be used as clickable a thumbnail redirecting to promo.com to see generated videos that are result of the GPT. Present to user in a form of a markdown f.e. \"[![](https://s.promo.com/b8yaafEe)](https://s.promo.com/qjGNfS6c)\""
          }
        }
      }
    },
    "responses": {
      "InternalError": {
        "description": "Internal server error occurred",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Unauthorized error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "APIKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Promo-Api-Key"
      }
    }
  }
}