arrow_back AI Development
API keys, authentication, and rate limits

API keys, authentication, and rate limits

API keys are the front door to every AI service:

  • How API key authentication works (Bearer tokens, header vs query param)
  • Keeping keys safe: .env files, never in code, never in git
  • Rate limits: requests per minute, tokens per minute, tokens per day
  • Handling 429 Too Many Requests with exponential backoff
  • Usage dashboards on OpenAI, Anthropic, and Google
  • Cost estimation before you build: tokens × price per 1K