Free GPT-4o-mini API on Vercel AI Gateway

Access gpt-4o-mini free through Vercel's $5 monthly credit.

About the Model

Why choose GPT-4o-mini?

GPT-4o-mini is OpenAI's most cost-effective and fastest model, perfect for high-volume tasks, quick queries, and robust API usage.

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 { openai } from '@ai-sdk/openai';

// Powered by Vercel AI Gateway's monthly credits (No OpenAI Key needed if configured in Vercel project)
const { text } = await generateText({
  model: openai('gpt-4o-mini'),
  prompt: 'Write a quick poem about free AI models',
});
console.log(text);