Securing API Keys
Last updated 2026-07-31What's new
- **Team Use of AI Tools**: Many teams struggle to use AI tools like Claude (a smart assistant) together, as most tools are designed for single users, with memories and connections tied to individual accounts.
- **Shared Context Setup**: A new approach uses existing tools (Notion for shared documents, supermemory.ai for team memory, and Claude for tasks) to create a simple team setup, avoiding custom builds.
- **Permissions and Access**: Notion manages who can see or edit what, ensuring team members only access documents they're permitted to, keeping everything up-to-date and secure.
- **Easy Integration**: Team members connect their Claude to Notion via their own login, and permissions set in Notion automatically apply, making the setup straightforward and user-friendly.
- Agents (AI tools that perform tasks) with API keys (special codes that allow access to software) can act without full user control, sometimes causing issues like deleting databases or overspending.
- To improve security, we can use open standards like RFC8693 (a set of rules for secure data exchange) to better manage agent access and track who's using API keys.
- Agents follow an execution path (a series of steps) when performing tasks, and we can implement access control (security measures) at various points in this path.
- Simply relying on human oversight (a person checking the agent's work) isn't enough, as agents may act quickly or when humans are distracted or tired.
- Claude Code (a tool for building AI-powered automations) lets you work with local files and online services like Gmail, Slack, or a CRM (customer relationship management system), making it more powerful than Claude Chat (a simple AI chatbot).
- Claude Code uses the same AI models (like Opus, Sonnet, or Haiku) as Claude Chat, but adds extra features for working with files and online services.
- Claude Code is like an AI harness (a tool that helps you use AI models), which sits between the AI model (the engine) and you (the driver), helping you build automations and agents (AI systems that can do tasks for you).
- The instructor, Nate, uses Claude Code to build and manage multiple businesses, showing how one person can do the work of a team with AI.
- Zed, an AI code editor, introduced a new protocol called Agent Client Protocol (ACP), a way for different AI coding assistants (agents) and tools (clients) to communicate, making it easier to use various agents in one place.
- ACP is open-source and already supported by over 40 clients, including popular tools like JetBrains and Obsidian, with agents like Open Code and Cursor built-in.
- The protocol allows agents to interact with clients through simple functions, like reading or editing files, and handles conversations in loops, making it easy to build and integrate new agents.
- Zed demonstrated making a basic AI coding agent compatible with ACP in just a few steps, showing how it can be easily integrated and used within their editor.
- A new AI tool called Jarvis (an AI assistant) helps manage and summarize team activities, ensuring security and control within a company's own AWS (Amazon Web Services, a cloud computing platform) account.
- This setup is designed for larger companies, non-profits, or organizations with strict guidelines, allowing them to securely use tools like Salesforce (a customer relationship management platform) or Slack (a communication tool) on mobile devices.
- The platform built on AWS Bedrock (a service for building and scaling generative AI applications) can be emulated in other cloud environments like Azure or GCP (Google Cloud Platform, a suite of cloud computing services).
- Users can create and manage multiple AI agents, set their roles, and connect them to communication tools like Telegram (a messaging app) or Slack, with all data and interactions secured within the AWS environment.
- GLM 5.2 (a new AI model) outperformed Opus 4.8 (another AI model) in creating 3D scenes, interactive explainers, dashboards, and games, showing better quality and style.
- GLM 5.2 offers a cost-effective alternative to other AI models, which can be expensive or taken down unexpectedly.
- The video demonstrates how to set up GLM 5.2 using Claude code (a platform for running AI models), making it easy for beginners to start using this new tool.
- Perplexity Computer is a new, easier-to-use AI tool (like a smart assistant) that doesn't require complex setup or maintenance, unlike OpenClaw (a more technical AI tool you install yourself).
- It has pre-built connections (called connectors) to many popular services like Gmail, Google Drive, and Notion, making it simple to integrate with your existing tools.
- Perplexity Computer can handle multiple tasks at once (called threads), keeping different topics separate, and it can write and run code, just like OpenClaw.
- It offers powerful AI models (like Opus 46, GPT54, and Sonnet 46) for advanced tasks, and you can teach it specific skills to perform custom actions.
- Claude Code (an AI assistant for writing code) can build a complete voice agent in just 15 minutes of work.
- Every voice agent needs four parts: persona (its personality), voice (which voice it uses), knowledge (what data it knows), and tools (what it can do).
- Tools like Firecrawl (a web scraper that extracts data from websites) now connect through MCP servers (plugin connectors) without manual setup.
- Voice agents can sound like you using AI voice clones trained on a few hours of your own voice recordings.
Key points
What it is
- An API key is like a password that lets an AI tool access a service on your behalf.
- Securing API keys means storing them safely and setting permissions to limit potential damage if a key is compromised.
- API keys should be owned and paid for by the client in professional projects to keep billing transparent.
How to use it
- Never store API keys directly in your code or public places like GitHub; use secrets files or a secrets manager instead.
- Store keys in environment variables (settings stored outside your code), like a `.env` file on your local machine.
- Locate your API key in the platform's account settings, copy it immediately, and save it securely.
Watch out for
- Avoid embedding API keys directly into source code or sharing them in chat messages or code logic.
- Run a security review before delivering a project to check for exposed keys or tokens in workflows or tool definitions.
- Be aware that agents running automated tasks might be tricked into sending data to external servers; use trusted execution modes to block these requests.
Tools named
- Claude Code (an AI coding assistant), GitHub (a platform for hosting and collaborating on code)
Lesson 1: What is Securing API Keys and why it matters
An API key is basically a password that lets an AI tool access a service on your behalf. When you build an AI project, you often connect to external models or platforms, and each connection uses a unique API key. If that key leaks, anyone can use your account, run up your bill, or steal your data.
Securing API keys means never storing them directly in your code or in places like GitHub, where they could be exposed. Instead, use secrets files (files hidden from version control) or a secrets manager to store them safely. You can also set different permissions for each key, so one AI agent might have read-only access while another can spend credits. This way, if a key is compromised, the damage is limited.
For professional AI projects, the rule is simple: the client should own their own API keys and pay for their own usage. This keeps billing transparent and prevents you from being on the hook for someone else’s costs. Before handing over any automation, run a security review to double-check that no keys are visible in logs, workflows, or conversation history. A clean handoff means the client knows exactly where to put their keys and how to set them up.
Ultimately, securing API keys protects your wallet, your data, and your client’s trust. Treat each key like a password—because in the world of AI development, it is.
Sources
- 2025-12-27 — How to Actually Deliver AI Projects (APIs, Hosting & Handover Explained)
- 2026-05-01 — Build & Sell Claude Code Operating Systems (2+ Hour Course)
- 2026-03-12 — Build & Sell with Claude Code (10+ Hour Course)
- 2026-01-21 — Master 95% of Claude Code in 36 Mins (as a beginner)
- 2026-05-09 — This is The Most Powerful Tool to Give to Claude Code
- 2026-04-17 — I Turned Claude Opus 4.7 Into a 247 Trader
- 2026-04-08 — I Tested Claude's New Managed Agents... What You Need To Know
Lesson 2: How to use Securing API Keys: step-by-step
Securing API keys is like protecting passwords—you never embed them directly into your source code. If you hard-code a key into a script and later push that code to a public GitHub repo, your key is exposed to anyone who views the file. Instead, always store keys in environment variables (settings stored outside your code). On your local machine, add your key to a `.env` file; on a deployment platform, paste the key into its environment variables section.
To get started, first locate your API key on the platform you are using. Typically, you find keys in the account settings under an "API Keys" section. When you generate a new key, immediately copy it and save it somewhere secure—many platforms show the full key only once. Never paste that key directly into a chat message or into your code logic. If you are working with a tool like Claude Code, explicitly tell it: "I will not give you my API key. I will put it in a local file myself." This keeps the key out of conversation history.
Before delivering a project, run a security review on your entire codebase to check that no keys or tokens are sitting in workflows or tool definitions. The clean handoff to a client should include a note that says: "Your API key belongs only in the `.env` file—not in the code or the workflow diagram." The client should always own and pay for their own keys, which keeps billing and responsibility transparent.
Sources
- 2026-03-12 — Build & Sell with Claude Code (10+ Hour Course)
- 2025-12-27 — How to Actually Deliver AI Projects (APIs, Hosting & Handover Explained)
- 2026-04-17 — I Turned Claude Opus 4.7 Into a 247 Trader
- 2026-05-10 — Hermes Agent Zero to Personal AI Assistant (1 Hour Course)
- 2026-01-21 — Master 95% of Claude Code in 36 Mins (as a beginner)
Lesson 3: Best practices and pitfalls
Securing API keys is critical because an API key (a password-like token that grants access to a service) accidentally exposed in code can let anyone use your account and run up bills. The most common mistake beginners make is embedding keys directly into source code. If that code gets pushed to a public repository or shared online, the key is immediately compromised. Instead, always store secrets (sensitive values like keys) in environment variable files, often called `.env` files. This keeps the key local to your machine and out of the code logic.
Before deploying any project, run a security review. Ask an AI tool to check for exposed keys, open webhooks, and other vulnerabilities. For client projects, the best practice is having the client create their own API key on their own account and paste it directly into the project. This way the key never travels over the internet to you, and the client retains full control and billing responsibility. When handing over a workflow, double-check that no keys or tokens remain in the files — provide clear instructions for where the client should place their own keys.
A related precaution: in some tools, an agent running automated tasks might be tricked into sending data to an external server. Using trusted execution modes can block those outbound requests, reducing risk. For private repositories where you control all inputs, this risk is very low, but it is still worth acknowledging.
Sources
- 2026-03-12 — Build & Sell with Claude Code (10+ Hour Course)
- 2025-12-27 — How to Actually Deliver AI Projects (APIs, Hosting & Handover Explained)
- 2026-01-21 — Master 95% of Claude Code in 36 Mins (as a beginner)
- 2026-04-17 — I Turned Claude Opus 4.7 Into a 247 Trader
- 2026-04-14 — How to Build 247 Claude Agents. Easy.
- 2026-05-01 — Build & Sell Claude Code Operating Systems (2+ Hour Course)