Skip to content

docs: warn against exposing assistant API key client-side#6197

Merged
ethanpalm merged 4 commits into
mainfrom
mintlify/7ca4ded9
Jun 16, 2026
Merged

docs: warn against exposing assistant API key client-side#6197
ethanpalm merged 4 commits into
mainfrom
mintlify/7ca4ded9

Conversation

@mintlify

@mintlify mintlify Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Adds a security warning to the assistant API key section of the REST API introduction:

  • Don't expose the assistant API key directly in client-side code in production — anyone with it can consume credits and incur overages.
  • Proxy assistant API requests through your own backend to keep the key server-side.
  • Use the proxy layer to add rate limiting, authentication, and bot protection.

Requested in Slack by Lucas.


Note

Low Risk
Documentation-only change to API introduction; no runtime or authentication code is modified.

Overview
Adds a <Warning> block to the Assistant API key section in api/introduction.mdx so production guidance is visible next to the existing “public token” wording.

The warning says not to embed the assistant API key directly in client-side code, because extracted keys can burn credits and trigger overages. It recommends proxying assistant API calls through your backend with the key in a server-side env var, and using that layer for rate limiting, authentication, and bot protection.

Reviewed by Cursor Bugbot for commit 633b48e. Bugbot is set up for automated code reviews on this repo. Configure here.

@mintlify

mintlify Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
mintlify 🟢 Ready View Preview Jun 16, 2026, 6:00 PM

@mintlify

mintlify Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
smartac 🟢 Ready View Preview Jun 16, 2026, 6:07 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@mintlify

mintlify Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
testsignup415 🟢 Ready View Preview Jun 16, 2026, 6:10 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@mintlify

mintlify Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
adminroletesting 🟢 Ready View Preview Jun 16, 2026, 6:13 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@mintlify

mintlify Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
hfh-d7a4d643 🟢 Ready View Preview Jun 16, 2026, 6:14 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@mintlify

mintlify Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
gwgwgw 🟢 Ready View Preview Jun 16, 2026, 6:16 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@mintlify

mintlify Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
tomee 🟢 Ready View Preview Jun 16, 2026, 6:17 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

Comment thread api/introduction.mdx Outdated
@ethanpalm ethanpalm merged commit c648070 into main Jun 16, 2026
4 checks passed
@ethanpalm ethanpalm deleted the mintlify/7ca4ded9 branch June 16, 2026 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants