> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.bannerify.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Create stored image

> Create an image from a template



## OpenAPI

````yaml post /v1/templates/createStoredImage
openapi: 3.0.0
info:
  title: Bannerify API
  version: 0.0.0
servers:
  - url: https://api.bannerify.co
    description: Production
security:
  - token: []
paths:
  /v1/templates/createStoredImage:
    post:
      description: Create an image from a template
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                format:
                  type: string
                  enum:
                    - png
                    - jpeg
                    - webp
                  default: png
                _debug:
                  type: string
                  description: Only for debug purpose, it draws bounding box for each layer
                s3Config:
                  type: object
                  properties:
                    endPoint:
                      type: string
                      description: S3 endpoint URL (without protocol)
                      example: s3.amazonaws.com
                    port:
                      type: number
                      default: 443
                      description: S3 endpoint port
                      example: 443
                    useSSL:
                      type: boolean
                      default: true
                      description: Whether to use SSL/TLS
                      example: true
                    region:
                      type: string
                      description: S3 region
                      example: us-east-1
                    bucket:
                      type: string
                      description: S3 bucket name
                      example: my-images-bucket
                    pathStyle:
                      type: boolean
                      default: false
                      description: Whether to use path-style URLs
                      example: false
                    accessKey:
                      type: string
                      description: S3 access key
                    secretKey:
                      type: string
                      description: S3 secret key
                    customUrl:
                      type: string
                      description: >-
                        Custom URL template for accessing uploaded files. Use
                        {key} as placeholder for the file key.
                      example: https://cdn.example.com/{key}
                  required:
                    - endPoint
                    - region
                    - bucket
                    - accessKey
                    - secretKey
                  description: >-
                    Optional custom S3 configuration. If provided, the generated
                    file will be stored in your S3-compatible storage instead of
                    the default Bannerify storage.
                apiKey:
                  type: string
                templateId:
                  type: string
                  description: Your template id
                  example: tpl_xxxxxxxxx
                modifications:
                  anyOf:
                    - type: array
                      items:
                        $ref: '#/components/schemas/Modification'
                    - type: object
                      additionalProperties:
                        nullable: true
                    - type: string
                    - nullable: true
                    - nullable: true
                  default: []
                  description: >-
                    Template modifications as the API array format, an object
                    shorthand, or a JSON string. Object values map to text by
                    default, while nested objects keep fields such as src,
                    qrcode, rows, or chart.
                  example:
                    headline: Summer sale
                    photo:
                      src: https://example.com/photo.png
              required:
                - apiKey
                - templateId
      responses:
        '200':
          description: Image object
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    type: string
                required:
                  - url
        '400':
          description: >-
            The server cannot or will not process the request due to something
            that is perceived to be a client error (e.g., malformed request
            syntax, invalid request message framing, or deceptive request
            routing).
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/ErrBadRequest'
                  - $ref: '#/components/schemas/ErrFetchImageError'
        '401':
          description: >-
            Although the HTTP standard specifies "unauthorized", semantically
            this response means "unauthenticated". That is, the client must
            authenticate itself to get the requested response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrUnauthorized'
        '403':
          description: >-
            The client does not have access rights to the content; that is, it
            is unauthorized, so the server is refusing to give the requested
            resource. Unlike 401 Unauthorized, the client's identity is known to
            the server.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrForbidden'
        '404':
          description: >-
            The server cannot find the requested resource. In the browser, this
            means the URL is not recognized. In an API, this can also mean that
            the endpoint is valid but the resource itself does not exist.
            Servers may also send this response instead of 403 Forbidden to hide
            the existence of a resource from an unauthorized client. This
            response code is probably the most well known due to its frequent
            occurrence on the web.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrNotFound'
        '409':
          description: >-
            This response is sent when a request conflicts with the current
            state of the server.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrConflict'
        '429':
          description: >-
            The user has sent too many requests in a given amount of time ("rate
            limiting")
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrTooManyRequests'
        '500':
          description: >-
            The server has encountered a situation it does not know how to
            handle.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrInternalServerError'
components:
  schemas:
    Modification:
      type: object
      properties:
        name:
          type: string
          description: The layer name of the modification
          example: Text 1
        color:
          type: string
          description: The color for the modification
          example: '#FF0000'
        src:
          type: string
          description: The source image for the modification
          example: https://example.com/image.jpg
        text:
          type: string
          description: You can modify the text layer with this field
          example: Hello World
        barcode:
          type: string
          description: Modify the barcode layer content with this field
          example: '1234567890'
        qrcode:
          type: string
          description: Modify the qrcode layer content with this field
          example: Some text
        chart:
          type: object
          additionalProperties:
            nullable: true
          description: Update chart layer's data, follow chart.js data structure
        visible:
          type: boolean
          description: Set the visibility of the field
          example: true
        star:
          type: number
          description: Star value
          example: 5
        widthMode:
          type: string
          enum:
            - standard
            - adaptive
          description: Table width mode
          example: adaptive
        heightMode:
          type: string
          enum:
            - standard
            - adaptive
          description: Table height mode
          example: adaptive
        theme:
          type: string
          enum:
            - NONE
            - DEFAULT
            - BRIGHT
            - SIMPLIFY
            - ARCO
          description: Table theme
          example: NONE
        rows:
          type: array
          items:
            nullable: true
          description: Table rows
        columns:
          type: array
          items:
            type: string
          description: Table columns
      required:
        - name
      description: A modification (aka override) to apply to the layer in image
    ErrBadRequest:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - BAD_REQUEST
              description: A machine readable error code.
              example: BAD_REQUEST
            docs:
              type: string
              description: >-
                A link to our documentation with more details about this error
                code
              example: https://bannerify.co/docs/api-reference/errors/code/BAD_REQUEST
            message:
              type: string
              description: A human readable explanation of what went wrong
            requestId:
              type: string
              description: Please always include the requestId in your error report
              example: req:1234
          required:
            - code
            - docs
            - message
            - requestId
      required:
        - error
    ErrFetchImageError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - FETCH_IMAGE_ERROR
              description: A machine readable error code.
              example: FETCH_IMAGE_ERROR
            docs:
              type: string
              description: >-
                A link to our documentation with more details about this error
                code
              example: >-
                https://bannerify.co/docs/api-reference/errors/code/FETCH_IMAGE_ERROR
            message:
              type: string
              description: A human readable explanation of what went wrong
            requestId:
              type: string
              description: Please always include the requestId in your error report
              example: req:1234
          required:
            - code
            - docs
            - message
            - requestId
      required:
        - error
    ErrUnauthorized:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - UNAUTHORIZED
              description: A machine readable error code.
              example: UNAUTHORIZED
            docs:
              type: string
              description: >-
                A link to our documentation with more details about this error
                code
              example: https://bannerify.co/docs/api-reference/errors/code/UNAUTHORIZED
            message:
              type: string
              description: A human readable explanation of what went wrong
            requestId:
              type: string
              description: Please always include the requestId in your error report
              example: req:1234
          required:
            - code
            - docs
            - message
            - requestId
      required:
        - error
    ErrForbidden:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - FORBIDDEN
              description: A machine readable error code.
              example: FORBIDDEN
            docs:
              type: string
              description: >-
                A link to our documentation with more details about this error
                code
              example: https://bannerify.co/docs/api-reference/errors/code/FORBIDDEN
            message:
              type: string
              description: A human readable explanation of what went wrong
            requestId:
              type: string
              description: Please always include the requestId in your error report
              example: req:1234
          required:
            - code
            - docs
            - message
            - requestId
      required:
        - error
    ErrNotFound:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - NOT_FOUND
              description: A machine readable error code.
              example: NOT_FOUND
            docs:
              type: string
              description: >-
                A link to our documentation with more details about this error
                code
              example: https://bannerify.co/docs/api-reference/errors/code/NOT_FOUND
            message:
              type: string
              description: A human readable explanation of what went wrong
            requestId:
              type: string
              description: Please always include the requestId in your error report
              example: req:1234
          required:
            - code
            - docs
            - message
            - requestId
      required:
        - error
    ErrConflict:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - CONFLICT
              description: A machine readable error code.
              example: CONFLICT
            docs:
              type: string
              description: >-
                A link to our documentation with more details about this error
                code
              example: https://bannerify.co/docs/api-reference/errors/code/CONFLICT
            message:
              type: string
              description: A human readable explanation of what went wrong
            requestId:
              type: string
              description: Please always include the requestId in your error report
              example: req:1234
          required:
            - code
            - docs
            - message
            - requestId
      required:
        - error
    ErrTooManyRequests:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - TOO_MANY_REQUESTS
              description: A machine readable error code.
              example: TOO_MANY_REQUESTS
            docs:
              type: string
              description: >-
                A link to our documentation with more details about this error
                code
              example: >-
                https://bannerify.co/docs/api-reference/errors/code/TOO_MANY_REQUESTS
            message:
              type: string
              description: A human readable explanation of what went wrong
            requestId:
              type: string
              description: Please always include the requestId in your error report
              example: req:1234
          required:
            - code
            - docs
            - message
            - requestId
      required:
        - error
    ErrInternalServerError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - INTERNAL_SERVER_ERROR
              description: A machine readable error code.
              example: INTERNAL_SERVER_ERROR
            docs:
              type: string
              description: >-
                A link to our documentation with more details about this error
                code
              example: >-
                https://bannerify.co/docs/api-reference/errors/code/INTERNAL_SERVER_ERROR
            message:
              type: string
              description: A human readable explanation of what went wrong
            requestId:
              type: string
              description: Please always include the requestId in your error report
              example: req:1234
          required:
            - code
            - docs
            - message
            - requestId
      required:
        - error
  securitySchemes:
    token:
      type: apiKey
      in: query
      name: apiKey
      x-speakeasy-example: BANNERIFY_API_KEY

````