Vercel v0

Use Vercel v0 models for web development with Agno agents.

The Vercel v0 API provides large language models, designed for building modern web applications. It supports text and image inputs, provides fast streaming responses, and is compatible with the OpenAI Chat Completions API format. It is optimized for frontend and full-stack web development code generation.

Vercel retired the v0 Model API endpoint (https://api.v0.dev/v1/) that this integration targets, in favor of the Platform API. Requests made with V0 will fail until Agno updates this integration. See Vercel's community announcement.

Installation

uv pip install openai agno

Authentication

Set your V0_API_KEY environment variable. You can create an API key on v0.dev.

export V0_API_KEY=your-v0-api-key

Example

Use V0 with your Agent:

from agno.agent import Agent
from agno.models.vercel import V0

agent = Agent(
    model=V0(id="v0-1.0-md"),
    markdown=True
)

# Print the response in the terminal
agent.print_response("Create a simple web app that displays a random number between 1 and 100.")

# agent.print_response("Create a webapp to fetch the weather of a city and display humidity, temperature, and wind speed in cards, use shadcn components and tailwind css")
View more examples here.

Parameters

ParameterTypeDefaultDescription
idstr"v0-1.0-md"The id of the Vercel v0 model to use
namestr"v0"The name of the model
providerstr"Vercel"The provider of the model
api_keyOptional[str]NoneThe API key for Vercel v0 (defaults to V0_API_KEY env var)
base_urlstr"https://api.v0.dev/v1/"The base URL for the Vercel v0 API (retired; see warning above)

V0 extends the OpenAI-compatible interface and supports most parameters from the OpenAI model.