Dokumentation (english)

API Keys

How to authenticate and identify yourself when using APIs

Just like some websites require you to login to see information, APIs also need to identify who is sending requests.

Why API Keys Exist

When you use an API:

  1. the API needs to know who you are
  2. the API uses a computer to process your request
  3. some AI models are very costly to run

Therefore, there is something called an API key.

What Is an API Key?

An API key is like a combination of an email and a password that identifies you as the user when you send a request.

When you send a request, you attach the API key to it.

How API Keys Are Used

Mostly, API keys are added to the website URL:

https://api.example.com/weather?api_key=YOUR_KEY_HERE

The ?api_key= parameter tells the API who is sending the message and wants to get a response.

Different Names

Sometimes API keys are called by different names:

  • api_key
  • api_token
  • Token

They all serve the same purpose: identifying the user.

Public and Private Keys

In some applications, there are two types of keys:

  • Public keys: Can be shared, used for identification
  • Private keys: Must be kept secret, used for authentication

This is like a 2-factor authentication system.

The public key says "this is my account." and lets you enter. The private key proves "I am really the owner of this account." and defines what you are allowed to do and lets you act on it.

When working with AI models, API keys help track usage and manage costs.


Command Palette

Search for a command to run...

Schnellzugriffe
STRG + KSuche
STRG + DNachtmodus / Tagmodus
STRG + LSprache ändern

Software-Details
Kompiliert vor etwa 13 Stunden
Release: v4.0.0-production
Buildnummer: master@d237a7f
Historie: 10 Items