AI Engineer Guide

Vercel v0 LLM API

Vercel has recently released v0 LLM API - which is trained to build web apps and might have been used to power the previous version of v0.dev

It is OpenAI Chat Completion API/SDK compatible which suggest that it might been a fine tuned or distilled version of a OpenAI model.

Here are some of the things that they’ve mentioned in their docs as features:

Example Snippet

You can get the key in v0.dev settings

curl https://api.v0.dev/v1/chat/completions \
  -H "Authorization: Bearer $V0_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "v0-1.0-md",
    "messages": [
      { "role": "user", "content": "Create a Next.js AI chatbot" }
    ]
  }'

And if you’re using AI SDK by Vercel

npm install ai @ai-sdk/vercel
import { generateText } from 'ai';
import { vercel } from '@ai-sdk/vercel';
 
const { text } = await generateText({
  model: vercel('v0-1.0-md'),
  prompt: 'Create a Next.js AI chatbot with authentication',
});

Theo has recently posted a video about it which is pretty good.

References

Happy building apps!

#Vercel #V0 #Bookmark