How to Use Your Own API Key for AI in WordPress
If you already pay for AI APIs — an OpenAI account, a FLUX/BFL key, a fal.ai subscription — you don’t want to pay a second time for hosted compute. StudioUI Pro lets you bring your own keys, so generation bills to your provider account at their rates with no per-generation fee from StudioUI on top. This guide explains where keys live, which providers are supported, and how failover works.
When BYO-key is the right path
Bringing your own key suits anyone who already has provider accounts or wants direct control over model choice and billing. The hosted Free tier is the opposite trade: zero setup, pay per generation in credits. Pro BYO-key trades a little setup for paying your providers directly and removing StudioUI’s per-generation charge.
Where the keys live (and why it’s safe)
API keys are entered in StudioUI’s settings and stored server-side in your WordPress install. They are never exposed to the browser or to your site’s visitors — calls to the providers are made from your server, so a visitor generating an image never sees or touches your key. Treat the WordPress admin like any other place that holds secrets and restrict who has access.
Supported providers
- OpenAI — and OpenAI-compatible endpoints, for chat and image where applicable.
- FLUX / BFL — bring your own Black Forest Labs key to run FLUX directly.
- fal.ai — useful for offloading heavier video generation.
- Groq — fast inference for chat.
- Self-hosted backends — ComfyUI for image/video and LM Studio for chat, which need no third-party key at all.
Use the exact provider names and current verdicts in StudioUI’s settings as the source of truth; the lineup evolves.
Step 1 — Activate Pro
BYO-key is a Pro capability. Install StudioUI and activate your Pro licence ($149/yr) to expose the provider-key fields.
Step 2 — Enter your keys
In settings, paste each provider key into its field and save. Only fill the providers you actually use; an empty field simply means that path is off.
Step 3 — Map modalities to providers
Decide which provider serves each modality — for example your BFL key for FLUX images, fal.ai for video, OpenAI or Groq for chat. StudioUI routes each generation to the provider you’ve assigned.
Step 4 — Configure failover (optional)
Pro supports multiple keys with failover, so if your primary provider errors or rate-limits, generation can fall back to another configured path instead of failing the user. This is worth setting up for any site with real traffic — it turns a provider outage into a quiet degradation rather than a broken studio.
Step 5 — Test each path
Generate one real item per modality you’ve wired and confirm it both completes and bills to the right provider account. Testing the actual generate path is the only way to know a key works — a saved field isn’t proof.
Troubleshooting
- Auth error — the key is wrong, expired, or lacks access to the model you’re requesting. Re-copy it and check the provider dashboard for the model’s availability.
- Works then fails intermittently — provider rate limits. Configure a failover key or slow the request rate.
- Billing higher than expected — you’re paying your provider’s published rates directly now; check their pricing for the model you chose.
- Key fields missing — Pro isn’t active. BYO-key is Pro-only.
FAQ
Do I need Pro to use my own API key?
Yes. BYO-key is a Pro feature ($149/yr). The Free tier uses hosted compute billed in credits instead.
Are my keys ever sent to StudioUI’s servers?
Keys are stored server-side in your own WordPress install and used to call providers from your server. The native StudioUI billing path isn’t involved when you bring your own key.
Can I use different providers for different modalities?
Yes — map each modality to the provider you prefer, e.g. BFL for FLUX images and fal.ai for video.
What happens if a provider goes down?
With failover configured, generation falls back to another key/path. Without it, that modality returns an error until the provider recovers.
Is BYO-key cheaper than hosted credits?
It can be, at volume, because you pay providers directly with no per-generation StudioUI fee — but you also manage the accounts and rate limits yourself. Hosted credits trade a slightly higher per-generation cost for zero setup.
Bring your own keys
Activate StudioUI Pro, enter your provider keys, map them to modalities, and run AI on your WordPress site billed to your own accounts — with failover for resilience.
Get Pro — $149/yr · Or self-host instead · Run FLUX with your BFL key
Related in guides & tutorials
- Add an AI Art Generator to WordPress | StudioUI
- AI Product Images in WordPress | StudioUI
- Build an AI Image Generator Site | StudioUI
- Build an AI SaaS with WordPress | StudioUI
- Create Blog Images with AI in WP | StudioUI
- Generate AI Thumbnails in WordPress | StudioUI
- How to Add AI Music to WordPress | StudioUI
- How to Add AI Video to WordPress | StudioUI