Skip to main content
This guide covers only the simplest steps to run an LLM on your device. For a detailed, step-by-step explanation of how everything works, see the full integration guide.
1

Make a new project folder

mkdir demo && cd demo
2

Initialize with pnpm

pnpm init
3

Install dependencies

pnpm add typescript ts-node @types/node -D
pnpm add @trymirai/uzu
4

Initialize a tsconfig.json

{
    "compilerOptions": {
        "target": "es2020",
        "module": "commonjs",
        "moduleResolution": "node",
        "strict": true,
        "esModuleInterop": true,
        "outDir": "dist",
        "types": [
            "node"
        ]
    },
    "include": [
        "*.ts"
    ]
}
5

Get an API key

Go to Platform and follow this guide.
6

Create main.ts

Don’t forget to add your API key.
import Engine from '@trymirai/uzu';

async function main() {
    const output = await Engine
        .create('API_KEY')
        .chatModel('Qwen/Qwen3-0.6B')
        .download((update) => {
            console.log('Progress:', update.progress);
        })
        .reply('Tell me a short, funny story about a robot');
    console.log(output.text.original);
}

main().catch((error) => {
    console.error(error);
});
7

Run the snippet

pnpm ts-node main.ts
Now that we’ve tried the simplest snippet, let’s take a look at the step-by-step integration guide.