What Is an API Key?
An API key is the credential your program shows when it calls another program, and this lesson explains what it proves, where Muse Wonder users create one, and how to keep it from leaking.

If you have ever followed a tutorial and hit a step that said “paste your API key here,” you have already met the idea. An API key is a long string of characters that one program shows to another program as proof of who is calling. This lesson explains what an API is, what the key does, where a Muse Wonder user creates one, and how to handle it so it does not end up working for someone else.
The short version
- An API is a defined door between two programs, with set rules for what can be asked and what comes back.
- An API key identifies who is calling, carries what that caller is allowed to do, and lets the service count usage against the right account.
- On the Meta Model API, you create a key in the developer dashboard, and Meta shows the full key only once, at creation.
- Treat a key like a password. Store it in an environment variable or a secrets manager, and never paste it into chats, screenshots, or public code.
- If a key leaks, rotate first and investigate second. Create a new key, move your app to it, then delete the old one.
What Is an API?
API stands for application programming interface. In plain terms, an API is how two programs talk to each other without either one needing to know how the other works inside.
A restaurant kitchen is a useful comparison. You do not walk into the kitchen and cook. You order from a menu, the kitchen prepares the dish, and a server brings it back. The menu lists what you can ask for, and the order follows a set format. An API works the same way. One program sends a request in an agreed format, the other program does the work, and a response comes back. The requesting program never sees the kitchen, and the kitchen never has to explain itself beyond the menu.
That defined door is why APIs are everywhere. A weather app does not run its own satellites. It asks a weather service’s API for the forecast. A shop’s website does not process card payments itself. It sends the charge to a payment service’s API. When a developer builds an app on Muse Wonder, the app does not contain the model. It sends your prompt to the Meta Model API and gets the model’s reply back.
What an API Key Does
The door needs a way to tell callers apart, and that is the key’s job. An API key is a unique string the service issues to you, and your program includes it with every request. Every request to the Meta Model API needs an API key.
The key does three things at once. First, it identifies who is calling, so the service knows which account a request belongs to. Second, it carries permission. A key can be limited in what it may reach. Create a separate key for each application, so one app’s key never unlocks another app’s access. Third, it meters usage. The service counts requests and tokens against the key’s account, which is how billing and rate limits attach to the right team. On the Meta Model API, keys on the same team share rate limits, so one runaway app can slow down every other key on that team.
A key is not the same as a password you type at a login screen, but it deserves the same handling. Anyone holding your key can send requests as you. A leaked key can use up your team’s rate limits, access uploaded files, and send requests on your behalf, and those requests are billed to your account.
Where You Meet Keys With Muse Wonder
Most Muse users never see an API key, because the Muse app handles authentication for you. Keys show up the moment you step into the developer side: building your own app on Muse Wonder, connecting a third-party tool that runs on your own key, or following a tutorial that talks to the Meta Model API directly.
The flow on Meta’s platform goes like this. You sign in at the Model API dashboard on dev.meta.ai and open the API keys tab. You click Create API key, give it a descriptive name, and create it. Then you copy the key right away, because you only see it once. Meta’s keys start with LLM_, followed by a numeric ID and the secret. When your program calls the API, it passes the key as a Bearer token in the Authorization header of each request, and the usual way to supply it is an environment variable named MODEL_API_KEY rather than a value typed into the code itself.
Pricing, rate limits, and model details change during a preview period, and the dashboard shows the current figures for your account. For the full walkthrough of access, pricing, and what changed from Spark, read our hands-on guide to the Wonder API.
Errors are part of the learning curve here, and the messages look cryptic until someone translates them. When you hit one, you can ask Muse to do the translating. Paste the error text, never your key, into a prompt like this:
I am calling the Meta Model API and got this error message: [paste the error text here, with no API key included]. Explain in plain English what this error means, what most likely caused it, and list the first three things I should check, in order.
A Worked Example: Priya’s Reading Log
Priya is building a small personal project, a reading log that sends her book notes to Muse Wonder and gets back a one-paragraph summary of each entry. She creates a key in the dashboard and names it “reading-log” so she can recognize it later. Instead of pasting the key into her script, she stores it as an environment variable on her laptop, and her script reads the variable when it runs. The script itself contains no secret, so she can show the code to a friend, post it in a forum question, or save it in a public repository without giving anything away.
The naming habit pays off a month later. Priya starts a second project, a meal planner, and creates a second key named “meal-planner” instead of reusing the first one. When she retires the reading log, she deletes its key in the dashboard, and the meal planner keeps working on its own key. One key per project means every key can be revoked on its own, and the usage view shows which project is spending what.
How to Handle a Key Safely
A few habits cover most of the risk:
- Store the key in an environment variable or a secrets manager, and keep it out of your code files.
- Never paste a key into a chat, a support ticket, a screenshot, or a screen recording. A key in a screenshot is a published key.
- Never commit a key to version control. If you keep keys in a local file, add that file to .gitignore before the first commit.
- Give each app or project its own key, with a name that says what it is for.
- Keep keys out of code that runs in a browser or a mobile app, where anyone can read it. Route those calls through a server you control instead.
- Check the usage view in the dashboard now and then. A spike you cannot explain is worth treating as a possible leak.
The same caution applies when an agent is doing the work for you. The permission layer that decides what Muse may do is covered in how Sentinel’s permissions work, and the wider habits around accounts and connected apps are in our guide to agent privacy and safety. A key you paste into a conversation becomes part of that conversation, so share error messages and code freely, and keep the key itself out.
If you are not sure where a key has been pasted over the life of a project, ask Muse to build you an audit checklist:
Give me a step-by-step checklist for auditing where an API key might have been exposed in a small software project. Cover code files, commit history, chat logs, screenshots, shared documents, and support tickets. For each place, tell me what to search for and what to do if I find the key there. Do not ask me to paste the key itself.
What Can Go Wrong, and the Fix
The common accident is a key pasted somewhere public. A developer hardcodes the key in a script, pushes the script to a public repository, and automated scanners find the key within minutes. The same thing happens when a key goes into a chat message asking for debugging help, because the helper did not need the key, only the error message.
The fix has a strict order: rotate first, investigate second. Deleting the public post is not enough, because copies and scanner logs already exist. Go to the dashboard, create a new key, update your app to use it, and then delete the old key. Once the old key is deleted, the leaked string is useless to anyone who copied it. Deleting one key leaves your other keys untouched. Only after the new key is live should you go back and work out where the leak happened, so it does not happen again.
You can also use Muse to plan the response before you touch anything:
An API key for my project may have been exposed in a public place. Write me a short response plan in the right order: how to rotate the key in the provider dashboard, how to update my app to use the new key, how to confirm the old key is revoked, and how to check the usage dashboard for requests I do not recognize. Keep each step to one or two sentences.
Keep yours in an environment variable, give every project its own, and rotate without hesitation the moment one escapes.


