Summary: You can make your first AI API call in under 5 minutes. This guide walks you through getting an API key, installing the SDK, making your first request, and building a simple chatbot — with real tested code examples that work today.


Prerequisites

That's it. No machine learning knowledge required.


Step 1: Get Your API Key (2 minutes)

You have two options:

Option A: Direct from OpenAI

  1. Go to platform.openai.com
  2. Sign up or log in
  3. Navigate to API Keys → Create new secret key
  4. Copy the key (starts with sk-)
  5. Add payment method (pay-per-use, starts at $5)

Option B: Through an API Gateway (recommended for beginners)

An API gateway gives you one key that works with all AI models (GPT-5, Claude, Gemini, DeepSeek), not just OpenAI. It's also significantly more cost-effective.

  1. Go to crazyrouter.com
  2. Register (free, includes starter credit)