AI Product Photography

AI Product Photography · Actions GPT

CreatorKit API

Utilities to handle image files and generate inpainted backgrounds for product images

  • POST /gpt/remove_backgroundRemoveBackground

    Receives an image_url and returns an image_url with its background removed and replaced with transparent pixels

  • POST /gpt/generate_imageGenerateImage

    Receives an image_url, a prompt, and negative_prompt, and returns an image_url with its original background replaced with a creative ecommerce-ready image

Schéma original API
{
  "openapi": "3.0.0",
  "info": {
    "title": "CreatorKit API",
    "description": "Utilities to handle image files and generate inpainted backgrounds for product images",
    "version": "v1.0.0"
  },
  "servers": [
    {
      "url": "https://gpt.creatorkit.com"
    }
  ],
  "paths": {
    "/gpt/remove_background": {
      "post": {
        "description": "Receives an image_url and returns an image_url with its background removed and replaced with transparent pixels",
        "operationId": "RemoveBackground",
        "x-openai-isConsequential": false,
        "security": [
          {
            "api_key": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "image_url"
                ],
                "properties": {
                  "image_url": {
                    "type": "string",
                    "description": "the image for which to remove the background"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "image_url": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/gpt/generate_image": {
      "post": {
        "description": "Receives an image_url, a prompt, and negative_prompt, and returns an image_url with its original background replaced with a creative ecommerce-ready image",
        "operationId": "GenerateImage",
        "x-openai-isConsequential": false,
        "security": [
          {
            "api_key": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "image_url",
                  "prompt",
                  "negative_prompt"
                ],
                "properties": {
                  "image_url": {
                    "type": "string",
                    "description": "the image for which to remove the background"
                  },
                  "prompt": {
                    "type": "string"
                  },
                  "negative_prompt": {
                    "type": "string"
                  },
                  "number": {
                    "type": "number",
                    "minimum": 1,
                    "maximum": 4,
                    "description": "number of images to generate"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "image_url": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {},
    "securitySchemes": {
      "api_key": {
        "type": "apiKey",
        "name": "x-api-key",
        "in": "header"
      }
    }
  }
}