יצירת השלמת צ'אט
ממשק Chat Completions תואם OpenAI. הגדירו stream=true כדי לקבל Server-Sent Events. מעטפת התגובה והשגיאה עוקבת אחר צורת Chat Completions התואמת ל-OpenAI.
- סוג: stringX
- Felo - Channel קודי ערוץ ציבורי מופרדים בפסיקים ובסדר מוגדר. השמיטו את הכותרת כדי להשתמש ב-default; אסור להשתמש ב-default יחד עם ערכים אחרים. במצב ארנק, default סורק את סדר הערוצים הציבוריים האפקטיבי של המודל מהסוף להתחלה, מדלג על ערוצים לא מפורסמים או לא זמינים, ובוחר את הספק של הערוץ הזמין הראשון. הוא כולל נקודות קצה זמינות מאותו ספק עם אותו מזהה מודל חיצוני ואותה דרגת שירות. ערוצים מפורשים מאומתים לפי הסדר שהלקוח ציין; רק קבוצת הספק של הערוץ הראשון נשלחת. אין נפילה אוטומטית לספקים אחרים. כותרות ספק מדור קודם אינן יכולות לעקוף את ניתוב הערוצים.
- סוג: array object[] · ChatMessage[] 1…messagesחובה
- contentעשוי להיות nullחובה
- סוג: string
- roleסוג: string enumחובהערכים
- system
- developer
- user
- assistant
- tool
- nameסוג: string
- toolסוג: string
_call _id - toolסוג: array object[]
_calls - propertyסוג: anything
Name
- propertyסוג: anything
Name
- סוג: stringmodelחובה
- סוג: integermax
_completion _tokens מינימום:1Integer numbers.
- סוג: integermax
_tokens מינימום:1Integer numbers.
- סוג: integernמינימום:1
Integer numbers.
- סוג: objectresponse
_format - propertyסוג: anything
Name
- סוג: string | nullservice
_tier נכון לעכשיו נתמך רק default (סטנדרטי). ערך שהושמט, null, כינויים ומחרוזות לא נתמכות נופלים חזרה ל-default; סוגים אחרים מחזירים HTTP 400. הערוצים והמחירים המוגדרים נשארים ללא שינוי. ממשקי טקסט שולחים את הערך הסטנדרטי של הספק; ממשקי Decisions ויצירה משמיטים את השדה מהבקשה לספק.
- עשוי להיות nullstop
- סוג: string
- סוג: booleanstream
- סוג: numbertemperatureמינימום:0
- tool
_choice - סוג: string
- סוג: array object[]tools
- propertyסוג: anything
Name
- סוג: anythingproperty
Name
- סוג: numbertop
_p מינימום:0מקסימום:1 - סוג: stringuser
- סוג: anythingproperty
Name
- סוג: object · ChatCompletionResponse200
השלמת צ'אט או תגובת סטרימינג
- סוג: array object[] · ChatChoice[]choicesחובה
- finishסוג: string | null
_reason - indexסוג: integer
Integer numbers.
- logprobsסוג: object | null
- propertyסוג: anything
Name
- messageסוג: object · ChatMessage
- contentעשוי להיות nullחובה
- סוג: string
- roleסוג: string enumחובהערכים
- system
- developer
- user
- assistant
- tool
- nameסוג: string
- toolסוג: string
_call _id - toolסוג: array object[]
_calls - propertyסוג: anything
Name
- propertyסוג: anything
Name
- propertyסוג: anything
Name
- סוג: stringidחובה
- סוג: stringobjectחובה
בדרך כלל chat.completion בתגובות ללא סטרימינג.
- סוג: integer פורמט: int64created
Signed 64-bit integers (long type).
- סוג: stringmodel
- סוג: stringsystem
_fingerprint - סוג: object · Usageusage
אובייקט שימוש של הספק. השדות משתנים לפי נקודת הקצה והספק.
- propertyסוג: anything
Name
- סוג: anythingproperty
Name
- סוג: object · OpenAIErrorResponse400
בקשה, מודל או מיפוי ספקים לא חוקיים
מעטפת שגיאה תואמת OpenAI. ה-Router עשוי לכלול code ו-message בלי כל שדות הספק החיצוני האופציונליים.
- סוג: objecterrorחובה
- messageסוג: stringחובה
- codeסוג: string | null
- paramסוג: string | null
- typeסוג: string
סוג שגיאה תואם OpenAI כשמסופק.
- propertyסוג: anything
Name
- סוג: anythingproperty
Name
application/json - סוג: object · OpenAIErrorResponse401
מפתח API של Felo לא חוקי או חסר
מעטפת שגיאה תואמת OpenAI. ה-Router עשוי לכלול code ו-message בלי כל שדות הספק החיצוני האופציונליים.
- סוג: objecterrorחובה
- messageסוג: stringחובה
- codeסוג: string | null
- paramסוג: string | null
- typeסוג: string
סוג שגיאה תואם OpenAI כשמסופק.
- propertyסוג: anything
Name
- סוג: anythingproperty
Name
application/json - סוג: object · OpenAIErrorResponse402
יתרה לא מספקת
מעטפת שגיאה תואמת OpenAI. ה-Router עשוי לכלול code ו-message בלי כל שדות הספק החיצוני האופציונליים.
- סוג: objecterrorחובה
- messageסוג: stringחובה
- codeסוג: string | null
- paramסוג: string | null
- typeסוג: string
סוג שגיאה תואם OpenAI כשמסופק.
- propertyסוג: anything
Name
- סוג: anythingproperty
Name
application/json - סוג: object · OpenAIErrorResponse403
החשבון אינו מורשה להשתמש במודל. מודלים מושבתים נדחים גם הם לפני קריאות לספק החיצוני. בקשות ומשימות שכבר התקבלו ממשיכות.
מעטפת שגיאה תואמת OpenAI. ה-Router עשוי לכלול code ו-message בלי כל שדות הספק החיצוני האופציונליים.
- סוג: objecterrorחובה
- messageסוג: stringחובה
- codeסוג: string | null
- paramסוג: string | null
- typeסוג: string
סוג שגיאה תואם OpenAI כשמסופק.
- propertyסוג: anything
Name
- סוג: anythingproperty
Name
application/json - סוג: object · OpenAIErrorResponse429
הגעתם למגבלת הוצאות או בקשות
מעטפת שגיאה תואמת OpenAI. ה-Router עשוי לכלול code ו-message בלי כל שדות הספק החיצוני האופציונליים.
- סוג: objecterrorחובה
- messageסוג: stringחובה
- codeסוג: string | null
- paramסוג: string | null
- typeסוג: string
סוג שגיאה תואם OpenAI כשמסופק.
- propertyסוג: anything
Name
- סוג: anythingproperty
Name
application/json - סוג: object · OpenAIErrorResponse502
בקשת הספק החיצוני נכשלה
מעטפת שגיאה תואמת OpenAI. ה-Router עשוי לכלול code ו-message בלי כל שדות הספק החיצוני האופציונליים.
- סוג: objecterrorחובה
- messageסוג: stringחובה
- codeסוג: string | null
- paramסוג: string | null
- typeסוג: string
סוג שגיאה תואם OpenAI כשמסופק.
- propertyסוג: anything
Name
- סוג: anythingproperty
Name
application/json - סוג: object · OpenAIErrorResponse503
הספק או שירות החיוב אינם זמינים
מעטפת שגיאה תואמת OpenAI. ה-Router עשוי לכלול code ו-message בלי כל שדות הספק החיצוני האופציונליים.
- סוג: objecterrorחובה
- messageסוג: stringחובה
- codeסוג: string | null
- paramסוג: string | null
- typeסוג: string
סוג שגיאה תואם OpenAI כשמסופק.
- propertyסוג: anything
Name
- סוג: anythingproperty
Name
application/json
curl https://openapi.felo.ai/api/v1/chat/completions \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"model": "gpt-5.5",
"messages": [
{
"role": "user",
"content": "Write a one-sentence greeting."
}
],
"stream": false
}'
{
"id": "string",
"object": "string",
"created": 1,
"model": "string",
"choices": [
{
"index": 1,
"message": {
"role": "system",
"content": "string",
"name": "string",
"tool_call_id": "string",
"tool_calls": [
{
"additionalProperty": "anything"
}
],
"additionalProperty": "anything"
},
"finish_reason": null,
"logprobs": null,
"additionalProperty": "anything"
}
],
"usage": {
"additionalProperty": "anything"
},
"system_fingerprint": "string",
"additionalProperty": "anything"
}