Troupe

Use your own OpenAI, Anthropic or OpenRouter key

This page explains how to use Troupe with your own OpenAI, Anthropic or OpenRouter API key, how the key is stored, and what it costs.

Last updated .

Troupe can run on Troupe AI (hosted models paid with monthly credits) or on your own API key. Your own key works on every plan, Free included. It must be an API key from the provider’s developer console: a ChatGPT Plus or Claude Pro subscription login won’t work.

Supported providers

Providers you can use with your own key in Troupe
ProviderWhere to create a key
OpenAIplatform.openai.com/api-keys
Anthropicconsole.anthropic.com/settings/keys
OpenRouteropenrouter.ai/settings/keys

You choose from a short list of models Troupe has tested for each provider (unknown models are never used), and you can set a default model and change a chat’s model later.

Add your key

  1. Create an API key on your provider’s key page (links above) and copy it.
  2. In Troupe, open Settings, then the AI tab, and choose “Bring your own key”.
  3. Under “Add a key”, pick the provider, paste the key, add a label if you like, and press “Test and save key”. Troupe makes one quick check with the provider (a free, read-only request); a key that fails is not saved.
  4. Pick your default models. You can test or remove a key at any time.

How your key is stored

  • Encrypted at rest with AES-256-GCM. Each key has its own data key, which is itself encrypted with a master key kept outside the database.
  • Only the last four characters are stored in plain text, to tell your keys apart.
  • The key is decrypted in memory only for the calls that use it, and is never shown again in full.
  • Removing a key deletes it. Adding and removing keys is recorded in Troupe’s audit log.

What it costs

  • Your provider bills the AI replies directly, at its own prices. Troupe charges no credits for them.
  • The short director calls that choose the next speaker also run on your key, including some made ahead of time while you type.
  • In the beta, the story reader (the background work behind per-character knowledge and story state) also runs on your key on these chats, so your provider bills it too.
  • Every message and reply still goes through Troupe’s content-safety checks, which use credits, so you need credits in your balance. During the beta every account gets 300 free credits a month.
  • Each reply sends a prompt with the character, recent story and memory, so long stories cost more per reply than short ones. Keep an eye on your provider’s usage page.

How to try Troupe

Troupe is in an invite-only beta for adults: you must have reached the age of majority in your province or territory (19 in BC, NS, NB, NL, YT, NT and NU; 18 elsewhere), live in Canada outside Quebec, hold an invitation and pass an ID check with Didit. Join the Discord to apply; invitations are sent from there.

Questions and answers

Which AI providers can I use with my own key?

OpenAI, Anthropic and OpenRouter, on every Troupe plan.

How is my API key protected?

It is encrypted at rest (AES-256-GCM) with a master key kept outside the database; only the last four characters are stored readable, and the key is decrypted in memory only to make your calls.

Does my own key unlock adult content?

No. Adult mode is not available; every story runs in Safe Mode with any key.

Read next: Troupe features · Troupe FAQ · Troupe and SillyTavern compared.