RunAnywhere.images generates an image from a prompt.
val result = RunAnywhere.images.generate( "A lighthouse at dusk, oil painting", ImageOptions( negativePrompt = "blurry, text, watermark", width = 512, height = 512, steps = 20, seed = 42 ))
Options
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
Watching it appear
With reportPartials on, the stream emits intermediate images, so you can show the picture
resolving rather than a spinner.
RunAnywhere.images.generateStream( "A lighthouse at dusk", ImageOptions(steps = 20, reportPartials = true)).collect { event -> when (event) { is ImageEvent.Partial -> preview = event.image is ImageEvent.Completed -> final = event.result else -> {} }}
Reproducing an image
Fix the seed and every other option, and the same prompt produces the same image. Without a
fixed seed, it will not.
Cost
Image generation is the heaviest thing in the SDK. A 512×512 image at 20 steps takes far longer
than a text completion and warms the device noticeably. Run one at a time, show progress, allow
cancellation, and do not put it on a timer.
Availability
Check before offering it:
val capabilities = RunAnywhere.capabilities()
A diffusion model has to be registered and a backend has to serve it. The namespace existing
does not mean the catalog has an entry.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"RunAnywhere Docs","description":"Docs for Wally, frontier-scale open models behind an OpenAI-compatible API, and the open-source RunAnywhere on-device SDKs.","colors":{"primary":"#fd7014","light":"#fd7014","dark":"#fd7014"},"logo":{"light":"https://mintcdn.com/runanywhere/suKXeVfMdD9DOb-9/logo/mark.svg?fit=max\u0026auto=format\u0026n=suKXeVfMdD9DOb-9\u0026q=85\u0026s=0d71d113ea75918af951b07510e75dd1","dark":"https://mintcdn.com/runanywhere/suKXeVfMdD9DOb-9/logo/mark.svg?fit=max\u0026auto=format\u0026n=suKXeVfMdD9DOb-9\u0026q=85\u0026s=0d71d113ea75918af951b07510e75dd1"},"favicon":"https://mintcdn.com/runanywhere/suKXeVfMdD9DOb-9/favicon.svg?fit=max\u0026auto=format\u0026n=suKXeVfMdD9DOb-9\u0026q=85\u0026s=e2f5189928dfba3c0e4b5dcc45e29618","appearance":{"default":"dark","strict":true},"background":{"color":{"light":"#0d0c0b","dark":"#0d0c0b"}},"navbar":{"links":[{"href":"https://console.runanywhere.ai","label":"Console"},{"href":"https://calendly.com/sanchitmonga22/30min","label":"Talk to us"},{"href":"https://github.com/RunanywhereAI/runanywhere-sdks","type":"github"}],"primary":{"type":"button","label":"Get started","href":"https://console.runanywhere.ai"}},"footer":{"socials":{"website":"https://runanywhere.ai","github":"https://github.com/RunanywhereAI/runanywhere-sdks","x":"https://x.com/runanywhereai","linkedin":"https://www.linkedin.com/company/runanywhere","discord":"https://discord.gg/Qh3pkkDJWj"}},"seo":{"metatags":{"og:site_name":"RunAnywhere Docs","og:image":"https://runanywhere.ai/share/docs.png","og:image:type":"image/png","og:image:width":"1200","og:image:height":"630","og:image:alt":"The word Docs in a field of orange glyphs, beside the line: one CLI and one API key for frontier open models.","og:video":"https://runanywhere.ai/share/docs.mp4","og:video:secure_url":"https://runanywhere.ai/share/docs.mp4","og:video:type":"video/mp4","og:video:width":"1200","og:video:height":"630","twitter:card":"summary_large_image","twitter:image":"https://runanywhere.ai/share/docs.png"}},"fonts":{"heading":{"family":"Source Serif 4 Variable","weight":360,"source":"fonts/source-serif-4-latin.woff2","format":"woff2"},"body":{"family":"Host Grotesk Variable","weight":450,"source":"fonts/host-grotesk-latin.woff2","format":"woff2"}},"icons":{"library":"fontawesome"},"styling":{"eyebrows":"breadcrumbs","codeblocks":{"theme":"css-variables"},"latex":false},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"runanywhere","hasAudioNarration":false,"actualSubdomain":"runanywhere","customDomains":["docs.runanywhere.ai"],"gitSource":{"type":"github","owner":"runanywhereai","repo":"runanywhere-marketing","deployBranch":"main","contentDirectory":"mintlify_docs","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6b0b4d695ebf995bebc8f7e7","clientVersion":"0.0.4410","searchFilterCounts":[{"language":"default","tag":"On-device SDKs","count":172},{"language":"default","tag":"Speech","count":54},{"language":"default","tag":"Text","count":36},{"language":"default","tag":"Get started","count":29},{"language":"default","tag":"Electron","count":28},{"language":"default","tag":"Flutter","count":28},{"language":"default","tag":"Kotlin","count":28},{"language":"default","tag":"React Native","count":28},{"language":"default","tag":"Swift","count":28},{"language":"default","tag":"Web","count":28}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","href":"/_mintlify/custom/runanywhere/479d09cce8335c45/style.css"}]}
{"page":{"pagePath":"kotlin/images","slug":"/kotlin/images","pageMetadata":{"title":"Image Generation","description":"Generate images on-device","icon":"image","href":"/kotlin/images"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Generate images on-device\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[_jsx(_components.code,{children:`RunAnywhere.images`}),` generates an image from a prompt.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`kotlin`,children:_jsx(_components.pre,{className:`shiki shiki-themes css-variables css-variables`,style:{backgroundColor:`var(--mint-background)`,\"--shiki-dark-bg\":`var(--mint-background)`,color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},language:`kotlin`,children:_jsxs(_components.code,{language:`kotlin`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:`val`}),_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` result `}),_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:`=`}),_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` RunAnywhere.images.`}),_jsx(_components.span,{style:{color:`var(--mint-token-function, #0068d6)`,\"--shiki-dark\":`var(--mint-token-function, #0068d6)`},children:`generate`}),_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-token-string-expression, #297a3a)`,\"--shiki-dark\":`var(--mint-token-string-expression, #297a3a)`},children:` \"A lighthouse at dusk, oil painting\"`}),_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-token-function, #0068d6)`,\"--shiki-dark\":`var(--mint-token-function, #0068d6)`},children:` ImageOptions`}),_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` negativePrompt `}),_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:`=`}),_jsx(_components.span,{style:{color:`var(--mint-token-string-expression, #297a3a)`,\"--shiki-dark\":`var(--mint-token-string-expression, #297a3a)`},children:` \"blurry, text, watermark\"`}),_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` width `}),_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:`=`}),_jsx(_components.span,{style:{color:`var(--mint-token-constant, #171717)`,\"--shiki-dark\":`var(--mint-token-constant, #171717)`},children:` 512`}),_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` height `}),_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:`=`}),_jsx(_components.span,{style:{color:`var(--mint-token-constant, #171717)`,\"--shiki-dark\":`var(--mint-token-constant, #171717)`},children:` 512`}),_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` steps `}),_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:`=`}),_jsx(_components.span,{style:{color:`var(--mint-token-constant, #171717)`,\"--shiki-dark\":`var(--mint-token-constant, #171717)`},children:` 20`}),_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` seed `}),_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:`=`}),_jsx(_components.span,{style:{color:`var(--mint-token-constant, #171717)`,\"--shiki-dark\":`var(--mint-token-constant, #171717)`},children:` 42`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` )`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:`)`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`options`,children:`Options`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`negativePrompt`})}),_jsx(_components.td,{children:`none`}),_jsx(_components.td,{children:`What to avoid`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`width`})}),_jsx(_components.td,{children:`model default`}),_jsx(_components.td,{children:`Output width`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`height`})}),_jsx(_components.td,{children:`model default`}),_jsx(_components.td,{children:`Output height`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`steps`})}),_jsx(_components.td,{children:`model default`}),_jsx(_components.td,{children:`Denoising steps; more is slower and usually better`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`guidanceScale`})}),_jsx(_components.td,{children:`model default`}),_jsx(_components.td,{children:`How closely to follow the prompt`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`seed`})}),_jsx(_components.td,{children:`random`}),_jsx(_components.td,{children:`Fix it to reproduce an image`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`mode`})}),_jsx(_components.td,{children:`generate`}),_jsx(_components.td,{children:`Generate or inpaint`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`reportPartials`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`false`})}),_jsx(_components.td,{children:`Emit intermediate images while streaming`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`watching-it-appear`,children:`Watching it appear`}),`\n`,_jsxs(_components.p,{children:[`With `,_jsx(_components.code,{children:`reportPartials`}),` on, the stream emits intermediate images, so you can show the picture\nresolving rather than a spinner.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`kotlin`,children:_jsx(_components.pre,{className:`shiki shiki-themes css-variables css-variables`,style:{backgroundColor:`var(--mint-background)`,\"--shiki-dark-bg\":`var(--mint-background)`,color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},language:`kotlin`,children:_jsxs(_components.code,{language:`kotlin`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:`RunAnywhere.images.`}),_jsx(_components.span,{style:{color:`var(--mint-token-function, #0068d6)`,\"--shiki-dark\":`var(--mint-token-function, #0068d6)`},children:`generateStream`}),_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-token-string-expression, #297a3a)`,\"--shiki-dark\":`var(--mint-token-string-expression, #297a3a)`},children:` \"A lighthouse at dusk\"`}),_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-token-function, #0068d6)`,\"--shiki-dark\":`var(--mint-token-function, #0068d6)`},children:` ImageOptions`}),_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:`(steps `}),_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:`=`}),_jsx(_components.span,{style:{color:`var(--mint-token-constant, #171717)`,\"--shiki-dark\":`var(--mint-token-constant, #171717)`},children:` 20`}),_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:`, reportPartials `}),_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:`=`}),_jsx(_components.span,{style:{color:`var(--mint-token-constant, #171717)`,\"--shiki-dark\":`var(--mint-token-constant, #171717)`},children:` true`}),_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:`).`}),_jsx(_components.span,{style:{color:`var(--mint-token-function, #0068d6)`,\"--shiki-dark\":`var(--mint-token-function, #0068d6)`},children:`collect`}),_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` { event `}),_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:`->`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:` when`}),_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` (event) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:` is`}),_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` ImageEvent.Partial `}),_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:`->`}),_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` preview `}),_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:`=`}),_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` event.image`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:` is`}),_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` ImageEvent.Completed `}),_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:`->`}),_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:` final`}),_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:` =`}),_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` event.result`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:` else`}),_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:` ->`}),_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` {}`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`reproducing-an-image`,children:`Reproducing an image`}),`\n`,_jsx(_components.p,{children:`Fix the seed and every other option, and the same prompt produces the same image. Without a\nfixed seed, it will not.`}),`\n`,_jsx(Heading,{level:`2`,id:`cost`,children:`Cost`}),`\n`,_jsx(_components.p,{children:`Image generation is the heaviest thing in the SDK. A 512×512 image at 20 steps takes far longer\nthan a text completion and warms the device noticeably. Run one at a time, show progress, allow\ncancellation, and do not put it on a timer.`}),`\n`,_jsx(Heading,{level:`2`,id:`availability`,children:`Availability`}),`\n`,_jsx(_components.p,{children:`Check before offering it:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`kotlin`,children:_jsx(_components.pre,{className:`shiki shiki-themes css-variables css-variables`,style:{backgroundColor:`var(--mint-background)`,\"--shiki-dark-bg\":`var(--mint-background)`,color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},language:`kotlin`,children:_jsxs(_components.code,{language:`kotlin`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:`val`}),_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` capabilities `}),_jsx(_components.span,{style:{color:`var(--mint-token-keyword, #bd2864)`,\"--shiki-dark\":`var(--mint-token-keyword, #bd2864)`},children:`=`}),_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:` RunAnywhere.`}),_jsx(_components.span,{style:{color:`var(--mint-token-function, #0068d6)`,\"--shiki-dark\":`var(--mint-token-function, #0068d6)`},children:`capabilities`}),_jsx(_components.span,{style:{color:`var(--mint-foreground)`,\"--shiki-dark\":`var(--mint-foreground)`},children:`()`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`A diffusion model has to be registered and a backend has to serve it. The namespace existing\ndoes not mean the catalog has an entry.`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":{"theme":"css-variables"},"config":{},"pageMetadata":{"title":"Image Generation","description":"Generate images on-device","icon":"image","href":"/kotlin/images"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Options","slug":"options","depth":2,"children":[]},{"title":"Watching it appear","slug":"watching-it-appear","depth":2,"children":[]},{"title":"Reproducing an image","slug":"reproducing-an-image","depth":2,"children":[]},{"title":"Cost","slug":"cost","depth":2,"children":[]},{"title":"Availability","slug":"availability","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"runanywhere","siteName":"RunAnywhere Docs","title":"Image Generation - RunAnywhere Docs","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-25T07:26:26.393Z","originalFileLocation":"kotlin/images.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"dark\";if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Generate images on-device\">\u003cmeta data-mint-head name=\"application-name\" content=\"RunAnywhere Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/runanywhere/NJ67QXmGzo8K5fRq/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/runanywhere/NJ67QXmGzo8K5fRq/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/runanywhere/NJ67QXmGzo8K5fRq/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/runanywhere/NJ67QXmGzo8K5fRq/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/runanywhere/NJ67QXmGzo8K5fRq/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/runanywhere/NJ67QXmGzo8K5fRq/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/runanywhere/NJ67QXmGzo8K5fRq/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/runanywhere/NJ67QXmGzo8K5fRq/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/runanywhere/NJ67QXmGzo8K5fRq/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Image Generation - RunAnywhere Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Generate images on-device\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"RunAnywhere Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.runanywhere.ai/kotlin/images\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://runanywhere.ai/share/docs.png\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Image Generation - RunAnywhere Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Generate images on-device\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://runanywhere.ai/share/docs.png\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/runanywhere/NJ67QXmGzo8K5fRq/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"RunAnywhere Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#fd7014\">\u003cmeta data-mint-head name=\"og:image:type\" content=\"image/png\">\u003cmeta data-mint-head name=\"og:image:alt\" content=\"The word Docs in a field of orange glyphs, beside the line: one CLI and one API key for frontier open models.\">\u003cmeta data-mint-head name=\"og:video\" content=\"https://runanywhere.ai/share/docs.mp4\">\u003cmeta data-mint-head name=\"og:video:secure_url\" content=\"https://runanywhere.ai/share/docs.mp4\">\u003cmeta data-mint-head name=\"og:video:type\" content=\"video/mp4\">\u003cmeta data-mint-head name=\"og:video:width\" content=\"1200\">\u003cmeta data-mint-head name=\"og:video:height\" content=\"630\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.runanywhere.ai/kotlin/images\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/kotlin/images.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.runanywhere.ai/#organization\",\"name\":\"RunAnywhere Docs\",\"url\":\"https://docs.runanywhere.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/runanywhere/suKXeVfMdD9DOb-9/logo/mark.svg?fit=max\u0026auto=format\u0026n=suKXeVfMdD9DOb-9\u0026q=85\u0026s=0d71d113ea75918af951b07510e75dd1\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.runanywhere.ai#website\",\"name\":\"RunAnywhere Docs\",\"url\":\"https://docs.runanywhere.ai\",\"publisher\":{\"@id\":\"https://docs.runanywhere.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.runanywhere.ai/kotlin/images#webpage\",\"url\":\"https://docs.runanywhere.ai/kotlin/images\",\"name\":\"Image Generation\",\"description\":\"Generate images on-device\",\"dateModified\":\"2026-10-25T07:26:26.393Z\",\"isPartOf\":{\"@id\":\"https://docs.runanywhere.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.runanywhere.ai/kotlin/images#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.runanywhere.ai/kotlin/images#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Vision\",\"item\":\"https://docs.runanywhere.ai/kotlin/vlm\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Image Generation\",\"item\":\"https://docs.runanywhere.ai/kotlin/images\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.runanywhere.ai/kotlin/images#article\",\"headline\":\"Image Generation\",\"name\":\"Image Generation\",\"description\":\"Generate images on-device\",\"url\":\"https://docs.runanywhere.ai/kotlin/images\",\"mainEntityOfPage\":{\"@id\":\"https://docs.runanywhere.ai/kotlin/images#webpage\"},\"image\":\"https://runanywhere.ai/share/docs.png\",\"dateModified\":\"2026-10-25T07:26:26.393Z\",\"publisher\":{\"@id\":\"https://docs.runanywhere.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.runanywhere.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"RunAnywhere Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"RunAnywhere Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/kotlin/images.md","siteName":"RunAnywhere Docs","nav":{"global":null,"tabs":[{"tab":"Wally","pages":[{"title":"Wally","href":""}]},{"tab":"API reference","pages":[{"title":"API reference","href":"/api-reference/create-a-chat-completion"}]},{"tab":"On-device SDKs","dropdowns":[{"dropdown":"All platforms","icon":"mobile-screen","description":"Overview and quickstart","groups":[{"group":"Get started","pages":[{"sidebarTitle":"Overview","title":"On-device SDK","icon":"mobile-screen","href":"/sdks"},{"title":"On-device quickstart","sidebarTitle":"Quickstart","icon":"rocket","href":"/quickstart"}]},{"group":"Guides","pages":[{"sidebarTitle":"Porting","title":"Porting between platforms","icon":"arrow-right-arrow-left","href":"/porting"},{"title":"Expo Integration Guide","icon":"wand-magic-sparkles","href":"/vibe-coding/expo-integration"}]}]},{"dropdown":"Swift","icon":"swift","description":"iOS, macOS","groups":[{"group":"Get started","pages":[{"title":"Introduction","icon":"swift","href":"/swift/introduction"},{"title":"Installation","icon":"download","href":"/swift/installation"},{"title":"Quick Start","icon":"rocket","href":"/swift/quick-start"},{"title":"Models","icon":"cube","href":"/swift/models"}]},{"group":"Text","pages":[{"title":"Chat","icon":"message","href":"/swift/llm/chat"},{"title":"generate()","icon":"chart-line","href":"/swift/llm/generate"},{"title":"generateStream()","icon":"water","href":"/swift/llm/stream"},{"title":"System Prompts","icon":"user-gear","href":"/swift/llm/system-prompts"},{"title":"Structured Output","icon":"brackets-curly","href":"/swift/structured-output"},{"title":"Tool Calling","icon":"wrench","href":"/swift/tool-calling"}]},{"group":"Speech","pages":[{"title":"transcribe()","icon":"microphone","href":"/swift/stt/transcribe"},{"title":"Streaming STT","icon":"wave-sine","href":"/swift/stt/stream"},{"title":"STT Options","icon":"sliders","href":"/swift/stt/options"},{"title":"synthesize()","icon":"volume-high","href":"/swift/tts/synthesize"},{"title":"Streaming TTS","icon":"water","href":"/swift/tts/stream"},{"title":"Voices","icon":"user","href":"/swift/tts/voices"},{"title":"Voice Activity Detection","icon":"waveform","href":"/swift/vad"},{"title":"Voice Agent","icon":"robot","href":"/swift/voice-agent"},{"title":"Diarization","icon":"users","href":"/swift/diarization"}]},{"group":"Vision","pages":[{"title":"Vision Language Models","icon":"eye","href":"/swift/vlm"},{"title":"Image Generation","icon":"image","href":"/swift/images"},{"title":"Segmentation","icon":"object-group","href":"/swift/segmentation"}]},{"group":"Retrieval","pages":[{"title":"RAG, Embeddings, and Reranking","icon":"database","href":"/swift/rag"},{"title":"Embeddings \u0026 Reranking","icon":"vector-square","href":"/swift/embeddings"}]},{"group":"Advanced","pages":[{"title":"LoRA Adapters","icon":"layer-group","href":"/swift/lora"},{"title":"Configuration","icon":"gear","href":"/swift/configuration"},{"title":"Error Handling","icon":"triangle-exclamation","href":"/swift/error-handling"},{"title":"Best Practices","icon":"lightbulb","href":"/swift/best-practices"}]}]},{"dropdown":"Kotlin","icon":"android","description":"Android","groups":[{"group":"Get started","pages":[{"title":"Introduction","icon":"android","href":"/kotlin/introduction"},{"title":"Installation","icon":"download","href":"/kotlin/installation"},{"title":"Quick Start","icon":"rocket","href":"/kotlin/quick-start"},{"title":"Models","icon":"cube","href":"/kotlin/models"}]},{"group":"Text","pages":[{"title":"Chat","icon":"message","href":"/kotlin/llm/chat"},{"title":"generate()","icon":"chart-line","href":"/kotlin/llm/generate"},{"title":"generateStream()","icon":"water","href":"/kotlin/llm/stream"},{"title":"System Prompts","icon":"user-gear","href":"/kotlin/llm/system-prompts"},{"title":"Structured Output","icon":"brackets-curly","href":"/kotlin/structured-output"},{"title":"Tool Calling","icon":"wrench","href":"/kotlin/tool-calling"}]},{"group":"Speech","pages":[{"title":"transcribe()","icon":"microphone","href":"/kotlin/stt/transcribe"},{"title":"Streaming STT","icon":"wave-sine","href":"/kotlin/stt/stream"},{"title":"STT Options","icon":"sliders","href":"/kotlin/stt/options"},{"title":"synthesize()","icon":"volume-high","href":"/kotlin/tts/synthesize"},{"title":"Streaming TTS","icon":"water","href":"/kotlin/tts/stream"},{"title":"Voices","icon":"user","href":"/kotlin/tts/voices"},{"title":"Voice Activity Detection","icon":"waveform","href":"/kotlin/vad"},{"title":"Voice Agent","icon":"robot","href":"/kotlin/voice-agent"},{"title":"Diarization","icon":"users","href":"/kotlin/diarization"}]},{"group":"Vision","pages":[{"title":"Vision Language Models","description":"Ask a model about an image","icon":"eye","href":"/kotlin/vlm"},{"title":"Image Generation","icon":"image","href":"/kotlin/images"},{"title":"Segmentation","description":"Find and label regions in an image","icon":"object-group","href":"/kotlin/segmentation"}]},{"group":"Retrieval","pages":[{"title":"RAG","icon":"book","href":"/kotlin/rag"},{"title":"Embeddings \u0026 Reranking","icon":"vector-square","href":"/kotlin/embeddings"}]},{"group":"Advanced","pages":[{"title":"LoRA Adapters","icon":"layer-group","href":"/kotlin/lora"},{"title":"Configuration","icon":"gear","href":"/kotlin/configuration"},{"title":"Error Handling","icon":"triangle-exclamation","href":"/kotlin/error-handling"},{"title":"Best Practices","icon":"lightbulb","href":"/kotlin/best-practices"}]}]},{"dropdown":"React Native","icon":"react","description":"iOS, Android","groups":[{"group":"Get started","pages":[{"title":"Introduction","icon":"react","href":"/react-native/introduction"},{"title":"Installation","icon":"download","href":"/react-native/installation"},{"title":"Quick Start","icon":"rocket","href":"/react-native/quick-start"},{"title":"Models","icon":"cube","href":"/react-native/models"}]},{"group":"Text","pages":[{"title":"Chat","icon":"message","href":"/react-native/llm/chat"},{"title":"generate()","icon":"chart-line","href":"/react-native/llm/generate"},{"title":"generateStream()","icon":"water","href":"/react-native/llm/stream"},{"title":"System Prompts","icon":"user-gear","href":"/react-native/llm/system-prompts"},{"title":"Structured Output","icon":"brackets-curly","href":"/react-native/structured-output"},{"title":"Tool Calling","icon":"wrench","href":"/react-native/tool-calling"}]},{"group":"Speech","pages":[{"title":"transcribe()","icon":"microphone","href":"/react-native/stt/transcribe"},{"title":"Streaming STT","icon":"wave-sine","href":"/react-native/stt/stream"},{"title":"STT Options","icon":"sliders","href":"/react-native/stt/options"},{"title":"synthesize()","icon":"volume-high","href":"/react-native/tts/synthesize"},{"title":"Streaming TTS","icon":"water","href":"/react-native/tts/stream"},{"title":"Voices","icon":"user","href":"/react-native/tts/voices"},{"title":"Voice Activity Detection","icon":"waveform","href":"/react-native/vad"},{"title":"Voice Agent","icon":"robot","href":"/react-native/voice-agent"},{"title":"Diarization","icon":"users","href":"/react-native/diarization"}]},{"group":"Vision","pages":[{"title":"Vision Language Models","icon":"eye","href":"/react-native/vlm"},{"title":"Image Generation","icon":"image","href":"/react-native/images"},{"title":"Segmentation","icon":"object-group","href":"/react-native/segmentation"}]},{"group":"Retrieval","pages":[{"title":"RAG","icon":"database","href":"/react-native/rag"},{"title":"Embeddings \u0026 Reranking","icon":"vector-square","href":"/react-native/embeddings"}]},{"group":"Advanced","pages":[{"title":"LoRA Adapters","icon":"layer-group","href":"/react-native/lora"},{"title":"Configuration","icon":"gear","href":"/react-native/configuration"},{"title":"Error Handling","icon":"triangle-exclamation","href":"/react-native/error-handling"},{"title":"Best Practices","icon":"lightbulb","href":"/react-native/best-practices"}]}]},{"dropdown":"Flutter","icon":"flutter","description":"iOS, Android","groups":[{"group":"Get started","pages":[{"title":"Introduction","icon":"flutter","href":"/flutter/introduction"},{"title":"Installation","icon":"download","href":"/flutter/installation"},{"title":"Quick Start","icon":"rocket","href":"/flutter/quick-start"},{"title":"Models","icon":"cube","href":"/flutter/models"}]},{"group":"Text","pages":[{"title":"Chat","icon":"message","href":"/flutter/llm/chat"},{"title":"generate()","icon":"chart-line","href":"/flutter/llm/generate"},{"title":"generateStream()","icon":"water","href":"/flutter/llm/stream"},{"title":"System Prompts","icon":"user-gear","href":"/flutter/llm/system-prompts"},{"title":"Structured Output","icon":"brackets-curly","href":"/flutter/structured-output"},{"title":"Tool Calling","icon":"wrench","href":"/flutter/tool-calling"}]},{"group":"Speech","pages":[{"title":"transcribe()","icon":"microphone","href":"/flutter/stt/transcribe"},{"title":"Streaming STT","icon":"wave-sine","href":"/flutter/stt/stream"},{"title":"STT Options","icon":"sliders","href":"/flutter/stt/options"},{"title":"synthesize()","icon":"volume-high","href":"/flutter/tts/synthesize"},{"title":"Streaming TTS","icon":"water","href":"/flutter/tts/stream"},{"title":"Voices","icon":"user","href":"/flutter/tts/voices"},{"title":"Voice Activity Detection","icon":"waveform","href":"/flutter/vad"},{"title":"Voice Agent","icon":"robot","href":"/flutter/voice-agent"},{"title":"Diarization","icon":"users","href":"/flutter/diarization"}]},{"group":"Vision","pages":[{"title":"Vision Language","icon":"image","href":"/flutter/vlm"},{"title":"Image Generation","icon":"wand-magic-sparkles","href":"/flutter/images"},{"title":"Segmentation","icon":"object-group","href":"/flutter/segmentation"}]},{"group":"Retrieval","pages":[{"title":"RAG","icon":"database","href":"/flutter/rag"},{"title":"Embeddings and Rerank","icon":"vector-square","href":"/flutter/embeddings"}]},{"group":"Advanced","pages":[{"title":"LoRA Adapters","icon":"layer-group","href":"/flutter/lora"},{"title":"Configuration","icon":"gear","href":"/flutter/configuration"},{"title":"Error Handling","icon":"triangle-exclamation","href":"/flutter/error-handling"},{"title":"Best Practices","icon":"lightbulb","href":"/flutter/best-practices"}]}]},{"dropdown":"Web","icon":"globe","description":"Browser","groups":[{"group":"Get started","pages":[{"title":"Introduction","icon":"globe","sidebarTitle":"Introduction","href":"/web/introduction"},{"title":"Installation","icon":"download","href":"/web/installation"},{"title":"Quick Start","icon":"rocket","href":"/web/quick-start"},{"title":"Models","icon":"cube","href":"/web/models"}]},{"group":"Text","pages":[{"title":"Chat","icon":"message","href":"/web/llm/chat"},{"title":"generate()","icon":"chart-line","href":"/web/llm/generate"},{"title":"generateStream()","icon":"water","href":"/web/llm/stream"},{"title":"System Prompts","icon":"user-gear","href":"/web/llm/system-prompts"},{"title":"Structured Output","icon":"brackets-curly","href":"/web/structured-output"},{"title":"Tool Calling","icon":"wrench","href":"/web/tool-calling"}]},{"group":"Speech","pages":[{"title":"transcribe()","icon":"microphone","href":"/web/stt/transcribe"},{"title":"Streaming STT","icon":"wave-sine","href":"/web/stt/stream"},{"title":"STT Options","icon":"sliders","href":"/web/stt/options"},{"title":"synthesize()","icon":"volume-high","href":"/web/tts/synthesize"},{"title":"Streaming TTS","icon":"water","href":"/web/tts/stream"},{"title":"Voices","icon":"user","href":"/web/tts/voices"},{"title":"Voice Activity Detection","icon":"waveform","href":"/web/vad"},{"title":"Voice Agent","icon":"robot","href":"/web/voice-agent"},{"title":"Diarization","icon":"users","href":"/web/diarization"}]},{"group":"Vision","pages":[{"title":"Vision Language Models","icon":"eye","href":"/web/vlm"},{"title":"Image Generation","icon":"image","href":"/web/images"},{"title":"Segmentation","icon":"object-group","href":"/web/segmentation"}]},{"group":"Retrieval","pages":[{"title":"RAG","icon":"book","href":"/web/rag"},{"title":"Embeddings \u0026 Reranking","icon":"vector-square","href":"/web/embeddings"}]},{"group":"Advanced","pages":[{"title":"LoRA Adapters","icon":"layer-group","href":"/web/lora"},{"title":"Configuration","icon":"gear","href":"/web/configuration"},{"title":"Error Handling","icon":"triangle-exclamation","href":"/web/error-handling"},{"title":"Best Practices","icon":"lightbulb","href":"/web/best-practices"}]}]},{"dropdown":"Electron","icon":"box","description":"Desktop","groups":[{"group":"Get started","pages":[{"title":"Introduction","icon":"desktop","href":"/electron/introduction"},{"title":"Installation","icon":"download","href":"/electron/installation"},{"title":"Quick Start","icon":"rocket","href":"/electron/quick-start"},{"title":"Models","icon":"cube","href":"/electron/models"}]},{"group":"Text","pages":[{"title":"Chat","icon":"message","href":"/electron/llm/chat"},{"title":"generate()","icon":"chart-line","href":"/electron/llm/generate"},{"title":"generateStream()","icon":"water","href":"/electron/llm/stream"},{"title":"System Prompts","icon":"user-gear","href":"/electron/llm/system-prompts"},{"title":"Structured Output","icon":"brackets-curly","href":"/electron/structured-output"},{"title":"Tool Calling","icon":"wrench","href":"/electron/tool-calling"}]},{"group":"Speech","pages":[{"title":"transcribe()","icon":"microphone","href":"/electron/stt/transcribe"},{"title":"Streaming STT","icon":"wave-sine","href":"/electron/stt/stream"},{"title":"STT Options","icon":"sliders","href":"/electron/stt/options"},{"title":"synthesize()","icon":"volume-high","href":"/electron/tts/synthesize"},{"title":"Streaming TTS","icon":"water","href":"/electron/tts/stream"},{"title":"Voices","icon":"user","href":"/electron/tts/voices"},{"title":"Voice Activity Detection","icon":"waveform","href":"/electron/vad"},{"title":"Voice Agent","icon":"robot","href":"/electron/voice-agent"},{"title":"Diarization","icon":"users","href":"/electron/diarization"}]},{"group":"Vision","pages":[{"title":"Vision Language Models","icon":"eye","href":"/electron/vlm"},{"title":"Image Generation","icon":"image","href":"/electron/images"},{"title":"Segmentation","icon":"object-group","href":"/electron/segmentation"}]},{"group":"Retrieval","pages":[{"title":"RAG","icon":"book","href":"/electron/rag"},{"title":"Embeddings \u0026 Reranking","icon":"vector-square","href":"/electron/embeddings"}]},{"group":"Advanced","pages":[{"title":"LoRA Adapters","icon":"layer-group","href":"/electron/lora"},{"title":"Configuration","icon":"gear","href":"/electron/configuration"},{"title":"Error Handling","icon":"triangle-exclamation","href":"/electron/error-handling"},{"title":"Best Practices","icon":"lightbulb","href":"/electron/best-practices"}]}]}]}]},"basePath":"","title":"Image Generation - RunAnywhere Docs","deploymentId":"dpl_3VZr4zL4q2wbintGwWjSCGUgnuP7","buildId":"dpl_3VZr4zL4q2wbintGwWjSCGUgnuP7","dynamics":[],"chunks":[]}