Free Gemini 1.5 Pro API on Vercel AI Gateway

Access gemini-1-5-pro free through Vercel's $5 monthly credit.

About the Model

Why choose Gemini 1.5 Pro?

Gemini 1.5 Pro natively supports vast 1M to 2M token context windows, allowing it to process hours of video, massive codebases, and entire books in a single prompt.

How to Access for Free (via Vercel AI Gateway)

为什么选择通过 Vercel 调用?

Vercel 为每个团队(包括免费的 Hobby 个人计划)每月提供了价值 $5 的系统层 AI 额度。只要您当月的调用未超出 $5 的等值 token 消耗,即可通过 Vercel AI SDK 免费试用此模型。

Code Examples

javascript
import { generateText } from 'ai';
import { google } from '@ai-sdk/google';

const { text } = await generateText({
  model: google('gemini-1.5-pro-latest'),
  prompt: 'Write a quick poem about free AI models',
});
console.log(text);