Skip to content
MUI’s hosted AI Assistant backend shuts down at the end of 2026.Switch in two lines →
  • Products
    • AG Grid AI Toolkit Early accessThe model and the server behind the toolkit.
    • MUI X Data Grid StableThe backend for the Premium AI Assistant.
    • TanStack Table Public alphaA plugin that applies each answer to your table.
    • AG Studio Early accessA hosted backend for its assistant, not built yet.
  • How it works
  • Accuracy
  • Pricing
  • Security
  • Docs
    • Quickstart: server route
    • Quickstart: TanStack Table
    • Browser keys
    • Moving from MUI’s hosted service
    • Guide: when MUI’s service retires
Sign inStart a 7-day trial
Menu
  • Products
    • AG Grid AI Toolkit Early access
    • MUI X Data Grid Stable
    • TanStack Table Public alpha
    • AG Studio Early access
  • How it works
  • Accuracy
  • Pricing
  • Security
  • Docs
    • Quickstart: server route
    • Quickstart: TanStack Table
    • Browser keys
    • Moving from MUI’s hosted service
    • Guide: when MUI’s service retires
  • Sign in

Product

  • How it works
  • Accuracy
  • Pricing
  • Data and security

Grids

  • AG Grid AI ToolkitEarly access
  • MUI X Data Grid PremiumStable
  • TanStack TablePublic alpha
  • AG StudioEarly access

Docs

  • Quickstart: server route
  • Browser keys
  • Guide: when MUI’s service retires

Company

  • Contact
  • Terms
  • Privacy

Not affiliated with or endorsed by MUI or AG Grid. MUI and AG Grid are trademarks of their respective owners.

© 2026 Gridsay

Docs pages
Start
  • Documentation
  • How it works
  • Examples
MUI X Data Grid
  • Quickstart: server route
  • From the browser
  • Using the helper
  • Filtering
  • Sorting
  • Grouping
  • Aggregation
  • Pivoting
  • Charts
  • Row selection
  • Follow-up questions
  • Refusals and errors
  • Moving from MUI’s service
  • Reference
TanStack Table
  • Quickstart
  • Describing columns
  • Filtering
  • Sorting
  • Grouping
  • Row selection
  • Server-side data
  • Controlled state
  • Undo and reset
  • Refusals and errors
  • API reference
Keys and sign-in
  • Secret and publishable keys
  • Browser keys
  • JWT and OIDC
  • Session tokens
  • Identity webhook
  • Per-user limits
  • The console
  • Data and privacy
HTTP API
  • HTTP API
  • Authentication
  • Data Grid endpoint
  • Follow-up questions
  • Private mode
Reference
  • Errors
  • Limits
  • Tiers and credits
  • @gridsay/core
On this page

On this page

  1. Choose a key
  2. Create a key
  3. Change a key
  4. Rotate a key
  5. Revoke a key
  6. Next
Skip to the article
Start
  • Documentation
  • How it works
  • Examples
MUI X Data Grid
  • Quickstart: server route
  • From the browser
  • Using the helper
  • Filtering
  • Sorting
  • Grouping
  • Aggregation
  • Pivoting
  • Charts
  • Row selection
  • Follow-up questions
  • Refusals and errors
  • Moving from MUI’s service
  • Reference
TanStack Table
  • Quickstart
  • Describing columns
  • Filtering
  • Sorting
  • Grouping
  • Row selection
  • Server-side data
  • Controlled state
  • Undo and reset
  • Refusals and errors
  • API reference
Keys and sign-in
  • Secret and publishable keys
  • Browser keys
  • JWT and OIDC
  • Session tokens
  • Identity webhook
  • Per-user limits
  • The console
  • Data and privacy
HTTP API
  • HTTP API
  • Authentication
  • Data Grid endpoint
  • Follow-up questions
  • Private mode
Reference
  • Errors
  • Limits
  • Tiers and credits
  • @gridsay/core

Secret and publishable keys

On this page

  1. Choose a key
  2. Create a key
  3. Change a key
  4. Rotate a key
  5. Revoke a key
  6. Next

Every question your app sends to Gridsay carries one of your organization's API keys in the x-api-key header. A secret key stays on your server. A publishable key goes in your page.

