# AppMint integration guide - complete Source: https://freewebtoapk.com/docs/ · generated from the guide shipped inside the AppMint app · 2026-09-20 47 chapters, 358 steps, plus the 152-method bridge API reference. --- # Free AI App Builder > Describe an app in plain words and get a real APK, with no key and no account. - **Applies to:** AppMint - **Source:** the Integration Guide shipped inside the app; this page is generated from it. - **HTML:** https://freewebtoapk.com/docs/free-ai-app-builder Build Android apps and games for free - get a key from OpenRouter or Arena AI and pick a free model ### 1. Build your app for free You can create a full Android app or game here without paying anyone - including us. The AI that writes your app runs on your own free account with one of two gateways: OpenRouter or Arena AI. Both hand out an API key for free, and both carry models that cost nothing to use. You bring the key, we do the rest. It takes about two minutes to set up, and you only ever do it once. ### 2. Step 1 - Create your free key Pick either gateway. You only need ONE of them: - OpenRouter - one key unlocks Claude, GPT, Gemini, Llama, DeepSeek and hundreds more. Its free models have ids ending in ":free", and AppMint lists those first so they are easy to spot. - Arena AI - a newer gateway with the same one-key idea and a clean model list. Sign up with an email or a Google account, then open the keys page and create a key. Copy it straight away - most sites show a key only once. [Get a free OpenRouter key](https://openrouter.ai/keys) ### 3. Step 1b - Or use Arena AI instead Prefer Arena AI? Sign up at arena.ai, open the dashboard and create a virtual API key. Paste that key into AppMint exactly the same way as an OpenRouter key - everything after this step is identical. [Get an Arena AI key](https://portal.api.preview.arena.ai/dashboard/keys) ### 4. Step 2 - Tap 'Create with AI' Back on the AppMint home screen, tap 'Create with AI' to open the AI App Studio. This is where you describe your app and watch it get built. ### 5. Step 3 - Add your key In the AI App Studio: 1. Tap the provider name at the bottom of the screen (it shows the current provider). 2. Choose OpenRouter or Arena AI from the list. 3. Paste your key and tap 'Save & Test'. A green tick means the key works. Your key is stored encrypted on your device and is sent only to the gateway you chose - never to us. ### 6. Step 4 - Choose a free model Once the key is accepted, AppMint loads the full model list from your account. On OpenRouter, look for models ending in ":free" - they are sorted to the top and cost nothing. On Arena AI, pick any model from the list. A 📷 marker means the model can also read images, which is what powers Screenshot → App. ### 7. Step 5 - Describe it, and build Type what you want in plain words - "a habit tracker with streaks and a dark theme", "a 2D endless runner game" - and tap Generate. Preview it live, ask for changes in the same box, then tap 'Build App' to turn it into a real APK you can install or publish to Google Play. No credits are used and nothing is charged: the whole run happens on your own free key. ### 8. Good to know - Free models are shared by a lot of people, so they can be slower or briefly busy at peak times. Try again in a moment, or switch to another free model. - Bigger apps ask more of the model - if a large app struggles on a free model, a paid model on the same key handles it comfortably. - You can swap providers or keys whenever you like; your projects stay put. - Prefer to skip setup entirely? AppMint AI needs no key or account at all - see the AppMint AI section below. --- # AppMint AI (How Credits Work) > What one Mint buys, what a typical app costs to generate, and why editing is cheaper than creating. - **Applies to:** AppMint - **Source:** the Integration Guide shipped inside the app; this page is generated from it. - **HTML:** https://freewebtoapk.com/docs/how-credits-work No setup, no API keys - buy credits and build apps instantly ### 1. What is AppMint AI? AppMint AI is the easiest way to build an app - no accounts, no API keys, no setup. You just buy credits and start building. We run the AI for you in the background and you pay only for what you use. ### 2. How credits work Credits are like prepaid balance. Every time the AI builds or edits your app, it uses some credits - and we show you exactly how many ('Used 45 credits · 7,910 left'). There is no fixed 'number of apps' because usage depends on how big your app is and how many changes you make. A small app costs little; a large app with lots of edits costs more. You can spend your whole balance on one big app if you want. ### 3. Buying credits Tap 'Buy Credits' and pick a pack: - Starter - $2.30 (100 credits - approximately 2-3 full apps) - Maker - $5.74 (450 credits - approximately 8 full apps) The 'approximately N apps' figures are estimates only - your real usage is metered. Payment is handled securely by Google Play, or via web checkout (Dodo) which is cheaper than the in-app price; there is no subscription. ### 4. Standard vs Best Quality Pick a quality level before you build: - Standard - great for most apps and the cheapest. Recommended. - Best Quality - uses a smarter model for tricky apps, but spends credits faster. You can switch any time. Image → App (turning a screenshot or drawing into an app) works on both. ### 5. AppMint AI vs Free vs Your Own Key You have three ways to build: - AppMint AI - best quality, no setup, pay-as-you-go credits, always badge-free. (Recommended.) - Free providers - Groq (free key from console.groq.com) or Cloudflare Workers AI (free tier from dash.cloudflare.com). Great for testing ideas. - Your Own AI Key - bring a Claude, OpenAI, Grok, or DeepSeek key. All providers are available to everyone. Apps built with your own key include a small AppMint badge unless you have a Pro plan. AppMint AI apps are always badge-free. ### 6. Your balance is always safe Your credit balance is stored on our secure server, not just on your phone - so it follows your purchase. If you reinstall the app, your remaining credits are restored. We never see or store any AI provider keys on your device for AppMint AI; everything runs server-side. --- # AI App Studio (Bring Your Own Key) > Run the AI pipeline on your own OpenAI, Anthropic or OpenRouter key instead of Mints. - **Applies to:** AppMint - **Source:** the Integration Guide shipped inside the app; this page is generated from it. - **HTML:** https://freewebtoapk.com/docs/ai-app-studio-own-key Generate apps with Groq (Free), OpenRouter, Claude, OpenAI, Grok or DeepSeek using your own API key ### 1. What is the AI App Studio? The AI App Studio lets you describe an app in plain words and have an AI build it for you - then preview it live and turn it into an APK, all inside this app. It uses a 'bring your own key' model: you connect your own AI account, so generation costs are billed directly by the AI provider, not by us. ### 2. Choose an AI provider Pick one of the supported providers: - Groq - FREE tier available, very fast (recommended to start) - Cloudflare Workers AI - FREE tier available, open models (Llama, etc.) - Claude (Anthropic) - OpenAI (ChatGPT) - Grok (xAI) - DeepSeek You need an account with that provider. Groq and Cloudflare both offer generous free tiers; the others have pay-as-you-go pricing. ### 3. Get your API key Create an API key in your provider's console, then copy it: - Groq (FREE): console.groq.com/keys - Cloudflare (FREE): dash.cloudflare.com → AI / Workers AI. Copy your Account ID and create an API token with the Workers AI permission, then enter them in the app as accountId:token. - Claude: console.anthropic.com/settings/keys - OpenAI: platform.openai.com/api-keys - Grok: console.x.ai - DeepSeek: platform.deepseek.com/api_keys ⚠️ Keep your key private - treat it like a password. [Open Anthropic Console](https://console.anthropic.com/settings/keys) ### 4. Connect your key in the app In the AI App Studio: 1. Select your provider from the dropdown 2. Paste your API key 3. Tap 'Save & Test' The key is stored encrypted on your device and is sent only to your chosen provider - never to us. You can change or remove it any time. ### 5. Pick a model After the key is validated, the studio fetches the list of available models from your provider. Choose one and it stays fixed for the whole session for consistent results. Models marked 📷 also support image input (used by Screenshot → App and Inspire-from-Website). ### 6. Generate your app Choose how to start: - Create from Prompt - describe the app - Improve My App - upload existing HTML/ZIP and refine - Screenshot → App - turn an image into an app - Inspire from Website - browse a site, capture screens - Remix a Template - start from a ready-made app Tap Generate, then refine with follow-up instructions. Use 'View Live' to preview the running app at any time. ### 7. Build the APK When you're happy with the preview, tap 'Build App'. The generated project is handed to the normal APK wizard - set your icon, name, package and options as usual, then generate. Your APK and AAB appear in the Downloads section like any other build. ### 8. Costs & privacy ✅ You pay your AI provider directly for usage - there is no extra charge from us. ✅ Your API key never leaves your device except to call your provider. ✅ A Mints counter shows usage per session so you can keep costs in check. ✅ Simple-HTML apps are cheapest; React/framework apps use more Mints. ### 9. Free tiers & automatic fallback The free providers have different limits: - Groq - about 8,000 tokens per MINUTE. A large app can hit this mid-build. - Cloudflare - 10,000 Neurons per DAY (resets at 00:00 UTC), with no per-minute cap. If Groq hits its per-minute limit and you have a Cloudflare key saved, the studio automatically retries your request on Cloudflare - so a busy moment on one free provider doesn't block you. For the most consistent results on big apps, add your own paid key (Claude or OpenAI). --- # Writing HTML for your app > How a page inside the app differs from a page in a browser tab, and the rules that keep it working. - **Applies to:** AppMint - **Source:** the Integration Guide shipped inside the app; this page is generated from it. - **HTML:** https://freewebtoapk.com/docs/writing-html-for-your-app What the app runtime exposes to your page - contacts, SMS, notifications, device info, biometrics - and the rules for calling it correctly ### 1. Rule 1 - always check first window.WebToApk only exists inside your built app. In a browser it is missing. So always check before you call. If you do not, your page breaks everywhere except inside the app. Some things need no check at all: navigator.vibrate(), speechSynthesis and Notification already work - the app connects them for you. Just use the normal web code. ``` // GOOD — safe everywhere if (window.WebToApk) { WebToApk.playClick(); } // BAD — this breaks your page in a browser WebToApk.playClick(); ``` ### 2. Rule 2 - some answers come back later Reading contacts, SMS or the call log takes time. So these do not answer straight away. If they did, your app would freeze. You give the call a name (an id). The answer arrives later as an event. You listen for that event. Event names: appmint:contacts, appmint:calllog, appmint:sms, appmint:sms-received, appmint:notification-action. ``` // 1. Listen for the answer window.addEventListener('appmint:contacts', function (e) { if (e.detail.error) { alert('Problem: ' + e.detail.error); return; } console.log(e.detail.contacts); }); // 2. Ask the question ('my1' is any name you choose) WebToApk.listContacts('my1', 50, 0); ``` ### 3. Rule 3 - two switches must be ON A phone feature needs TWO things: 1. You turned it on in Step 3 (Permissions) when you built the app. If not, you get error 'not_enabled' and the user sees nothing. 1. The user said Yes on the phone. If they said No, you get error 'permission_denied'. Always handle both errors so the user knows what happened. Easier way: pickContact() and composeSms() need NO permission at all. Use them when they fit - they do the same job with less trouble. ``` window.addEventListener('appmint:contacts', function (e) { if (e.detail.error === 'not_enabled') { alert('Turn on Contacts when you build the app'); } else if (e.detail.error === 'permission_denied') { alert('Please allow contacts access'); } else { showContacts(e.detail.contacts); } }); ``` ### 4. Notifications with pictures and buttons notify() takes a list of options. You can add a big picture, an icon, buttons, and a progress bar. channel can be: urgent, default, quiet, or ongoing. Use ongoing:true for a notification the user cannot swipe away. Note: they can still remove it from Android settings. No app can make one that is impossible to remove. Use tag to give it a name. Sending again with the same tag replaces the old one instead of adding a new one. ``` WebToApk.notify(JSON.stringify({ title: 'Order shipped', body: 'Arriving Tuesday', channel: 'urgent', image: 'https://mysite.com/box.jpg', actions: [{ id: 'track', label: 'Track' }], tag: 'order-482' })); // Know which button the user pressed window.addEventListener('appmint:notification-action', function (e) { if (e.detail.actionId === 'track') showTracking(); }); ``` ### 5. Phone information and fingerprint getDeviceInfo() needs no permission. It gives you the Android version, the version ID (buildId), the phone model, screen size, battery level, and more. About device ID: there is NO IMEI or serial number. Android blocked this for every app from Android 10. Use getInstallId() instead - a fixed ID for this install that stays the same after updates. ``` var info = JSON.parse(WebToApk.getDeviceInfo()); info.android.release; // "14" info.android.buildId; // "TQ3A.230805.001" <- version ID info.hardware.model; // "Pixel 7" info.runtime.batteryLevel; // 82 // Fingerprint window.__webToApkAuth = window.__webToApkAuth || {}; window.__webToApkAuth['unlock'] = function (json) { var r = JSON.parse(json); if (r.ok) showMyApp(); }; WebToApk.authenticateBiometricEx('unlock', JSON.stringify({ title: 'Unlock', allowDeviceCredential: true })); ``` ### 6. Make your page fill the screen When you turn on Fullscreen, the app hides the Android bars for you. But add this CSS so your content is not hidden under the phone's notch. Important: Fullscreen hides the ANDROID bars (clock, battery, back buttons). Your app's own coloured bar at the top is a different switch called 'Show top bar'. If you still see a bar after turning on Fullscreen, that is the one to turn off. Also: test your app rotated. The notch moves to the side in landscape. ``` body { padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); min-height: 100vh; /* old phones */ min-height: 100dvh; /* correct when bars are hidden */ } ``` ### 7. Downloads keep the filename you chose Your normal download code already works. When your page saves a file - a PDF report, a CSV export, a backup - the app catches it and opens the Android 'Save as…' sheet with YOUR filename already filled in. This covers every usual way of doing it: , a.click() from code, html2pdf / jsPDF, FileSaver.js saveAs(), and window.open() on a blob URL. A File object brings its own name with it. If you would rather ask directly instead of building an tag, use AppMint.downloadFile(). One thing to know: the name lives only in your page's JavaScript - Android never sees it on its own. So set download= (or pass a name) every time, or the file is saved as 'download'. ``` // The usual way — saves as Site_Report_2026-08.pdf const blob = await html2pdf().from(el).outputPdf('blob'); const a = document.createElement('a'); a.download = 'Site_Report_2026-08.pdf'; a.href = URL.createObjectURL(blob); a.click(); // Or ask directly AppMint.downloadFile(base64String, 'Ledger_Q3.csv', 'text/csv'); AppMint.saveBlob(myBlob, 'Backup.json'); ``` ### 8. Make the Back button do what YOUR app expects If your app changes screens by showing and hiding elements (no URL changes, no history.pushState), Android's Back button cannot see those screens - its history is empty, so Back exits the app from anywhere. Register a back handler and decide yourself: return true when you handled the press (closed a menu, went back a screen), return false to let the normal behaviour run - page history back, then the exit confirmation, then exit. Apps that use history.pushState for every screen do not need this: Back already walks their history. And don't worry about freezing the app - if your handler ever hangs, the phone's Back keeps working natively after a short moment. ``` AppMint.setBackHandler(() => { if (isMenuOpen) { closeMenu(); return true; } // consumed if (screen !== 'home') { goTo('home'); return true; } return false; // nothing open — normal exit behaviour }); // Or listen instead: e.preventDefault() consumes the press window.addEventListener('appmint:back', e => { if (closeTopmost()) e.preventDefault(); }); ``` ### 9. Receive what people share to your app - links, photos, videos, files Turn on 'Receive shares from other apps' in the build wizard and tick what your app accepts: text and links, data files (JSON, CSV, TXT, XML, Markdown, GPX, TCX, FIT), photos, videos, audio, documents (PDF, Word, Excel, PowerPoint). Your app then appears in the Share menu of every other app for exactly those kinds - a notes app for text, a player for videos. A link or text (sharing a YouTube video from the YouTube app sends its link) is read with WebToApk.getSharedText() and announced as appmint:shared. A file is asked for with AppMint.getOpenedFile() - ask whenever you are ready, the file waits for you. This matters for React, Vue and Angular apps: they finish starting AFTER the page loads, so an app that only listened for the event used to miss the file and just show its home screen. f.kind tells you what arrived: image, video, audio, document or data. Photos, videos and audio come as f.url - a streamable, seekable address you put straight into