> ## 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.

# Signed url

> Generate a signed URL for a template

The signed URL endpoint allows you to generate customized images with dynamic data on the URL.

Use this endpoint to create personalized visuals or dynamic images for various purposes, such as marketing campaigns or user-specific content.

It's recommended to use this via an [SDK](/docs/sdk/js/apis/signed-url).


## OpenAPI

````yaml get /v1/templates/signedurl
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/signedurl:
    get:
      description: Generate a signed URL for a template
      parameters:
        - schema:
            type: string
            enum:
              - png
              - jpeg
              - webp
            default: png
          required: false
          name: format
          in: query
        - schema:
            type: string
            description: >-
              By default, we cache the image in the CDN for 1 day to save your
              bandwidth, use this field to disable cache so you can get the
              latest image
            example: 'true'
          required: false
          description: >-
            By default, we cache the image in the CDN for 1 day to save your
            bandwidth, use this field to disable cache so you can get the latest
            image
          name: nocache
          in: query
        - schema:
            type: string
            description: Only for debug purpose, it draws bounding box for each layer
          required: false
          description: Only for debug purpose, it draws bounding box for each layer
          name: _debug
          in: query
        - schema:
            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.
          required: false
          description: >-
            Optional custom S3 configuration. If provided, the generated file
            will be stored in your S3-compatible storage instead of the default
            Bannerify storage.
          name: s3Config
          in: query
        - schema:
            type: string
            description: Your template id
            example: tpl_xxxxxxxxx
          required: true
          description: Your template id
          name: templateId
          in: query
        - schema:
            type: string
            description: MD5 hash of the API key
            deprecated: true
          required: false
          description: MD5 hash of the API key
          name: apiKeyMd5
          in: query
        - schema:
            type: string
            description: Sha256 hash of the API key (use this)
          required: false
          description: Sha256 hash of the API key (use this)
          name: apiKeyHashed
          in: query
        - schema:
            type: string
            description: >-
              SHA256 hash of the query params, read more at
              https://bannerify.co/docs/api-reference/endpoint/signed-url
          required: true
          description: >-
            SHA256 hash of the query params, read more at
            https://bannerify.co/docs/api-reference/endpoint/signed-url
          name: sign
          in: query
        - schema:
            type: string
            description: A JSON string of modifications object
          required: false
          description: A JSON string of modifications object
          name: modifications
          in: query
        - schema:
            type: boolean
            nullable: true
            default: false
            description: Generate thumbnail preview (low-quality, non-billable)
          required: false
          description: Generate thumbnail preview (low-quality, non-billable)
          name: thumbnail
          in: query
      responses:
        '200':
          description: A image file
          content:
            image/png:
              schema:
                type: string
                format: binary
                description: The binary of image file
            image/jpeg:
              schema:
                type: string
                format: binary
                description: The binary of image file
            image/webp:
              schema:
                type: string
                format: binary
                description: The binary of image file
        '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:
    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

````