تغطية الـ Endpoint
يعرض 2 endpoint(s) عامة: chat_completion, response.
curl -X POST https://runapi.ai/v1/chat/completions \
-H "Authorization: Bearer $RUNAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o-mini",
"messages": [
{
"role": "user",
"content": "Analyze this quarterly revenue data and produce a summary with key trends, anomalies, and three recommendations."
}
]
}'
import { GptClient } from "@runapi.ai/gpt";
const client = new GptClient();
const result = await client.chatCompletion.run({
model: "gpt-4o-mini",
messages: [{"role":"user","content":"Analyze this quarterly revenue data and produce a summary with key trends, anomalies, and three recommendations."}],
});
import os
import requests
response = requests.post(
"https://runapi.ai/v1/chat/completions",
headers={"Authorization": f"Bearer {os.environ['RUNAPI_API_KEY']}"},
json={"model":"gpt-4o-mini","messages":[{"role":"user","content":"Analyze this quarterly revenue data and produce a summary with key trends, anomalies, and three recommendations."}]}
)
response.raise_for_status()
<?php
$client = curl_init("https://runapi.ai/v1/chat/completions");
curl_setopt_array($client, [
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("RUNAPI_API_KEY"), "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode([
'model' => 'gpt-4o-mini',
'messages' => [['role' => 'user', 'content' => 'Analyze this quarterly revenue data and produce a summary with key trends, anomalies, and three recommendations.']],
])
]);
$response = curl_exec($client);
RunApi client = new RunApi(System.getenv("RUNAPI_API_KEY"));
Task task = client.chatCompletion().run({"model":"gpt-4o-mini","messages":[{"role":"user","content":"Analyze this quarterly revenue data and produce a summary with key trends, anomalies, and three recommendations."}]});
task.waitForResult();
require "runapi/gpt"
client = RunApi::Gpt::Client.new
result = client.chat_completion.run(
model: "gpt-4o-mini",
messages: [{role: "user", content: "Analyze this quarterly revenue data and produce a summary with key trends, anomalies, and three recommendations."}]
)
client := runapi.NewClient(os.Getenv("RUNAPI_API_KEY"))
task, err := client.chatCompletion.Run({"model":"gpt-4o-mini","messages":[{"role":"user","content":"Analyze this quarterly revenue data and produce a summary with key trends, anomalies, and three recommendations."}]})
if err != nil { log.Fatal(err) }
task.Wait()
$ runapi generate \
--model gpt-4o-mini \
--endpoint chat_completion \
--wait
17 إصدارات متاحة
اختر أي نموذج وابدأ التوليد في ثوانٍ.
| المزوّد | OpenAI |
| معرّف النموذج | gpt-4o-mini |
| النمط | Text |
| أنواع المهام | Synchronous |
| نقطة نهاية API | /v1/chat/completions |
| /v1/responses |
| /v1/messages | |
| /v1beta/models/gpt-4o-mini:generateContent | |
| /v1beta/models/gpt-4o-mini:streamGenerateContent | |
| وحدة الفوترة | 1K tokens |
| حالة الكتالوج | جاهز للتشغيل |
سجّل مجانًا وأنشئ مفتاح API لـ gpt-4o-mini من لوحة التحكم.
أرسل طلب POST إلى /v1/chat/completions باستخدام معرّف نموذج gpt-4o-mini ومعلماتك.
اقرأ استجابة gpt-4o-mini المكتملة مباشرة من نقطة النهاية.
يعرض 2 endpoint(s) عامة: chat_completion, response.
محسوبة بـ 1K tokens دون اشتراط اشتراك.
لم يتم نشر معلمات طلب لنقطة النهاية هذه.
أجب عن أسئلة العملاء من قاعدة معرفة خاصة، مما يقلل حجم التذاكر.
أعد ملخصات للعقود وحدد البنود المهمة لمراجعة المحامي.
أنشئ تلقائيًا اختبارات الوحدات ومراجعات الشيفرة واقتراحات إعادة الهيكلة داخل CI.
لا تتوفر ملاحظات موثّقة من العملاء لهذا النموذج بعد.
مرّر معرّف النموذج الظاهر في دليل البدء السريع.
تتدرج حدود المعدل لكل مفتاح بحسب مستوى الاستخدام. راجع صفحة التسعير للاطلاع على الحدود الحالية.
نعم — المتغير مجرد خيار. بدّل عبر تغيير معامل model.
حيثما يتوفر البث، يقدّم RunAPI البث من البداية إلى النهاية.
افتح issue في مستودع GitHub العام أو راسل الدعم عبر البريد الإلكتروني.