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
| Endpoint | Inputs | Priced by |
|---|---|---|
/v1/images/generate | image and/or prompt, mode, tags | mode, quality, size |
/v1/images/edit | image, prompt, optional mask | quality, size |
/v1/images/upscale | image, 2× or 4× | scale and the input's size |
/v1/images/multi-angles | image, rotate, tilt, zoom | one price |
/v1/videos/generate | first frame, prompt, optional last frame | seconds × resolution |
/v1/videos/edit | an earlier video job, prompt | like a new video of that length |
/v1/videos/upscale | video, mode | the mode |