Skip to content
Dashboard

Llama 4 is now available on Vercel Marketplace

Software Engineer
vercel install groq

import { groq } from '@ai-sdk/groq';
import { streamText } from 'ai';
import fs from 'fs'
const result = streamText({
model: groq('meta-llama/llama-4-scout-17b-16e-instruct'),
messages: [
{
role: 'user',
content: [
{ type: 'text', text: 'Describe the image in detail.' },
{ type: 'image', image: fs.readFileSync('./data/llama.png') },
],
},
],
});
for await (const textPart of result.textStream) {
process.stdout.write(textPart);
}