BYOK Setup · Keys, Pricing & Privacy
How to get an API key for AI roleplay: DeepSeek, OpenRouter, Gemini, and Claude
To get an API key for AI roleplay, sign in to the developer console at OpenRouter, DeepSeek, Google AI Studio, or Anthropic, add a small prepaid balance (or pick a free-tier model), and generate a secret key string. ChatGPT Plus and Claude Pro subscriptions never include API keys. On Android and iPhone (App Store outside mainland China), Foreverse, our roleplay and novel app (free up to 3 cards), stores keys AES-encrypted on your phone and connects straight to the provider.
Available for iPhone and iPad in selected regions outside mainland China. Not available on the mainland China App Store. Download help
Which API provider should you start with in 2026?
An API key lets bring-your-own-key (BYOK) clients such as desktop SillyTavern or mobile Foreverse pay wholesale per-token rates instead of a flat monthly chatbot bill. Below is how the four main official consoles compare, checked against each provider's live docs on 2026-11-15.
| Provider | Where to create key | Free tier? | Flagship 2026 roleplay rates (per 1M tokens) | Key catch to know first |
|---|---|---|---|---|
| OpenRouter | openrouter.ai/settings/keys | Yes (:free models: 20 RPM, 50/day; 1,000/day after 10 credits) | Pass-through upstream pricing across hundreds of models | Must toggle off training-provider routing in Privacy settings if you want private chats |
| DeepSeek Official | platform.deepseek.com | No (prepaid balance) | deepseek-flash: $0.30 in ($0.006 cache hit) / $1.20 out; 50% off during UTC off-peak | 1M context window; cache-hit input is billed at 2% of the cache-miss price |
| Google AI Studio | aistudio.google.com/apikey | Yes (rate-limited Free tier) | $0 on Free tier; Paid Cloud Billing tier unlocks higher RPM & context caching | Google's Free tier explicitly uses prompts/outputs to improve Google products |
| Anthropic Console | platform.claude.com/settings/keys | No (prepaid API credits) | Claude Sonnet 5.5: $2 in ($0.10 cache hit) / $10 out; Opus 5.5: $4 in / $20 out | Completely separate billing from a $20/mo Claude Pro chat subscription |
How do you generate your first API key step by step?
Every provider shows the full secret string (typically starting with sk- or AIza) only once or behind an authenticated vault. Copy it straight into your app or password manager, and never include it in public Discord screenshots.
- OpenRouter (one key for Claude, DeepSeek, Gemini, and Llama)
Sign in at openrouter.ai, visit Settings → Credits to add $5–$10 if you want paid models (or skip payment to test
:freemodels at up to 50 requests/day), then open Settings → Keys and click Create Key. Set a dollar spending cap on that key itself so a runaway loop cannot empty your wallet. For custom OpenAI-compatible apps, the base URL ishttps://openrouter.ai/api/v1. - DeepSeek Platform (lowest direct per-token cost)
Log in at platform.deepseek.com, add a small prepaid balance, open API Keys, and generate a key. Pick
deepseek-flash(1M context) for everyday roleplay ordeepseek-v4-profor heavier prose; the olderdeepseek-v4-flashslug is retired and redirects todeepseek-flash. Outside weekday UTC peak windows (01:00–04:00 and 06:00–10:00 UTC), DeepSeek cuts prices in half to $0.15/1M uncached input, $0.003/1M cache hits, and $0.60/1M output. - Google AI Studio (fastest test key with no card required)
Open aistudio.google.com/apikey with a Google account and click Get API key to spin up a Gemini key attached to a Cloud project. Before sending private roleplay, read Gemini's Free vs. Paid tier terms: attaching a Cloud Billing account moves the key onto the Paid tier so Google no longer uses your prompts for product improvement.
- Anthropic Console (direct Claude Sonnet 5.5, Opus 5.5, and Fable 5.2)
Go to platform.claude.com/settings/keys (not the consumer
claude.aichat site), buy prepaid API credits under Billing, click Create Key, name it something recognizable likePhone-RPwith an optional expiry date, and copy the key string before closing the modal.
Is OpenRouter actually free, and is it safe for private roleplay?
Account creation on OpenRouter is free, and any model ID ending in :free charges $0 per token. The catch is rate limiting. Under OpenRouter's rate-limit policy (checked 2026-11-15), accounts that have bought fewer than 10 lifetime credits are capped at 20 requests per minute and 50 free-model requests per UTC day. Buying 10 credits once ($10, which stays in your balance for paid models) lifts the :free cap to 1,000 requests per UTC day. Standard paid slugs such as Claude Sonnet 5.5 or DeepSeek V4 Pro carry no daily platform cap and deduct straight from your balance.
On privacy, OpenRouter is an API gateway that bills you directly—very different from a “discounted” shared key sold by a third party, where whoever owns the upstream account can read every prompt you send and kill the key overnight. Still, per OpenRouter's own docs, each provider behind a model has its own data-handling policy. Before starting a personal roleplay session, open openrouter.ai/settings/privacy and flip the training opt-out switches. OpenRouter keeps separate toggles for paid models and free models because the providers behind each can have different training and logging policies. While you are on that screen, you can also restrict routing to Zero Data Retention (ZDR) endpoints (which drop prompts right after generation) or Safety Retention endpoints (held briefly for abuse checks, never trained on). What topics a model will or will not write follows whichever upstream provider answers the call; see our guide to provider content policies for roleplay.
Where does your API key go once you paste it into Foreverse?
Where you paste a secret key matters just as much as where you generated it. Paste an sk- string into a hosted website, find out whether its backend stores your key and sends requests on your behalf; in a native phone app, the real question is whether requests go straight from your handset to the model lab or detour through the app maker's servers.
We build Foreverse—a native mobile app for Android (Google Play and direct APK) and iPhone/iPad (App Store in some regions outside mainland China) covering Character Card v2/v3 roleplay, long-term AI companions, and branching novels—so check how we handle keys before trusting us with yours. When you open Me → AI Models & Services, choose one of the 60+ pre-configured providers (or enter any custom OpenAI- or Anthropic-compatible endpoint), and save your key, the secret is AES-encrypted inside local storage on your phone. Chat requests travel straight from your device to api.deepseek.com, openrouter.ai, or api.anthropic.com at 0% markup without touching Foreverse's servers. Cache hits also matter for your bill: in our 15-round cache economics test, the exact same roleplay script cost 2.8x as much at a 46.5% cache hit rate as it did at 91.5%.
If you want to try the app before opening a developer console, signing in gives you 5,000 non-expiring official credits (1 credit = $0.0001, cost quoted upfront). The free tier holds up to 3 character cards, 3 books, and 3 companions locally, and a one-time $19.99 Pro purchase removes those shelf caps with no monthly fee. Full setup screenshots are in Configure BYOK and Fix Errors.
When getting your own API key is the wrong move
- You never want to think about token balances, model IDs, or developer billing pages: stick with consumer subscription apps or Foreverse's built-in metered credit packs.
- You want zero internet traffic and own a PC that can run local weights through Ollama or KoboldCpp paired with desktop SillyTavern instead of cloud keys. We have not tested local models running on a phone, so Foreverse only guarantees that any reachable OpenAI-compatible URL can be entered.
- You expect your existing ChatGPT Plus, Claude Pro, or Gemini Advanced subscription to hand you an API key: every major lab keeps consumer web chat and developer API billing on separate ledgers.
FAQ
Can I use my ChatGPT Plus or Claude Pro subscription as a roleplay API key?
No. OpenAI, Anthropic, and Google bill consumer chat subscriptions completely separately from developer API usage. Paying for Claude Pro or ChatGPT Plus does not include API credits—you still have to generate a key on platform.claude.com or platform.openai.com and fund a separate API balance.
How many roleplay turns will $5 of DeepSeek or Claude API credits buy?
Take DeepSeek's deepseek-flash ($0.30/1M uncached input, $0.006/1M cached input, $1.20/1M output at peak, half off-peak) and assume a turn sends 4,000 context tokens and gets 300 tokens back (our back-of-the-envelope example, not a benchmark measurement). Each turn costs roughly $0.0016 uncached or $0.0004 with a cache hit, stretching $5 across roughly 3,000 to 13,000 turns. On Claude Sonnet 5.5 ($2/1M input, $0.10/1M cache read, $10/1M output), that same turn runs about $0.011 uncached or $0.0034 cached—roughly 450 to 1,500 turns per $5. Longer chats and bigger replies burn through it faster.
Are free 'reverse proxy' keys shared on Discord safe to use?
Stay away from unofficial community proxy keys. Whoever runs the proxy server can read every prompt you send, inject hidden instructions, and pull the plug without warning. Use an official console or a provider's documented free tier instead.
What should I do if I accidentally expose my API key?
Log in to your provider's API Keys dashboard right away, hit Revoke or Delete on the leaked key, and create a fresh one. On OpenRouter, setting a low dollar limit on each key when you create it caps the worst-case bill if a key ever leaks.
Sources
- OpenRouter Docs — Quickstart, Limits & Privacy/Logging Controls (checked 2026-11-15)
- OpenRouter Docs — Credit Limits & Free-Variant Rate Caps (checked 2026-11-15)
- DeepSeek API Docs — Models & Peak/Off-Peak Token Pricing (checked 2026-11-15)
- Google AI for Developers — Gemini API Keys & Free vs. Paid Tier Terms (checked 2026-11-15)
- Anthropic Claude Docs — Get an API Key & 2026 Model Pricing (checked 2026-11-15)