Free Llama 3.1 70B API on Vercel AI Gateway

Access Meta's Llama 3.1 70B through Vercel AI Gateway using your monthly Vercel free credits.

About the Model

Why choose Llama 3.1 70B?

Llama 3.1 70B provides excellent general-purpose instruction following and reasoning, offering a robust open-source alternative to GPT-4 class models.

How to Access for Free (via Vercel AI Gateway)

为什么要选择通过 Vercel 使用 Llama 3.1 70B?

作为开源霸主,本地部署 70B 模型需要极高的硬件成本。通过 Vercel AI Gateway,您可以无痛、免费地在云端调用这一强大模型。

Code Examples

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

// Often accessed via a compatible provider within Vercel's routing
const { text } = await generateText({
  model: openai('meta-llama/Meta-Llama-3.1-70B-Instruct'), 
  prompt: 'Write a quick poem about free AI models',
});
console.log(text);