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

เข้าถึง GPT-4o-mini ได้ฟรีผ่าน Vercel AI Gateway

อัปเดตเมื่อ 2/7/2569ตัวอย่างโค้ด 3 รายการ
加载评分…

เกี่ยวกับโมเดล

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.

วิธีเข้าถึงฟรี (ผ่าน Vercel AI Gateway)

ทำไมต้องเลือกโทรผ่าน Vercel?

Vercel มอบเครดิต AI มูลค่า $5 ต่อเดือนสำหรับทุกทีม คุณสามารถทดลองใช้โมเดลนี้ได้ฟรีผ่าน Vercel AI SDK ตราบใดที่การใช้งานของคุณไม่เกินขีดจำกัดนั้น

ทดลองใช้ในเบราว์เซอร์

เลือกโมเดล วางคีย์ฟรีของคุณเอง แล้วรันได้เลย คีย์ของคุณถูกส่งเพียงครั้งเดียวเพื่อเรียกผู้ให้บริการ และจะไม่ถูกเก็บไว้บนเซิร์ฟเวอร์ของเรา

เลือกโมเดล วางคีย์ฟรีของคุณเอง แล้วรันได้เลย คีย์ของคุณถูกส่งเพียงครั้งเดียวเพื่อเรียกผู้ให้บริการ และจะไม่ถูกเก็บไว้บนเซิร์ฟเวอร์ของเรา

ตัวอย่างโค้ด

curl
curl https://ai-gateway.vercel.sh/v1/chat/completions \
  -H "Authorization: Bearer $AI_GATEWAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"openai/gpt-4o-mini","messages":[{"role":"user","content":"Write a short checklist for choosing a free AI API."}]}'
python
from openai import OpenAI

client = OpenAI(base_url="https://ai-gateway.vercel.sh/v1", api_key="AI_GATEWAY_API_KEY")
response = client.chat.completions.create(
    model="openai/gpt-4o-mini",
    messages=[{"role": "user", "content": "Write a short checklist for choosing a free AI API."}],
)
print(response.choices[0].message.content)
javascript
import { generateText } from "ai";

const { text } = await generateText({
  model: "openai/gpt-4o-mini",
  prompt: "Write a short checklist for choosing a free AI API.",
});

console.log(text);

ความคิดเห็นจากชุมชน

ความคิดเห็นผูกกับบัญชี GitHub ของคุณ — เข้าสู่ระบบเพื่อร่วมพูดคุย