Get the right credential for your provider
Choose a provider before copying a credential. Follow Gemini API key setup, Groq API key setup or OpenAI key and host access setup. Gemini/Groq accept your session key; the current OpenAI connection requires a host-issued access code.
A valid key does not guarantee access to every model or generation quota. If generation fails, use the HTTP status shown by Studio and the model/limits page in your provider console rather than repeatedly replacing a working key.
Set up the provider connection
- Open AI assistant on the right.
- Choose Connect AI and select your provider.
- Set a model available to the connection.
- For Gemini/Groq, enter your session API key. For OpenAI GPT, enter the workspace access code supplied by the host.
- Confirm the settings and allow the relevant design and prompt to be sent.
The OpenAI provider uses a protected server relay, keeping the provider key outside the browser build. The host must configure it first. See the secure OpenAI setup steps. Provider charges, quotas and availability are independent of the free editor. Never assume a connection is verified just because a credential was entered.
Understand session keys and data
For Gemini and Groq, the credential you enter in AI connection settings is kept separately from your project. Choose Done to save the connection for this browser tab, including refreshes. It is used to authorize requests to the provider you select. Studio does not write that credential into the saved project, IndexedDB project backup, generated Dart files or exported ZIP.
By default, sessionStorage restores the provider, model and credential after a refresh in the same tab. This is browser storage, not an account or cloud sign-in. Enable Remember on this device before choosing Done to keep the connection in this browser for up to 30 days, including later visits. Use that option only on a trusted device: scripts running on this site origin can access browser storage. Remove credential clears both saved connection locations. Revoke an exposed key through the provider to invalidate it everywhere. Restoring a connection does not grant consent for a new AI request.
OpenAI GPT works differently: you enter a workspace access code, not an OpenAI API key. The browser sends that code to the same-origin host relay. The provider key stays in the host's private configuration. The code is also excluded from saved projects and exports. The host must enable and configure this connection first.
| Information | Where it is used |
|---|---|
| Gemini/Groq API key | Tab session by default; optional 30-day device storage; sent to the selected provider for authentication. |
| GPT workspace access code | Tab session or optional device storage; sent to the protected relay. |
| Prompt and relevant design | Sent for the requested AI proposal after you allow it. |
| Recent conversation | A bounded recent portion accompanies follow-up requests for context. |
| Saved project and source ZIP | Contain design and supported behavior, without session credentials. |
The AI context includes the current screen, screen references, selected widget, behavior definitions and bounded recent conversation. Embedded local image data is removed from this context. That does not make the rest of your design private from the selected provider: prompts, visible text and configuration may contain information you entered. Use fictional design data and keep passwords, private tokens and personal records out of prompts and project fields.
Local project storage and AI requests are separate. Autosaving a design does not send an AI request. Browser credential storage does not promise that a provider has no logs or retention: its own service terms and account settings apply. Optional AI requests can consume quota or incur charges even though the manual visual app builder is free. Read the agent data explanation before connecting a provider.
Change or clear the connection
Open Connection settings to review provider and model. Changing provider clears the credential field and resets consent. Use Remove credential to clear both tab-session and remembered-device copies. With Remember on this device enabled, closing a tab does not remove the connection; it can remain for up to 30 days. Revoke a key through its provider to invalidate it everywhere.
Changing editor modes is not a new session. Use proposal review after connecting. Never place a secret in an ordinary widget or API-lab URL.