Making images and videos

Pick a mode, send an image or a prompt, add tags. The same pipelines as Luce's canvas.

Modes and tags

Renders run in a mode — “3D Viewport to Render”, “Sketch to Render” and the rest of your studio's modes. GET /v1/modes lists them with their tag_groups: the choices the app shows (lighting, season, scene…). Send the labels you want in tags.

curl https://www.luce.space/api/v1/modes \
  -H "Authorization: Bearer $LUCE_API_KEY"

Mode custom skips the presets and renders your prompt as written. Without an image, /v1/images/generate makes an image from the prompt alone.

From one job to the next

Any image input accepts the id of an earlier job, so steps chain without downloading anything: render a viewport, upscale the render, then animate it.

const render = await luce("/images/generate", { mode: "comfy_render_2", image: "file_O57EAQfNx6UbXJxr", tags: ["Golden Hour"] });
await waitForJob(render.id);
const big = await luce("/images/upscale", { image: render.id, scale: 4 });
await waitForJob(big.id);
const clip = await luce("/videos/generate", { image: big.id, prompt: "slow dolly in", duration: 6 });

Every job type

EndpointInputsPriced by
/v1/images/generateimage and/or prompt, mode, tagsmode, quality, size
/v1/images/editimage, prompt, optional maskquality, size
/v1/images/upscaleimage, 2× or 4×scale and the input's size
/v1/images/multi-anglesimage, rotate, tilt, zoomone price
/v1/videos/generatefirst frame, prompt, optional last frameseconds × resolution
/v1/videos/editan earlier video job, promptlike a new video of that length
/v1/videos/upscalevideo, modethe mode
Making images and videos — Luce API