Urgent.News

What's breaking now, across thousands of outlets.

Tech

How to Generate Editable Multi-Layer Fabric.js Templates via REST API (Prisma V1.0 Tutorial)

Most image APIs give you a PNG. If your product needs designs that people keep editing, like retyping a headline, swapping a photo or translating a banner, a PNG is a dead end. This tutorial generates a complete design with Prisma V1.0 and gets it back as an editable multi-layer template you can load into Fabric.js. What comes back: canvas JSON in the legacy-fabric-v1 format, with live text…

Generating editable multi-layer Fabric.js templates via REST API requires using Prisma V1.0 and following a specific process. PNG images are not ideal for designs that need editing, such as retyping a headline or swapping a photo, as they are a dead end.

The API provides canvas JSON in the legacy-fabric-v1 format, which includes live text objects, native shapes, and image objects. It also offers private raster layers (PNG) and a JPEG preview, along with your own photos placed as separate image objects (up to five).

Before starting, you need a Prisma developer workspace, an API key with specific permissions, and Prisma Credits. The process involves submitting a generation request, polling the job, downloading the editable template, and loading it into Fabric.js. The API response includes a job ID, prompt, aspect ratio, material images, reference image, and idempotency key header.

When polling the job, handle rate limits and errors appropriately, and download the template files from the API on your backend server to ensure security. Load the template JSON into Fabric.js for users to edit the text, shapes, and photos as needed. Be aware of the limits and good habits, such as respecting the Retry-After header and handling errors effectively.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Line Art Breaks Upscalers in a Way Photos Never Do

Take a manga panel, a webtoon strip, or a flat-shaded anime still and run it through the same upscaler you use on photographs.

  • Line art differs from photos in signal type, having only ink and paper values.
  • Upscaling line art distorts edges, creating fuzzy or dotted patterns.
  • Sub-pixel information manipulation causes noticeable artifacts in line art.

DPO vs RLHF: which should you use to align a model?

Use DPO first: it learns from the same preference labels as RLHF but drops the reward model and the online sampling loop, so it is cheaper, faster and easier to debug.

  • DPO is cheaper, faster, and easier to debug than RLHF
  • RLHF requires a reward model and PPO loop, making it more expensive and time-consuming
  • DPO often matches or improves response quality in summarization and single-turn dialogue

A 15-minute nap alarm, one tap away

https://play.google.com/store/apps/details?id=com.droidactor.alarm A short rest after lunch should not need another alarm's hour and minute. Open Quick nap in Dotori Alarm Clock.

  • Quick nap feature in Dotori Alarm Clock app
  • 15-minute nap alarm scheduled with one tap
  • Nap alarm uses default settings and snooze limit

Checking a Four-Direction Sprite Sheet Before Importing It

Disclosure: This article was drafted with AI writing assistance. The images come from an existing SpriteSheetTool demonstration, a product I am associated with.

  • Verify grid geometry and cell arrangement before importing
  • Map each direction (North, East, South, West) with four frames each
  • Test character consistency and loop transitions after setup

More from Saturday 14 November →