Variants

Variants are the changes that are applied to templates. If you want to generate a new image that changes a text layer on the template or maybe change an image, you pass those changes as a variants.

The variants model

Properties

  • Name
    layer
    Type
    string
    Description

    The key of the layer. This is the field you'll need to pass when creating a Snap

  • Name
    image_url
    Type
    string
    Description

    Only works with layers that have image_url as an available_modification. A url that will be used as source for an image.

  • Name
    background_color
    Type
    string
    Description

    Only works with layers that have background_color as an available_modification. A HEX or RGBA color string that will overwrite the layer background color.

  • Name
    text
    Type
    string
    Description

    Only works with layers that have text as an available_modification. A string of text.

  • Name
    hidden
    Type
    boolean
    Description

    Only accepted values are true and false. If set to false, nothing happens. If set to true, it will hide the given layer.

Layer model

{
  "layer": "review_poster",
  "image_url": "https://snapsbrew.com/crazy-doc-brown-jailed",
}