Search
Loading...
Skip to content

Asset Content JSON Schema

Reference documentation for the JSON schema structure used to define asset source content in CE.SDK.

Asset content JSON files define the structure and metadata for assets that CE.SDK loads into asset sources. This schema supports images, videos, audio, fonts, templates, colors, shapes, and effects.

Manifest Structure#

Every content.json file requires three top-level fields:

{
"version": "2.0.0",
"id": "my.custom.source",
"assets": []
}
FieldTypeRequiredDescription
versionstringYesSchema version
idstringYesUnique identifier for the asset source
assetsAssetDefinition[]YesArray of asset definitions

Asset Definition#

Each asset in the assets array follows this structure:

PropertyTypeRequiredDescription
idstringYesUnique identifier within the source
labelRecord<Locale, string>NoLocalized display names for UI and tooltips
tagsRecord<Locale, string[]>NoLocalized keywords for search and filtering
groupsstring[]NoCategories for grouping assets in the UI
metaAssetMetaDataNoContent-specific metadata
payloadAssetPayloadNoStructured data for specialized assets

Localization#

Labels and tags use locale codes as keys (e.g., "en", "de", "fr"). CE.SDK selects the appropriate translation based on the user’s locale.

{
"id": "mountain-photo",
"label": {
"en": "Mountain Landscape",
"de": "Berglandschaft"
},
"tags": {
"en": ["nature", "mountain"],
"de": ["natur", "berg"]
},
"groups": ["landscapes", "nature"]
}

Asset Metadata#

The meta object contains content-specific information for loading and applying assets.

Content Properties#

Define URIs and file information for loading the asset content. The uri property points to the main asset file, while thumbUri and previewUri provide optimized versions for UI display.

{
"meta": {
"uri": "{{base_url}}/images/photo.jpg",
"thumbUri": "{{base_url}}/thumbnails/photo-thumb.jpg",
"previewUri": "{{base_url}}/previews/photo-preview.jpg",
"filename": "photo.jpg",
"mimeType": "image/jpeg"
}
}
PropertyTypeDescription
uristringPrimary content URI. Supports {{base_url}} placeholder
thumbUristringThumbnail image URI for previews
previewUristringHigher-quality preview URI
filenamestringOriginal filename
mimeTypestringMIME type (e.g., "image/jpeg", "video/mp4")

Dimension Properties#

Specify the pixel dimensions of the asset. CE.SDK uses these values for layout calculations and aspect ratio preservation when inserting assets into a design.

{
"meta": {
"width": 1920,
"height": 1280
}
}
PropertyTypeDescription
widthnumberContent width in pixels
heightnumberContent height in pixels

Block Creation Properties#

Control what design block CE.SDK creates when the asset is applied. These properties determine how the asset integrates into the design structure.

{
"meta": {
"blockType": "//ly.img.ubq/graphic",
"fillType": "//ly.img.ubq/fill/image",
"shapeType": "//ly.img.ubq/shape/rect",
"kind": "image"
}
}
PropertyTypeDescription
blockTypestringDesign block type to create
fillTypestringFill type for the block
shapeTypestringShape type for stickers/shapes
kindstringAsset category hint (e.g., "image", "video", "template")

Block Type Values:

ValueUse Case
//ly.img.ubq/graphicImages, stickers, graphics
//ly.img.ubq/textText blocks
//ly.img.ubq/audioAudio clips
//ly.img.ubq/pageTemplates, pages
//ly.img.ubq/groupGrouped elements
//ly.img.ubq/cutoutCutout shapes

Fill Type Values:

ValueUse Case
//ly.img.ubq/fill/imageImage fills
//ly.img.ubq/fill/videoVideo fills
//ly.img.ubq/fill/colorSolid color fills
//ly.img.ubq/fill/gradient/linearLinear gradients
//ly.img.ubq/fill/gradient/radialRadial gradients
//ly.img.ubq/fill/gradient/conicalConical gradients

Shape Type Values:

ValueUse Case
//ly.img.ubq/shape/rectRectangles
//ly.img.ubq/shape/ellipseCircles, ovals
//ly.img.ubq/shape/polygonPolygons
//ly.img.ubq/shape/starStar shapes
//ly.img.ubq/shape/lineLines
//ly.img.ubq/shape/vector_pathCustom vector paths

Media Properties#

Configure playback behavior for time-based media like video and audio. Use duration to specify length and looping to enable repeat playback for background music or ambient video.

{
"meta": {
"duration": "30",
"looping": true,
"vectorPath": "M10 10 L90 90"
}
}
PropertyTypeDescription
durationstringDuration in seconds as a string (e.g., "30", "120")
loopingbooleanWhether media should loop continuously. Use for background music or ambient video
vectorPathstringSVG path data for vector shapes

Effect Properties#

Define visual effects that can be applied to design blocks. Effects include filters, blurs, and color adjustments.

{
"meta": {
"effectType": "//ly.img.ubq/effect/lut_filter",
"blurType": "//ly.img.ubq/blur/uniform"
}
}
PropertyTypeDescription
effectTypestringEffect type (e.g., "//ly.img.ubq/effect/lut_filter", "//ly.img.ubq/effect/duotone_filter")
blurTypestringBlur type: "//ly.img.ubq/blur/uniform", "//ly.img.ubq/blur/linear", "//ly.img.ubq/blur/mirrored", "//ly.img.ubq/blur/radial"

