BYOK in Google Sheets: Paid Plans Get 50% More Scraping Credits
BYOK runs your SheetMagic formulas on your own OpenAI, Gemini or Claude key. AI usage stops counting against your plan, there is no monthly token cap, and paid plans get 50% more scraping credits while it is on. Setup, cost math, and when to switch.
Phil Nguyen · 11 min read · Updated

BYOK (Bring Your Own Key) lets SheetMagic run your AI formulas on your own OpenAI, Gemini or Claude API key, so AI usage stops counting against your plan and has no monthly cap. On a paid plan it also raises your scraping credits by 50% for as long as it stays on.
Say you run a small agency and translate a 1,000-item client catalog into four languages every month, on top of regular scraping. On platform keys, a big month can empty your token pool before the month ends, and from then on your AI formulas stop until it resets. That is a stalled client job, or a credit pack you did not plan for.
By default, SheetMagic includes AI tokens on every paid subscription plan. You write a formula, it calls the AI provider using SheetMagic's keys, and tokens come off your monthly balance. BYOK swaps in your key: you pay the provider directly and set your own spending limit in their dashboard.
This guide covers how BYOK works, how to set it up, and when it actually saves you money compared to using included tokens.
How BYOK changes your billing
With platform keys (the default), SheetMagic handles everything:
- You get a monthly token pool (3.25M on Solo, 12M on Growth, 30M on Scale)
- Every formula call takes tokens from your pool
- When the pool runs out, formulas stop working until it resets
With BYOK, the billing splits in two:
- You pay SheetMagic for the subscription (the add-on, caching, queuing, scraping, all the infrastructure)
- You pay your AI provider directly for token usage at their published rates
- You pay exactly what the provider charges
- No monthly token limit. Your limit is whatever you set in your provider's dashboard
- On a paid subscriber plan, your scraping credits go up by 50% while BYOK is on (Solo 10,000 to 15,000 a month, Growth 45,000 to 67,500, Scale 115,000 to 172,500)
Note
BYOK is available on all paid subscriber plans (Solo, Growth, Scale) as an optional toggle.
Setting up BYOK
Enable BYOK in your dashboard
Go to dashboard.sheetmagic.ai, navigate to your account settings, and toggle Bring Your Own Key on. You can also flip the BYOK switch at the top of AI Settings in the sidebar. This tells SheetMagic to use your API keys instead of platform keys for AI calls.
Get an API key from your provider
Go to your AI provider's developer console and create an API key:
- OpenAI: platform.openai.com/api-keys
- Google Gemini: aistudio.google.com/apikey
- Anthropic Claude: console.anthropic.com/settings/keys
Add your key in the SheetMagic sidebar
Open any Google Sheet, go to Extensions > SheetMagic > Open AI Settings, and click the key icon at the top of AI Settings (or use Extensions > SheetMagic > Manage AI API Keys). Paste your API key for the provider you want to use. SheetMagic saves the key in the add-on's user properties on your Google account. Other editors of your spreadsheets cannot read it there. When a formula runs, the add-on sends the key with that job to SheetMagic's AI processor, which uses it to call your provider.
Select your provider and start using formulas
Choose your provider in the sidebar dropdown. Your formulas now route through your own API key. Everything else works exactly the same. Same formulas, same caching, same batch processing.
When does BYOK save you money?
BYOK is not always cheaper. Here's how to work it out.
How the platform pool is counted
On platform keys, tokens come off your pool weighted by the price of the model you picked. A pricier model draws more from the pool per row than a cheaper one, so the same 3.25M tokens on Solo go further on a light model than on a premium one.
What BYOK costs
With BYOK, you pay the provider's list price and nothing comes off your SheetMagic pool. Two OpenAI examples:
| Model | Input per 1M tokens | Output per 1M tokens |
|---|---|---|
| GPT-4o | $2.50 | $10.00 |
| GPT-4o-mini | $0.15 | $0.60 |
A worked example
A 5,000-row job, each row about 600 input tokens and 400 output tokens, is 3M input and 2M output tokens:
- GPT-4o-mini: 3 x $0.15 + 2 x $0.60 = $1.65 in API fees
- GPT-4o: 3 x $2.50 + 2 x $10.00 = $27.50 in API fees
Either way the job runs the day you need it, with no wait for the pool to reset and no credit pack. And on Solo you have 15,000 scraping credits that month instead of 10,000.
The rule of thumb: if you stay well inside your token pool and scrape little, platform keys are simpler: one bill, no provider account. BYOK makes sense when:
- You have unpredictable bursts. Some months are quiet, others would empty the pool by the 20th.
- You scrape a lot. The 50% credit bonus is worth 5,000 extra credits a month on Solo.
- You already have an account or agreement with a provider and want AI spend on that bill.
- You need specific models not available through platform keys.
Tip
The biggest savings come from model selection. GPT-4o-mini's list price is about 1/17th of GPT-4o's, for both input and output. If your formulas don't need top-tier reasoning, testing the cheaper model first can cut your AI costs by over 90%, on your own key or on the platform pool.
What can you do with an uncapped AI budget and the extra credits?
- Finish the big job this month. A 5,000-row translation or rewrite runs now, for about $1.65 on GPT-4o-mini in the example above, instead of stopping halfway when the pool runs dry.
- Spend the bonus on research. On Solo, the extra 5,000 credits a month cover 5,000 more
=SERP()searches at 1 credit each. - Put a hard ceiling on AI spend. Set a monthly limit in your provider's dashboard and AI usage can never cost more than that number.
- Bill AI usage where it belongs. An agency can run a client's job on that client's own key, so the provider invoice already sits on the right account.
BYOK for high-volume translation
This is the use case where BYOK really shines. Translation workflows process massive amounts of text. Every word in the source language becomes tokens in, and every translated word becomes tokens out.
Formula
=AITRANSLATE(A2, "Spanish")Each row sends the full cell content as input and receives a full translation as output. Token usage scales linearly with text length.
Say you have a product catalog with 1,000 items averaging 100 words each. That's roughly 300K tokens per language, about half in and half out. With BYOK on GPT-4o-mini, that is about 0.15 x $0.15 + 0.15 x $0.60, or roughly $0.11 in API fees per language. Four languages cost well under $1.
For more on translation workflows, see AI translation at scale in spreadsheets.
What BYOK does not change
BYOK changes who pays for AI tokens. It doesn't change how SheetMagic works:
- Same formulas.
=AITEXT(),=AIIMAGE(),=GPTV(),=AILIST()all work the same way. - Same caching. Results are cached just like before. Formulas don't re-run unless you change the input.
- Same batch processing. The async processing system handles your requests the same way.
- Same scraping formulas, more credits. Web scraping functions (
=VISIT(),=GETSELECTOR(), etc.) still use scraping credits from your plan, not AI tokens, and your own AI key plays no part in them. On a paid subscriber plan you get 50% more of those credits while BYOK is on.=SERP()and=BULKSERP()cost 1 scraping credit per search.=DOMAINCHECK()is free and uses neither.
Who Can Use BYOK
Not every account type supports BYOK. Here's the breakdown.
| Account Type | BYOK Available | Can Toggle Off |
|---|---|---|
| Free tier | No | N/A |
| Paid subscriber (Solo, Growth, Scale) | Yes | Yes |
| Lifetime deal (AppSumo, Dealify) | Always on | No |
| Seat user | Inherits from account owner | N/A |
Free users: BYOK is not available. You use platform keys with your 20,000 one-time token allowance.
Paid subscribers: You can enable BYOK in your dashboard settings. When enabled, your own API keys are used instead of platform keys. You can switch back to platform keys at any time.
Seat users: You inherit BYOK settings from the account owner who assigned you the seat. If the owner uses BYOK, so do you (using the owner's keys for billing purposes).
Security Considerations
Where keys are stored: API keys are stored in Google's UserProperties service, scoped to your Google account. Other users of the same spreadsheet cannot see your keys.
Key rotation: To rotate a key (recommended periodically), go to Extensions > SheetMagic > Manage AI API Keys and update it. The new key takes effect immediately.
Shared spreadsheets: AI formulas in a spreadsheet run as the spreadsheet's owner, whoever typed them. They use the owner's plan, and the owner's key when the owner has BYOK on. A colleague editing your sheet runs on your setup there, never sees your key, and their own keys are not used on your sheet.
Troubleshooting
"Invalid API key" error: Check that you copied the full key without leading or trailing spaces. Verify the key is active in your provider's dashboard.
"Quota exceeded" from the provider: This is a limit on your API provider account, not SheetMagic. Check your provider's usage dashboard and billing settings. You may need to request a rate limit increase.
"BYOK not available" message: Your account type doesn't support BYOK. Free tier users need to upgrade to a paid plan. Seat users inherit from their owner.
Functions work for you but not your colleague: Formulas run as the owner of the spreadsheet. On your sheet, your setup applies to everyone. On a sheet your colleague owns, they need their own plan, or their own keys with BYOK on.
For a complete overview of AI in Google Sheets, including all functions and provider options, see The Complete Guide to AI in Google Sheets.
Getting started
You need a paid SheetMagic plan to enable BYOK. The free tier uses platform keys only.
Note
Not sure if BYOK is right for you? Start with platform keys on the free tier. You get 20,000 AI tokens and 100 scraping credits to test the AI and scraping formulas. No credit card needed. Move to Solo ($20/mo) when you're ready, use the included 3.25M tokens for a month, and then decide if BYOK makes sense based on your actual usage.
For the complete formula reference, see how to use AI formulas in Google Sheets. To understand how token budgeting works at scale, read how to process 1,000 rows without hitting limits.
Have questions about BYOK setup or pricing? visit the FAQ.
Text and scraping formulas run on the free allowance. Install from the Google Workspace Marketplace, no card, no expiry.
Install free for Google SheetsAbout the author
Phil NguyenPhil builds SheetMagic, the Google Sheets add-on that brings AI and web scraping into the spreadsheet, used by 6,300+ people. He writes these guides from the formulas he runs on his own sheets.
