MARJ
Using AI
AI-15L3
IUsing AIchecked 91 days ago16 min read

Calling AI From Your Own Code: The API, Explained Properly

You'll walk away with

A working script that sends a prompt to a model's API and uses the response

If it looks different

⚠️ Version note. API endpoints, SDK names and field names change. The shape — authenticate, send messages, read the reply — is stable across providers. Code below is illustrative; check your provider's current docs for exact names. Last checked: 25 July 2026.

Members only

Finish the lesson. Make the thing.

Become a member to keep going. Every lesson and game, cancel any time in two clicks.

  1. 01Why call the API instead of using the chat app
  2. 02Get a key and store it safely
  3. 03Install the SDK
  4. 04Send your first request
  5. 05Understand the parameters you'll actually use
  6. 06Make it a real tiny program
  7. 07Common mistakes
  8. 40′Exercise, with a verifiable output
  9. 09Cheatsheet
  10. ▶The video and audio versions
Yearly$89/yrMonthly$9.99/moWeekly$4.99/wk
Got the output?

A working script that sends a prompt to a model's API and uses the response

Mark it when you've got the output in hand.
IAll Using AI lessons