Builtin Library
README.md
anim_gen (service)
Text-to-motion generation via the
Uthana API (the
async text-to-motion-3.0 model). A .service asset — a plain Luau module,
resolvable as @builtin::services.anim_gen, exposing a generator that runs
through the credit-metered service path.
Operations
generate({ prompt, format?, fps? })— text-to-motion.formatis'glb'(default) or'fbx';fpsis24 / 30 / 60(optional). Submits the job, polls it to completion, downloads the retargetable humanoid clip, and writes it under/zero/source/generated/animations/.
Using it
local anim = asset.resolve("anim_gen", "service")
print(anim:cost(), anim:balance()) -- budget before spending
local g = anim:invoke({ prompt = "walk forward then wave hello" })
-- Generation is async. Watch the run until it settles; a completed row's
-- `asset` is the finished, spawnable clip.
local row = tools.use("services", "status", { id = g.id })
while row ~= nil and row.status ~= "completed" and row.status ~= "failed" do
task.wait(5)
row = tools.use("services", "status", { id = g.id })
end
print(row.status, row.asset)
The handle's asset_path is where the run directs the raw generated file; the
asset it becomes is the completed status row's asset, which is what to spawn.
The clip is a standard humanoid animation, retargetable onto any avatar rig.
Cost
generate costs credits (see :cost()); the exact amount charged is returned
on the generation handle. Check :balance() first.