Free Gemini 1.5 Pro API on Vercel AI Gateway

通过 Vercel AI Gateway 免费访问 Gemini 1.5 Pro。

关于该模型

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.

如何免费接入 (通过 Vercel AI Gateway)

为什么选择通过 Vercel 调用?

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

调用代码示例

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);
Vercel AI Gateway Free Gemini 1.5 Pro API on Vercel AI Gateway - 免费 AI API | Free AI API