Case & CodeA FIELD GUIDE TO AI
Start learning
Intermediate

API key

Also: API keys

In plain words

A secret password that proves a program is allowed to use a service. Keep it private.

The fuller definition

An API key is a credential used to identify or authorize a program's access to a service. It should be handled as a secret when it grants privileged or billable access.

How it fits together
  1. Protected storage

    Keep the credential

  2. Server request

    Attach securely

  3. Service

    Check authorized use

A simplified relationship, not a screenshot or a complete design.

A concrete example

A server reads its key from protected configuration when calling a model API.

The distinction that matters

Do not embed a secret key in a public webpage, prompt example, or repository.

Related terms

Where it is taught

APIs and JSON: connect a model to a small program

Source and further reading

MDN · Web technology glossary

The definition and example are written for this library. The link gives background, official documentation or legal authority as labelled. Legal scope depends on the jurisdiction and current text; product features depend on release and settings.

Lessons, terms, practical guides and sources ESC