Bring your own AI key
You can always bring your own provider key, and your key stays server side. It is not the only way to use AI here - your plan includes managed AI, so most people never add a key at all - but it is always available, it is never taken away, and it means you are never locked into a single model.
How it works
You connect an API key for a provider you already use, OpenAI, Anthropic, Google, Qwen, DeepSeek, Kimi, GLM, or a custom OpenAI-compatible endpoint for chat, plus BytePlus and fal.ai for image and video. When you use AI Studio in the workspace, the app calls that provider on your behalf from the server, so your key never reaches the page. The in-editor assistant works differently: it keeps your key in your browser and calls the provider directly from there. Either way, you are billed by your provider directly for what you use, at that provider's own rates, and you can switch providers at any time.
| Step | Detail |
|---|---|
| Connect | Add a provider key in AI settings |
| Test | Confirm the key works before you rely on it |
| Use | Chat, generate images, and generate video |
| Switch | Change providers per task, whenever you like, with each key remembering its own model and settings |
Your keys are protected
Treat provider keys like passwords
In AI Studio, your API keys are encrypted at rest and are never returned to the browser, and all provider calls go through the server, so your key is not exposed to the page or to other users. Two things work differently: a custom endpoint has no built-in server proxy, so those requests go straight from your browser to the address you provide; and the in-editor assistant keeps your key in your browser and calls providers directly rather than through the server. Treat both as reasons to only connect a key on a device you trust.
What needs a key
| Feature | Key |
|---|---|
| Chat, image, and video generation | Your AI provider key |
| Skills and skill kits | Ride whichever provider key is active, no separate key of their own |
| Stock media search | Your own stock provider keys, separate from your AI key |
You connect providers and keys in AI settings. For the full setup, see AI Studio and the provider and model matrix for what each one covers.
Getting a key
Each provider issues keys from its own developer console or platform site, outside the app entirely, you sign up there directly and copy a key into AI settings. Most providers offer a free or trial tier to start with before you need to add billing on their side.
Step by step: connecting your first provider key
- Get an API key from a chat provider's own site, OpenAI, Anthropic, Google, Qwen, DeepSeek, Kimi, or GLM all work, or point at any OpenAI-compatible endpoint you already run.
- Open AI settings from your account menu and add the key under that provider.
- Use the test connection action next to the key before relying on it. This makes a small, cheap call to the provider using your key entirely on the server, so you find out immediately if the key is wrong rather than discovering it mid-generation. A couple of providers used only for image or video don't have a lightweight endpoint to test against, for those, saving successfully is the confirmation.
- Open AI Studio or the in-editor assistant and start a chat, it uses whichever provider and model you last selected for that conversation.
- If you also want image or video generation, add a key for an image and video provider separately from your chat provider, they're connected the same way but are billed and configured on their own.
Common tasks
Switch providers mid-task. Change the active provider and model from the chat composer at any time, each provider keeps its own last-used model and settings, so switching back later picks up where you left off with that provider.
Point at a self-hosted or local model. Add it as a custom endpoint with its base URL and key. If that endpoint is a local address rather than a public https one, requests go straight from your browser to it rather than through the server, which is expected for something running on your own machine. A custom endpoint reachable only over https from a public host may not work through the server proxy today, if a hosted custom endpoint doesn't connect, that's the likely reason, use a chat provider from the main list where possible.
Use different keys for different kinds of generation. Chat, image, and video each read from their own connected provider, there's no requirement to use the same company for all three, pick whichever is strongest or cheapest for each.
Preview cost before generating video. The video generation flow shows an estimated cost, based on your provider's own per-second or per-model rate and the duration you chose, before you commit to running it. See Generating video.
Troubleshooting
- A key you just added shows as invalid. Double-check you copied the whole key with no trailing space, and that it's active on the provider's own dashboard, not just created. Use the test-connection action to confirm before assuming the app is at fault.
- Generation fails partway through with a provider error. This is almost always the provider itself, a rate limit, an expired key, or insufficient billing set up on their side, not something the app can work around. Check that provider's own dashboard for usage and billing status.
- A model you expected to see isn't offered. Available models differ per provider, and vision (image understanding) support is limited to specific models within a provider. See the provider and model matrix for what each provider currently exposes.
- A custom endpoint over https from a public host doesn't respond. The server-side proxy only forwards to a fixed list of known providers for security, an arbitrary public https endpoint isn't automatically included in that list. A local, non-https endpoint is the supported custom-endpoint case, it connects directly from your browser instead.
Why bring your own key
Your own key is billed by the provider at their price, for exactly what you use, and it lets you add a provider the day it becomes useful to you rather than waiting for it to be offered here. It is also what keeps working when everything else runs out.
How it fits with your plan's AI
Your plan includes managed AI, and a generation draws in a fixed order: your plan's monthly quota for that model, then your wallet allowance, then any credit packs, then your own key. Each step falls through to the next rather than refusing, so adding a key never replaces what your plan already pays for - it sits behind it as the last resort, and only somebody with nothing left and no key is stopped.
Inside a team workspace there is one more step: the workspace's own key, which the company pays for directly, comes before your personal one. An admin can cap how much of the workspace key any one member uses; your personal key is never capped by them, because it is your account and your money. See Team workspaces.