Week 5

Build Your Own Software, Part 2:
AI Generation Tools

NYU · Whatever Generative AI Is Doing Now · 2026

SCHEDULE

Week 1 Install and Claude Basics
Week 2 Research and Writing with Claude
Week 3 Chrome Use, Computer Use & MCPs
Week 4 Build Your Own Software, Part 1
Week 5 Build Your Own Software, Part 2: AI Generation Tools
Week 6 Week 6
Week 7 Demo Day

DEMO DAY — WEEK 7

5 minutes each. Show whatever you want: a live demo, slides, a video, a screen recording, etc.

• What you set out to build
• What you actually got working
• Where you struggled and what you learned

Everyone benefits from hearing where you struggled. Struggles are just as valuable as successes.

PRACTICE

The best way to learn these tools is to use them. Not to read about them, not to watch tutorials — to actually sit down and build something.

You’ll struggle...that’s expected

LEARNING VS CREATING

Building your project is one mode of working. But having side conversations with Claude, ChatGPT, etc. to learn is just as important.

“Explain how an API works”
“What does this error mean?”
“Why would I use X instead of Y?”

TODAY

1. Check in on your projects
2. What AI generation can do — Titles
3. How it works under the hood — fal.ai
4. Add generation to your app — the FAL MCP
5. Build session

Section 1

Project Check-In

WHERE ARE YOU?

Last week you built your first feature. Let’s take stock:

• Does your app run locally?
• Do you have at least one working feature?
• Is your code committed to git?
• What broke, and how did you fix it?

PUSH YOUR CODE TO GITHUB

If you haven’t already, let’s get your project on GitHub.

We’ll use the GitHub CLI — no SSH keys to set up, no tokens to copy-paste.

STEP 1: INSTALL HOMEBREW

Most dev tools on Mac install through Homebrew. If you don’t have it yet, paste this into Terminal:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Follow the prompts. It may ask for your password.

STEP 2: INSTALL THE GITHUB CLI

brew install gh

Then log in to your GitHub account:

gh auth login

Choose “GitHub.com”, then “Login with a web browser.” It will open a browser window to authenticate.

STEP 3: CREATE YOUR REPO & PUSH

If you already have a repo, just git push.

Today we’re adding a second capability to your project: AI-generated content.

SAME CYCLE, NEW FEATURE

Remember the SDLC from last week?

Plan → Build → Test → Review → Ship → Learn

We’re running that cycle again. Last week we built an app (like our drawing canvas). This week we’re adding a new capability: calling an external AI service to generate or transform images.

Section 2

What AI Generation Can Do

Before we build, let’s look at what’s possible.

TITLES

titles.xyz is a creative tool for AI image and video generation.

Unlike other platforms, we work directly with artists, train models on their works, and they are paid when you use their models.

WHAT CAN THESE MODELS DO?

Text to image: describe it, generate it
Image to image: transform an existing image
Inpainting/Editing: edit parts of an image
Text to video: generate short video clips
Image to video: animate a still image

Each model has different strengths. You can compare them in most apps today, including Titles.

MODELS WORTH KNOWING

Image: Flux (fast, high quality), Z-Image (fast/cheap), Recraft (design, typography), Gemini (Google’s native gen)

Video: Kling, Wan, Veo

New models ship constantly. The important thing isn’t memorizing names, it’s knowing that each one interprets prompts differently and has different strengths.

PROMPTING FOR GENERATION

Generation prompts are different from chat prompts.

Be descriptive: describe what you see, not what you want
Style matters: mention medium, lighting, mood, camera angle
Iterate: your first prompt is rarely your best
Try multiple models: same prompt, different results

Ask Claude to make skills :)

Demo: Generating images and video in Titles.

EXERCISE: EXPLORE TITLES

1. Go to titles.xyz and sign up
2. Generate an image with any model
3. Try the same prompt on a different model — compare the results
4. Try image-to-image: upload a photo and transform it

Section 3

How It Works Under the Hood: fal.ai

Titles is great for exploring. But if you want generation inside your own app, you need to understand what’s happening underneath.

WHAT IS FAL.AI?

fal.ai is a platform for running AI models via API.

You send a request with your prompt and settings, fal runs the model on their GPUs, and you get back the result.

It’s the infrastructure behind many AI tools — including parts of Titles.

WHY DOES THIS MATTER FOR YOUR APP?

