CosmolinkOS Board now

What is an API key?

FOR BEGINNERS4 MIN READ
COSMO
COSMO'S SHORT ANSWER

An API key is a long secret code that lets one app use another service in your name. With online AI, your key tells the provider which account is asking. Treat it like a password: anyone who has it can use your account.

What is an API key, and why do AI apps ask for one? This guide explains it in plain words, shows how to get a key from an AI provider, and lists five habits that keep it safe.

A large golden key on a round pedestal pointing into a glowing pink door under a cloud.
An API key opens the door to an online AI service.

01What is an API key?

An API is a door that lets apps talk to a service without a person clicking around a website. An API key is the key to that door.

It looks like a long line of letters and numbers. When an app sends a question to an online AI model, it sends the key along. The provider checks the key, answers, and counts the use on your account.

COSMO'S TIP

A password is for you. An API key is for your apps.

02When do you need an API key for AI?

Do I need a key?
How you use AIKey needed?Why
A chat website or phone appNoYou sign in with your account.
Your own app or agent with an online modelYesThe app has to prove which account it uses.
A local model on your own hardwareNoNothing leaves for a provider, so there is no account to check.

Local AI or online AI: what stays private explains the two kinds of AI.

03How to get an API key

The steps are much the same with every AI provider:

  1. Create a developer account with the provider. This is separate from the chat app.
  2. Add a way to pay. Providers bill API use by how much you use.
  3. Find the API keys page in the account settings and create a new key.
  4. Give it a name that says where you will use it, such as "home server".
  5. Copy it straight away. Most providers show the full key only once.
  6. Paste it into the app that needs it, in its settings.

04How to keep an API key safe

  • NEVER SHARE ITDon't paste a key into a chat, an email, a forum post or a screenshot.
  • ONE KEY PER APPIf one leaks, you delete that key and the rest keep working.
  • SET A LIMITMost providers let you set a spending limit. Set one before you start.
  • KEEP IT OUT OF SHARED FILESDon't save a key in a file you upload or share with others.
  • DELETE WHAT YOU DON'T USEOld keys are open doors. Remove them.
SENTRY'S TIP

Think a key has leaked? Delete it on the provider's site and make a new one. It takes a minute.

05What happens to your words when you use a key?

A key connects your app to an online model. So the text of each task you send goes to that provider, and the provider's own rules say how it is handled. A local model needs no key, and your words stay on your hardware.

06What this means for CosmolinkOS

GOOD TO KNOW

In CosmolinkOS you only need an API key for online brains. You add your own key from a provider like Claude or OpenAI, and the welcome crew helps you add it. Local brains run through Ollama on your own hardware and don't need one.

07Questions people ask

What is an API key in simple words?

It is a long secret code that lets an app use an online service in your name. The service uses it to know which account is asking.

Is an API key the same as a password?

They do a similar job. A password lets you sign in. An API key lets an app sign in for you. Keep both secret.

Do I need an API key to run local AI?

No. A local model runs on your own hardware, so there is no provider account to check.

What happens if someone gets my API key?

They can use the service on your account until you delete the key. Delete it on the provider's site and create a new one.

Is a chat subscription the same as API access?

Usually not. Most providers keep the chat app and the API as separate accounts with separate billing.

WAITLIST OPENBe first to hear when CosmolinkOS is ready to try.

▸Keep going