---
agentTools:
  projectIndex: https://docs.creaitor.ai/llms.txt
---

# Image Generator

<span class="Badge Badge_alert">Beta feature</span></br>Don't use this in production. This is a beta feature and may change at any time.

# OpenAPI definition

```json
{
  "openapi": "3.0.2",
  "info": {
    "description": "Creaitor is the one-stop solution for all your content needs. It is an AI-powered content creation platform that helps you create content in multiple languages and formats.",
    "version": "4.355.1",
    "title": "Image Generator",
    "contact": {
      "name": "API Support",
      "url": "https://docs.creaitor.ai/",
      "email": "contact@creaitor.ai"
    }
  },
  "servers": [
    {
      "url": "https://app.creaitor.ai/api/v1",
      "description": "Production server"
    }
  ],
  "paths": {
    "/images/generate": {
      "post": {
        "operationId": "Image-Generator",
        "summary": "Image Generator",
        "description": "<span class=\"Badge Badge_alert\">Beta feature</span></br>Don't use this in production. This is a beta feature and may change at any time.",
        "tags": [
          "Image Generator"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "input": {
                    "type": "string",
                    "description": "Which image you wanna create?"
                  },
                  "options": {
                    "type": "object",
                    "properties": {
                      "mood": {
                        "type": "string"
                      },
                      "color": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "medium": {
                        "type": "string"
                      },
                      "art_style": {
                        "type": "string"
                      },
                      "setting": {
                        "type": "string"
                      },
                      "texture": {
                        "type": "string"
                      },
                      "lighting": {
                        "type": "string"
                      },
                      "artist_style": {
                        "type": "string"
                      }
                    }
                  }
                },
                "required": [
                  "Name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The image was successfully created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/imageSchemaResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/error_IMAGE_INVALID"
          },
          "401": {
            "$ref": "#/components/responses/authUnauthorized"
          },
          "403": {
            "$ref": "#/components/responses/authForbidden"
          },
          "422": {
            "description": "Unprocessable Content."
          },
          "500": {
            "$ref": "#/components/responses/error_INTERNAL_ERROR"
          },
          "504": {
            "$ref": "#/components/responses/error_SPEC_TIMEOUT"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "apiKey",
        "name": "X-API-KEY",
        "in": "header"
      }
    },
    "responses": {
      "authForbidden": {
        "description": "Unauthorized",
        "content": {
          "application/json": {
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/error_APIKEY_MISMATCH"
                }
              ]
            }
          }
        }
      },
      "authUnauthorized": {
        "description": "Unauthorized",
        "content": {
          "application/json": {
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/error_APIKEY_EMPTY"
                },
                {
                  "$ref": "#/components/schemas/error_APIKEY_NOTFOUND"
                }
              ]
            }
          }
        }
      },
      "error_IMAGE_INVALID": {
        "description": "The image couldn't be saved.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/error_IMAGE_INVALID"
            }
          }
        }
      },
      "error_INTERNAL_ERROR": {
        "description": "An unknown error has occurred.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/error_INTERNAL_ERROR"
            }
          }
        }
      },
      "error_SPEC_TIMEOUT": {
        "description": "The spec upload timed out.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/error_SPEC_TIMEOUT"
            }
          }
        }
      }
    },
    "schemas": {
      "baseError": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "description": "An error code unique to the error received."
          },
          "message": {
            "type": "string",
            "description": "The reason why the error occured."
          },
          "suggestion": {
            "type": "string",
            "description": "A helpful suggestion for how to alleviate the error."
          },
          "docs": {
            "type": "string",
            "format": "url",
            "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.",
            "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"
          },
          "help": {
            "type": "string",
            "description": "Information on where you can receive additional assistance from our wonderful support team.",
            "example": "If you need help, email support@readme.io"
          },
          "poem": {
            "type": "array",
            "description": "A short poem we wrote you about your error.",
            "items": {
              "type": "string"
            },
            "example": [
              "If you're seeing this error,",
              "Things didn't quite go the way we hoped.",
              "When we tried to process your request,",
              "Maybe trying again it'll work—who knows!"
            ]
          }
        }
      },
      "imageSchemaResponse": {
        "type": "object",
        "properties": {
          "mood": {
            "type": "string",
            "description": "mood set for image"
          },
          "color": {
            "type": "string",
            "description": "color set for image"
          },
          "style": {
            "type": "string",
            "description": "style set for image"
          },
          "medium": {
            "type": "string",
            "description": "medium set for image"
          },
          "art_style": {
            "type": "string",
            "description": "art style set for image"
          },
          "setting": {
            "type": "string",
            "description": "setting set for image"
          },
          "texture": {
            "type": "string",
            "description": "texture set for image"
          },
          "lighting": {
            "type": "string",
            "description": "lighting set for image"
          },
          "artist_style": {
            "type": "string",
            "description": "artist style set for image"
          }
        },
        "additionalProperties": true
      },
      "error_APIKEY_EMPTY": {
        "allOf": [
          {
            "$ref": "#/components/schemas/baseError"
          },
          {
            "type": "object",
            "properties": {
              "error": {
                "type": "string",
                "default": "APIKEY_EMPTY"
              }
            }
          }
        ]
      },
      "error_APIKEY_MISMATCH": {
        "allOf": [
          {
            "$ref": "#/components/schemas/baseError"
          },
          {
            "type": "object",
            "properties": {
              "error": {
                "type": "string",
                "default": "APIKEY_MISMATCH"
              }
            }
          }
        ]
      },
      "error_APIKEY_NOTFOUND": {
        "allOf": [
          {
            "$ref": "#/components/schemas/baseError"
          },
          {
            "type": "object",
            "properties": {
              "error": {
                "type": "string",
                "default": "APIKEY_NOTFOUND"
              }
            }
          }
        ]
      },
      "error_IMAGE_INVALID": {
        "allOf": [
          {
            "$ref": "#/components/schemas/baseError"
          },
          {
            "type": "object",
            "properties": {
              "error": {
                "type": "string",
                "default": "IMAGE_INVALID"
              }
            }
          }
        ]
      },
      "error_INTERNAL_ERROR": {
        "allOf": [
          {
            "$ref": "#/components/schemas/baseError"
          },
          {
            "type": "object",
            "properties": {
              "error": {
                "type": "string",
                "default": "INTERNAL_ERROR"
              }
            }
          }
        ]
      },
      "error_SPEC_TIMEOUT": {
        "allOf": [
          {
            "$ref": "#/components/schemas/baseError"
          },
          {
            "type": "object",
            "properties": {
              "error": {
                "type": "string",
                "default": "SPEC_TIMEOUT"
              }
            }
          }
        ]
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 100,
      "1": 146,
      "2": 154,
      "3": 40,
      "4": 34,
      "5": 54,
      "6": 62,
      "7": 0,
      "8": 95,
      "9": 102,
      "10": 1,
      "11": 143
    }
  }
}
```