Free Gemini 1.5 Pro API on Vercel AI Gateway

Truy cập Gemini 1.5 Pro miễn phí thông qua Vercel AI Gateway.

Về mô hình

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.

Cách truy cập miễn phí (thông qua Vercel AI Gateway)

Tại sao chọn gọi qua Vercel?

Vercel cung cấp 5 đô la tín dụng AI hàng tháng cho mỗi nhóm. Bạn có thể dùng thử mô hình này miễn phí qua Vercel AI SDK miễn là mức sử dụng của bạn không vượt quá giới hạn đó.

Ví dụ mã

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);