RunAnywhere.images generates an image from a prompt.
Options
Watching it appear
WithreportPartials on, the stream emits intermediate images, so you can show the picture
resolving rather than a spinner.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Generate images on-device
RunAnywhere.images generates an image from a prompt.
const result = await RunAnywhere.images.generate('A lighthouse at dusk, oil painting', {
negativePrompt: 'blurry, text, watermark',
width: 512,
height: 512,
steps: 20,
seed: 42,
})
| Field | Default | Meaning |
|---|---|---|
negativePrompt | none | What to avoid |
width | model default | Output width |
height | model default | Output height |
steps | model default | Denoising steps; more is slower and usually better |
guidanceScale | model default | How closely to follow the prompt |
seed | random | Fix it to reproduce an image |
mode | generate | Generate or inpaint |
reportPartials | false | Emit intermediate images while streaming |
reportPartials on, the stream emits intermediate images, so you can show the picture
resolving rather than a spinner.
for await (const event of RunAnywhere.images.generateStream('A lighthouse at dusk', {
steps: 20,
reportPartials: true,
})) {
if (event.type === 'partial') showPreview(event.image)
if (event.type === 'completed') showFinal(event.result)
}
const capabilities = await RunAnywhere.capabilities()