Choose a key#

Secret keyPublishable key
Starts withSecret keysk_gs_Publishable keypk_gs_
Lives inSecret keyYour server's environment. Never in your page, your bundle or your repositoryPublishable keyYour page. It is meant to be seen
Who sends the questionSecret keyA route on your server, which forwards itPublishable keyYour user's browser, straight to Gridsay
Who checks the userSecret keyYour route, with your own sign-inPublishable keyGridsay, from the sign-in your page sends with every question
Allowed originsSecret keyOptionalPublishable keyRequired: with none, every question is refused
Per-user limitsSecret keyYours to apply in your routePublishable keySet in the console, on Auth and limits
Can ask for session tokensSecret keyYesPublishable keyNo

Use a secret key when your app has a server route for the table: the MUI X Data Grid quickstart and the TanStack Table quickstart both start there. Use a publishable key when you want no route on your server: Browser keys walks through it.

Anyone who has a secret key can spend your credits, so keep it on the server and check your own sign-in in the route that uses it. A publishable key is safe in a page because it does two checks on every question: the site it comes from, and the user's sign-in. An allowed origin alone is not a sign-in: a program outside a browser can send any Origin header.

A key is not tied to one table. Keys do not sign you in to the console either: that is your own console account.

.env.local
GRIDSAY_URL=https://api.gridsay.comGRIDSAY_SECRET_KEY=<your secret key>

Create a key#

Owners and admins create, change and revoke keys. Members see the list but cannot change it. Your organization needs a running trial or plan.

  1. In the console, open API keys and choose Create key.
  2. Enter a Name of up to 32 characters, named after where it runs, such as Production.
  3. Under Type, choose Secret or Publishable.
  4. Choose a Tier. Fast is the default; Tiers and credits explains the others.
  5. For a publishable key, enter its Allowed origins and press Enter after each one. Allowed origins shows what each form matches.
  6. Choose Create key and copy it.

The full key is shown once. We keep only a hash of it, so a lost key cannot be shown again: create another.

How many keys you can have depends on your plan: up to five on Pro, secret and publishable together; no limit on Business; on Enterprise, what your contract says.

A publishable key also needs a way to identify your users before it answers anything: see Browser keys. A publishable key created in Setup starts with limits for each user; one created on API keys has none until you add them. Starter limits has the numbers.

Change a key#

Choose Edit beside the key to change its Name, Tier or Allowed origins, then save. A change applies from the next question. The key's value stays the same, and its type cannot change: to switch type, create a new key.

On a secret key, Allowed origins (optional) is empty by default, which allows any site.

Leave a secret key's origins empty

Allowed origins are meant for publishable keys. On a secret key, they refuse questions and session-token calls with 403 origin_not_allowed when neither Origin nor Referer is sent. Calls from your server usually carry neither. Key inspection checks the key alone. For questions and session tokens, the origin must match an entry or be http://localhost or http://127.0.0.1.

Rotate a key#

There is no rotate button. Rotating means replacing:

  1. Create a new key of the same type, with the same tier and origins. For a publishable key, also set the same sign-in method and limits, and save its secret again if the method has one: secrets belong to one key.
  2. Put the new key in your server's environment or your page, and deploy.
  3. Ask a question and check that it appears under Usage.
  4. Revoke the old key.

The new key starts with its own limit counters, and conversations started with the old key do not continue on it. On Pro, you need a free slot for the new key before you revoke the old one.

Revoke a key#

Choose Revoke, then Revoke key. It stops working at once and cannot be restored. Any secret saved for it is deleted with it. Its past questions stay in Usage, under Deleted key.

A question sent with a revoked, unknown or malformed key is refused before it reaches the model, and is not charged:

JSON
{  "ok": false,  "statusCode": 401,  "code": "invalid_api_key",  "message": "The assistant is not available right now.",  "detail": "Missing, malformed, expired, disabled or unrecognized x-api-key, or invalid stored key settings. Use an enabled key from /app/keys."}

Your user sees "The assistant is not available right now." A key marked Disabled by Gridsay answers the same way. Only we can turn it back on: contact us.

Next#

  • Browser keys
  • Authentication
  • Errors