Initial AI SDK Setup and Gemini Integration

implementationChallenge

Prompt Content

Your first task is to initialize your AI SDK project and integrate Gemini 2.5 Pro for multimodal content generation. Set up a basic streaming chat endpoint. 

```typescript
import { createOpenAI } from '@ai-sdk/openai';
import { createGoogleGenerativeAI } from '@ai-sdk/google';
import { streamText } from 'ai';

const google = createGoogleGenerativeAI({ apiKey: process.env.GOOGLE_API_KEY });
const model = google('gemini-2.5-pro');

export async function POST(req: Request) {
  const { messages } = await req.json();

  const result = await streamText({
    model: model,
    messages,
    // You'll need to add tools for ad generation here later
  });

  return result.to Response();
}
```

Expand this to include a simple tool for 'generateAdContent' that takes user preferences and a conversational context, and returns a multimodal ad draft (text, image URL).

Try this prompt

Open the workspace to execute this prompt with free credits, or use your own API keys for unlimited usage.

Usage Tips

Copy the prompt and paste it into your preferred AI tool (Claude, ChatGPT, Gemini)

Customize placeholder values with your specific requirements and context

For best results, provide clear examples and test different variations