An API lets you add generation as a feature, not just a standalone tool.

User draws a sketch → your app transforms it into a polished image
User types a prompt → your app generates an image
User uploads a photo → your app transforms it

This is how you go from “I used an AI tool” to “I built something with AI in it.”

HOW IT WORKS

1. Sign up at fal.ai and get an API key (for later)
2. Pick a model from their model library
3. Send a request: prompt + settings
4. fal runs the model on their GPUs
5. You get back a URL to the generated image or video

Your app displays the result. That’s it.

API KEYS — IMPORTANT

An API key is like a password that identifies you to fal.

• Get one from fal.ai/dashboard/keys
Never commit it to git — anyone who finds it can spend your money
• Store it in a .env file
• Make sure .env is in your .gitignore

Ask Claude: “Help me set up a .env file for my fal API key.”

PRICING

fal charges per request, not per month.

• Fast image models: fractions of a cent
• High-quality image models: a few cents
• Video models: roughly $0.05–$0.50 per clip

For this class, a few dollars of credit is plenty. You can set a budget in Fal so you never spend too much.

Section 4

The FAL MCP

In Week 3 we learned that MCPs give Claude new abilities.

The FAL MCP gives Claude the ability to generate images and video.

WHAT IS THE FAL MCP?

The FAL MCP connects Claude Code directly to fal.ai’s model library.

Once installed, you can ask Claude to generate images or video right from your terminal.

But more importantly: Claude can write the code that calls fal, and then test it by calling the API itself.

SETTING IT UP

1. Get your API key from fal.ai/dashboard/keys
2. In Warp, run:
claude mcp add fal-ai -- npx -y @fal-ai/mcp
3. Open Claude
4. Ask Claude: “Help me add my fal API key as an environment variable for the fal MCP.”

TWO WAYS TO USE IT

1. Quick generation
“Generate an image of a sunset over Brooklyn.”
Claude calls fal directly and shows you the result.

2. Build a feature
“Add a button to my drawing app that takes the canvas, sends it to fal, and shows the AI-generated version.”
Claude writes the frontend + backend code, using fal as the API.

Demo: Using the FAL MCP to generate content from Claude Code, then building a generation feature into our drawing app.

Section 5

Build Session

THE GOAL

By the end of today, your app should have a generation feature — something that calls fal.ai and shows the result to the user.

For example: our drawing app already has a canvas. Today we add a button that sends the drawing to an AI model and gets back a transformed image.

Same cycle as last week: Plan → Build → Test → Review.

STEP 1: PLAN

What kind of generation makes sense for your project?

• A drawing app → transform sketches into polished images
• A mood board tool → generate images from text descriptions
• A storytelling app → generate illustrations for each scene

STEP 2: BUILD

Tell Claude what you want. Be specific:

“Add a Generate button to my drawing app. When clicked, export the canvas as a PNG, send it to fal.ai using the FLUX.2 [klein] 4B Edit model with a prompt the user types, and display the result. Show a loading spinner while it generates.”

REMEMBER: API KEY SAFETY

Your fal API key should never be in your frontend code!

If your app is a Next.js project, the API call should go through an API route (server-side), not directly from the browser.

Tell Claude: “Make sure the fal API key stays server-side. Don’t expose it in the frontend.”

STEP 3: TEST

• Run your app locally
• Try generating something — does it work?
• Try an empty prompt — does it break gracefully?
• Try a really long prompt — what happens?
• Check: does the image actually show up, or just a broken link?

Generation features have more failure modes than static pages. Test thoroughly.

ITERATION TIPS

Start with FLUX.2 [klein] 4B Edit — it’s fast, cheap, and takes an input image + prompt. Perfect for transforming drawings or photos.
Show loading state — generation takes time. Don’t leave the user staring at nothing.
Handle errors — the API can fail. Show a message, not a blank page.
Watch your spend — add a generation counter or rate limit if you’re worried.

Homework

Due Next Week

HOMEWORK 1: FINISH YOUR GENERATION FEATURE

If you didn’t finish in class, complete it this week.

• Your app should call fal.ai and display the result
• The API key should be server-side, not in the frontend
• It should handle loading and error states
• Commit your working code

HOMEWORK 2: ITERATE

Consider if AI generation tools (image, video, text, 3D, etc) can be integrated in your personal app. 
It’s ok if not! 
But use some of the ideas from this week to keep making progress on your personal app.