Responsive Sources#

The sourceSet property defines multiple resolutions for responsive loading. This enables CE.SDK to load an appropriately sized image based on the display context, reducing bandwidth for thumbnails while providing full resolution when needed.

{
"meta": {
"sourceSet": [
{ "uri": "{{base_url}}/small.jpg", "width": 640, "height": 480 },
{ "uri": "{{base_url}}/medium.jpg", "width": 1280, "height": 960 },
{ "uri": "{{base_url}}/large.jpg", "width": 1920, "height": 1440 }
]
}
}

When a user browses assets in the library panel, CE.SDK loads the smallest appropriate resolution. When the asset is added to the canvas and zoomed in, higher resolutions are loaded on demand. This pattern significantly improves initial load times for asset libraries with many items.

PropertyTypeRequiredDescription
uristringYesSource URI
widthnumberYesSource width in pixels
heightnumberYesSource height in pixels

Asset Payload#

The payload object contains structured data for specialized asset types like colors, fonts, and presets.

PropertyTypeDescription
colorAssetColorColor definition
typefaceTypefaceFont family definition
transformPresetAssetTransformPresetPage size or aspect ratio preset
sourceSetSource[]Responsive sources (same as meta.sourceSet)

Color Payload#

Colors support three color spaces: sRGB, CMYK, and Spot Color. Use sRGB for screen-based designs, CMYK for print workflows, and Spot Color for brand-specific colors that require exact color matching.

sRGB Color:

{
"payload": {
"color": {
"colorSpace": "sRGB",
"r": 0.2,
"g": 0.4,
"b": 0.8
}
}
}

sRGB is the standard color space for web and digital displays. Component values range from 0 to 1, where { r: 1, g: 0, b: 0 } represents pure red.

PropertyTypeRangeDescription
colorSpace"sRGB"Color space identifier
rnumber0–1Red component
gnumber0–1Green component
bnumber0–1Blue component

CMYK Color:

{
"payload": {
"color": {
"colorSpace": "CMYK",
"c": 0.75,
"m": 0.25,
"y": 0.0,
"k": 0.1
}
}
}

CMYK is used for print production. Component values represent ink percentages from 0 to 1, where higher values mean more ink coverage.

PropertyTypeRangeDescription
colorSpace"CMYK"Color space identifier
cnumber0–1Cyan component
mnumber0–1Magenta component
ynumber0–1Yellow component
knumber0–1Black (key) component

Spot Color:

{
"payload": {
"color": {
"colorSpace": "SpotColor",
"name": "Pantone 286 C",
"externalReference": "pantone://286-c",
"representation": {
"colorSpace": "sRGB",
"r": 0.0,
"g": 0.22,
"b": 0.62
}
}
}
}

Spot colors reference named colors from systems like Pantone. The representation provides a screen preview while the actual color is defined by the external reference for accurate print reproduction.

PropertyTypeDescription
colorSpace"SpotColor"Color space identifier
namestringSpot color name
externalReferencestringExternal reference URI
representationAssetRGBColor | AssetCMYKColorScreen/print representation

Typeface Payload#

Defines a font family with multiple font files for different weights and styles. This enables CE.SDK to load the correct font file when text formatting changes.

{
"payload": {
"typeface": {
"name": "Roboto",
"fonts": [
{
"uri": "{{base_url}}/Roboto-Regular.ttf",
"subFamily": "Regular",
"weight": "normal",
"style": "normal"
},
{
"uri": "{{base_url}}/Roboto-Bold.ttf",
"subFamily": "Bold",
"weight": "bold",
"style": "normal"
},
{
"uri": "{{base_url}}/Roboto-Italic.ttf",
"subFamily": "Italic",
"weight": "normal",
"style": "italic"
}
]
}
}
}

Each font entry in the fonts array represents a single font file. When a user applies bold formatting, CE.SDK automatically selects the font entry with weight: "bold". Include all weight and style combinations you want to support.

Typeface Properties:

PropertyTypeRequiredDescription
namestringYesTypeface family name
fontsFont[]YesArray of font definitions

Font Properties:

PropertyTypeRequiredDescription
uristringYesFont file URI (.ttf, .otf, .woff, .woff2)
subFamilystringYesFont subfamily name (e.g., “Regular”, “Bold Italic”)
weightFontWeightNoFont weight
styleFontStyleNoFont style

Font Weight Values: "thin", "extraLight", "light", "normal", "medium", "semiBold", "bold", "extraBold", "heavy"

Font Style Values: "normal", "italic"

Transform Preset Payload#

Defines page size or aspect ratio presets for templates, canvases, and crop tools. Use these to provide users with common format options like social media dimensions or print sizes.

Fixed Size:

{
"payload": {
"transformPreset": {
"type": "FixedSize",
"width": 1080,
"height": 1920,
"designUnit": "Pixel"
}
}
}

