Teaflask Docs

Administration

Keys

Owners manage two kinds of credentials under Settings > Keys:

  • Model provider keys bill model calls to your account with that provider.
  • The end-user JWT secret lets your backend identify signed-in users of your app.

Publishable keys, which select an agent for an installation, are created separately in the agent's Install section.

Steep keys, which let your app send journeys to Steep, are managed in the Keys section of the Steep page.

Add a model provider key

Create a key with Anthropic, OpenAI or OpenRouter, then paste it into the matching section in Teaflask. Anthropic keys start with sk-ant-, OpenAI keys with sk-, and OpenRouter keys with sk-or-. OpenRouter models run only on your own OpenRouter key.

Teaflask checks the saved key with a minimal provider call. The row shows its state:

State Meaning
Verifying… The check is running. Anthropic and OpenAI calls use your balance meanwhile, when platform funding is available. OpenRouter models wait until the check passes.
Active The key pays for that provider's model calls.
Declined The provider rejected the key. That provider's models stop running until you update the key, or remove an Anthropic or OpenAI key — a declined key never falls back to your balance.

Requests made through Teaflask with your OpenRouter key are labelled "teaflask" in your OpenRouter activity and in OpenRouter's public app rankings. Your OpenRouter privacy and provider settings decide which providers may handle them.

An active key covers only its own provider. Calls to another provider can still spend the organization's balance. OpenRouter usage is always billed to your OpenRouter account, never to your balance. Settings > Models shows which model runs each kind of work and what pays for it; see Models and payment and Billing.

Provider keys are available on all plans. Anthropic and OpenAI keys are optional: you can fund their usage through your Teaflask balance instead. OpenRouter models need an OpenRouter key. After saving, only the key's prefix and last four characters are displayed; the full key cannot be revealed again.

Replace or remove a provider key

Replace key removes the old key immediately and sends the replacement through verification. There is no overlap between the two keys. While the replacement is being checked, Anthropic and OpenAI calls can use your balance; OpenRouter models wait.

Remove key returns Anthropic or OpenAI usage to your balance. Removing an OpenRouter key stops OpenRouter models until you add a key again, because your balance never pays for them. If the balance cannot fund Anthropic or OpenAI work, add funds or restore a valid key for that provider. Removing a declined Anthropic or OpenAI key is also how you hand that provider's usage back to the balance, since the declined key itself admits no work.

Auto top-up pauses while an Anthropic or OpenAI key is active, even if another provider still draws from your balance. An OpenRouter key never pauses it. Check your balance when using a mix of provider-funded and Teaflask-funded models.

Identify your app's users

The Identity verification section contains your organization's end-user JWT secret. Your backend uses it to sign short-lived HS256 tokens identifying your app's users. See Identity for token fields, signing examples, and frontend integration.

Owners can reveal the secret again in the Teaflask dashboard. Keep it on your backend; never embed it in your customer-facing frontend or send it to your users. Your frontend receives the signed token, not the signing secret.

The assistant rejects a supplied token that is invalid or expired with HTTP 401. It does not silently turn the user into an anonymous visitor.

Rotate the identity secret

Rotate secret generates a new value. Tokens signed with the old secret stop verifying immediately, with no grace period.

Prepare your backend update before rotating, then:

  1. Rotate the secret in Teaflask.
  2. Update your backend's secret storage with the new value.
  3. Ensure your backend signs new tokens with it and your frontend token callback obtains fresh tokens rather than returning cached old ones.

Identified requests using the old secret will fail during the cutover: signed-in users see a setup error in the assistant, and Steep records their journeys as anonymous. The new value does not exist until you rotate, so plan the backend update to follow that step promptly.