# Phase 3: Direct AI API Access

## Unlock the Full Power of AI Models — Directly

Welcome to Phase 3 (AI APIs & Vibe Coding). In the next 3 hours, you'll move beyond consumer AI interfaces and connect directly to the world's most capable AI models. You'll compare providers, understand costs, and build a multi-model command centre that saves you money while delivering superior results.

## Workshop Overview

This phase transforms you from an AI subscription consumer into a professional who commands multiple AI models through their APIs. You'll set up accounts with Anthropic (Claude), OpenAI (GPT), and Google (Gemini), test each model head-to-head, and learn the token economics that make direct API access 10x cheaper than monthly subscriptions.

## Learning Outcomes

By completing this phase, you will:

### Core Capabilities
- ✅ Connect to AI APIs from Anthropic, OpenAI, and Google
- ✅ Obtain, store, and rotate API keys securely
- ✅ Compare model capabilities across providers (Claude Fable 5, Opus 4.8, Sonnet 4.6, Haiku 4.5; GPT-4o, o3; Gemini 2.5 Pro/Flash)
- ✅ Understand token economics and calculate real costs per task
- ✅ Configure Claude Code and the Continue extension for multi-model access

### Professional Skills
- 💰 Reduce AI costs by 70-90% compared to consumer subscriptions
- 🔄 Switch between models strategically based on task requirements
- 🔒 Manage API keys with proper security practices
- 📊 Track and control spending across multiple providers
- 🧪 Evaluate model output quality for your specific work

### Immediate Benefits
- 💡 Access to 5+ leading AI models from your editor
- ⚡ Build a content generation workflow using the best model for each stage
- 🎯 Make informed decisions about which model to use and when
- 🚀 Professional-grade AI setup ready for daily use

## Workshop Structure

### Chapter Navigation

1. **[Introduction](00_introduction.md)** — Beyond ChatGPT (10 min)
   - Why direct API access changes everything
   - The cost revolution: subscriptions vs pay-per-use
   - What you'll build this morning

2. **[Core Concepts](01_concepts.md)** — Understanding AI APIs (30 min)
   - REST APIs, authentication, and request anatomy
   - Token economics and pricing across providers
   - Context windows, rate limits, and model selection
   - Key parameters: temperature, max_tokens, streaming

3. **[Hands-On Setup](02_hands_on.md)** — Your Multi-Model Command Centre (90 min)
   - Claude Code setup and Anthropic API keys
   - OpenAI account and GPT model configuration
   - Google Gemini and free-tier setup
   - Groq free inference for open-source models
   - Security: environment variables and `.gitignore`

4. **[Practical Exercises](03_exercises.md)** — Model Mastery (30 min)
   - Model shootout: creative, technical, and analytical tasks
   - Context window challenge with long documents
   - Speed vs quality vs cost trade-offs
   - Multi-model workflow: research to polished output

5. **[Real Project](04_project.md)** — Multi-Model Content Pipeline (20 min)
   - Build a professional deliverable using multiple models
   - Four project paths: business, academic, technical, creative
   - Real cost tracking and model preference documentation

6. **[Assessment](05_assessment.md)** — Validate Your Skills (10 min)
   - Knowledge check on API concepts and model selection
   - Practical tasks: API calls, cost calculations, troubleshooting
   - Reflection on workflow transformation

7. **[Resources](06_resources.md)** — Continue Your Journey
   - Provider documentation and console links
   - Python and curl reference for all three providers
   - Cost calculators, community links, and advanced techniques

## Who This Workshop Is For

### Perfect For:
- 📚 **Researchers**: Who need to process large documents and generate analyses
- 💼 **Business Professionals**: Who want AI-generated reports, proposals, and summaries
- 🎨 **Content Creators**: Who produce articles, social media copy, and marketing materials
- 🏛️ **Consultants**: Who need multi-perspective analysis and rapid content generation
- 🚀 **Anyone**: Who pays for ChatGPT, Claude Pro, or Gemini Advanced subscriptions

### You'll Succeed If You:
- Completed the Phase 1 workshop (VS Code setup) or have VS Code running
- Can create online accounts and enter payment details
- Want to reduce AI costs dramatically
- Are curious about comparing different AI models

### No Experience Required In:
- ❌ Programming or software development
- ❌ API usage or web services
- ❌ Command-line interfaces (we walk through every step)
- ❌ Machine learning or AI theory

## Technical Requirements

### Minimum Requirements:
- **VS Code**: Installed and running (from Phase 1)
- **Internet**: Stable connection for API calls
- **Browser**: For creating provider accounts
- **Email**: For verification codes
- **Payment Method**: Credit or debit card (you'll spend approximately £3-5 total)

### Accounts We'll Create:
- Anthropic Console (Claude models) — API key + £5-10 credit
- OpenAI Platform (GPT models) — API key + £5-10 credit
- Google AI Studio (Gemini models) — free tier, no card required
- Groq Console (open-source models) — free, no card required

## Learning Approach

### Our Teaching Philosophy:
- **Hands-On First**: Set up real accounts, make real API calls
- **Compare and Decide**: Test models head-to-head so you form your own preferences
- **Real Economics**: Track actual costs, not theoretical estimates
- **Immediate Payoff**: Leave with a working multi-model setup you'll use tomorrow
- **Non-Developer Friendly**: Every step explained; no prior coding knowledge needed

### Workshop Timing:
- **Total Duration**: 3 hours
- **Format**: Self-paced with suggested timings
- **Breaks**: Take as needed between chapters
- **Practice**: 70% hands-on, 30% concepts

## Success Stories

> "I was paying £57 a month for three AI subscriptions. Now I spend about £4 and have access to better models with more control."
> — James Chen, Marketing Director

> "Being able to switch between Claude for writing and Gemini for long documents is a genuine superpower. The cost comparison exercise alone was worth the morning."
> — Dr. Sarah Ahmed, Research Scientist

> "I had no idea you could talk to these models directly. The setup took 20 minutes and I've already saved a month's subscription cost."
> — Michael Torres, Management Consultant

## Ready to Start?

### Quick Readiness Check:
- [ ] VS Code installed and running
- [ ] Internet connection available
- [ ] Email access for provider sign-ups
- [ ] Credit/debit card to hand (for Anthropic and OpenAI)
- [ ] 3 hours of focused time
- [ ] A real project or task to enhance with AI

### Begin Your Transformation

**[Start with the Introduction -->](00_introduction.md)**

Or jump directly to:
- [Core Concepts](01_concepts.md) — Understand API fundamentals
- [Hands-On Setup](02_hands_on.md) — Start connecting immediately
- [Check Prerequisites](prerequisites.md) — Ensure you're ready

## Pro Tips for Success

1. **Set spending limits first**: Every provider lets you cap monthly spend. Do this before anything else.
2. **Start with the cheapest models**: Haiku 4.5 and GPT-4o-mini handle most tasks brilliantly.
3. **Keep a comparison log**: Note which model impressed you for each task type.
4. **Don't memorise pricing**: It changes frequently. Bookmark the provider consoles.
5. **Use your real work**: Generic test prompts won't reveal which model suits your needs.

## Support & Community

- **Questions?** Use the workshop Discord channel
- **Stuck on setup?** Check the troubleshooting section in Chapter 2
- **Share results**: Post your model comparisons in the workshop channel
- **Stay connected**: Join our alumni network for ongoing tips

---

*After this morning, you'll never overpay for AI access again. Let's connect you directly to the most powerful models on the planet.*

**[Start Phase 3: Introduction -->](00_introduction.md)**