Fixed size presets lock both width and height to specific values. Use designUnit to specify whether dimensions are in pixels (for digital), millimeters, or inches (for print).

PropertyTypeDescription
type"FixedSize"Preset type
widthnumberWidth value
heightnumberHeight value
designUnitstringUnit: "Pixel", "Millimeter", or "Inch"

Fixed Aspect Ratio:

{
"payload": {
"transformPreset": {
"type": "FixedAspectRatio",
"width": 16,
"height": 9
}
}
}

Fixed aspect ratio presets maintain proportions while allowing flexible sizing. The width and height values represent the ratio components, not pixel dimensions.

PropertyTypeDescription
type"FixedAspectRatio"Preset type
widthnumberAspect ratio width component
heightnumberAspect ratio height component

Free Aspect Ratio:

{
"payload": {
"transformPreset": {
"type": "FreeAspectRatio"
}
}
}

Free aspect ratio presets allow unrestricted resizing without maintaining proportions.

Base URL Placeholder#

The {{base_url}} placeholder enables portable asset definitions. CE.SDK replaces this placeholder with the actual base path when loading:

  • From URL: The parent directory of the JSON file becomes the base URL
  • From string: You provide the base URL explicitly when loading
{
"meta": {
"uri": "{{base_url}}/images/photo.jpg",
"thumbUri": "{{base_url}}/thumbnails/photo.jpg"
}
}

Asset Type Examples#

Image Asset#

Standard image assets are the most common type, used for photos, illustrations, and background images. They require a blockType of graphic with an image fill.

{
"id": "photo-001",
"label": { "en": "Mountain Landscape" },
"tags": { "en": ["nature", "mountain"] },
"meta": {
"uri": "{{base_url}}/mountain.jpg",
"thumbUri": "{{base_url}}/mountain-thumb.jpg",
"mimeType": "image/jpeg",
"blockType": "//ly.img.ubq/graphic",
"fillType": "//ly.img.ubq/fill/image",
"width": 1920,
"height": 1280
}
}

Video Asset#

Video assets include duration information and use a video fill type. Set looping to true for videos that should repeat continuously.

{
"id": "video-001",
"label": { "en": "Intro Animation" },
"meta": {
"uri": "{{base_url}}/intro.mp4",
"thumbUri": "{{base_url}}/intro-thumb.jpg",
"mimeType": "video/mp4",
"blockType": "//ly.img.ubq/graphic",
"fillType": "//ly.img.ubq/fill/video",
"width": 1920,
"height": 1080,
"duration": "5",
"looping": false
}
}

Audio Asset#

Audio assets use the audio block type and don’t require visual dimensions. Set looping to true for background music that should repeat continuously throughout the design.

{
"id": "audio-001",
"label": { "en": "Background Music" },
"meta": {
"uri": "{{base_url}}/music.mp3",
"mimeType": "audio/mpeg",
"blockType": "//ly.img.ubq/audio",
"duration": "120",
"looping": true
}
}

Sticker Asset#

Stickers are vector graphics that maintain quality at any size. They use the vector_path shape type and typically reference SVG files.

{
"id": "sticker-001",
"label": { "en": "Star Badge" },
"meta": {
"uri": "{{base_url}}/star.svg",
"thumbUri": "{{base_url}}/star-thumb.png",
"mimeType": "image/svg+xml",
"blockType": "//ly.img.ubq/graphic",
"shapeType": "//ly.img.ubq/shape/vector_path",
"width": 200,
"height": 200
}
}

Template Asset#

Templates are complete design scenes that can be loaded as starting points. Use kind: "template" to identify them in the UI.

{
"id": "template-001",
"label": { "en": "Social Media Story" },
"meta": {
"uri": "{{base_url}}/story-template.scene",
"thumbUri": "{{base_url}}/story-thumb.jpg",
"kind": "template",
"width": 1080,
"height": 1920
}
}

Crop Preset Asset#

Crop presets define aspect ratios for the crop tool. Use transformPreset in the payload to specify the ratio without fixed pixel dimensions.

{
"id": "crop-square",
"label": { "en": "Square" },
"groups": ["social"],
"payload": {
"transformPreset": {
"type": "FixedAspectRatio",
"width": 1,
"height": 1
}
}
}

Page Format Preset Asset#

Page format presets define canvas sizes for new designs. Use FixedSize to specify exact dimensions in pixels, millimeters, or inches.

{
"id": "format-instagram-story",
"label": { "en": "Instagram Story" },
"groups": ["social"],
"meta": {
"thumbUri": "{{base_url}}/instagram-story-thumb.jpg"
},
"payload": {
"transformPreset": {
"type": "FixedSize",
"width": 1080,
"height": 1920,
"designUnit": "Pixel"
}
}
}

Troubleshooting#

IssueSolution
Assets not appearingVerify version, id, and assets fields exist at the top level
Invalid assetEnsure each asset has a unique id
Missing thumbnailsCheck thumbUri points to accessible image URLs
Base URL not resolvingUse exact {{base_url}} syntax (double curly braces)
CORS errorsConfigure server headers to allow cross-origin requests
Wrong block createdVerify meta.blockType matches the intended design block