יצירת הודעת Claude
נקודת קצה תואמת Claude Messages API. הגדירו stream=true כדי לקבל אירועי זרם הודעות בסגנון Claude. שדות הבקשה, התגובה ושגיאות האימות עוקבים אחר פרוטוקול Claude Messages; ה-Router עשוי גם להחזיר מעטפת שגיאת gateway מסוננת עבור כשלי תשתית.
- סוג: stringX
- Felo - Channel קודי ערוץ ציבורי מופרדים בפסיקים ובסדר מוגדר. השמיטו את הכותרת כדי להשתמש ב-default; אסור להשתמש ב-default יחד עם ערכים אחרים. במצב ארנק, default סורק את סדר הערוצים הציבוריים האפקטיבי של המודל מהסוף להתחלה, מדלג על ערוצים לא מפורסמים או לא זמינים, ובוחר את הספק של הערוץ הזמין הראשון. הוא כולל נקודות קצה זמינות מאותו ספק עם אותו מזהה מודל חיצוני ואותה דרגת שירות. ערוצים מפורשים מאומתים לפי הסדר שהלקוח ציין; רק קבוצת הספק של הערוץ הראשון נשלחת. אין נפילה אוטומטית לספקים אחרים. כותרות ספק מדור קודם אינן יכולות לעקוף את ניתוב הערוצים.
- סוג: integermax
_tokens מינימום:1חובהInteger numbers.
- סוג: array object[] · ClaudeMessage[] 1…messagesחובה
- contentחובה
- סוג: string
- roleסוג: string enumחובהערכים
- user
- assistant
- propertyסוג: anything
Name
- סוג: stringmodelחובה
- סוג: objectmetadata
- propertyסוג: anything
Name
- סוג: string | nullservice
_tier נכון לעכשיו נתמך רק default (סטנדרטי). ערך שהושמט, null, כינויים ומחרוזות לא נתמכות נופלים חזרה ל-default; סוגים אחרים מחזירים HTTP 400. הערוצים והמחירים המוגדרים נשארים ללא שינוי. ממשקי טקסט שולחים את הערך הסטנדרטי של הספק; ממשקי Decisions ויצירה משמיטים את השדה מהבקשה לספק.
- סוג: array string[]stop
_sequences - סוג: booleanstream
- system
- סוג: string
- סוג: numbertemperatureמינימום:0מקסימום:1
- סוג: objectthinking
- propertyסוג: anything
Name
- tool
_choice - סוג: string
- סוג: array object[]tools
- propertyסוג: anything
Name
- סוג: anythingproperty
Name
- סוג: integertop
_k מינימום:0Integer numbers.
- סוג: numbertop
_p מינימום:0מקסימום:1 - סוג: anythingproperty
Name
- סוג: object · ClaudeMessageResponse200
הודעת Claude או תגובת סטרימינג
- סוג: array object[] · ClaudeContentBlock[]contentחובה
- typeסוג: string enumחובהערכים
- text
- image
- document
- tool
_use - tool
_result - thinking
- contentסוג: string | array
- idסוג: string
- inputסוג: object
- propertyסוג: anything
Name
- nameסוג: string
- sourceסוג: object
- propertyסוג: anything
Name
- textסוג: string
- propertyסוג: anything
Name
- סוג: stringidחובה
- סוג: stringmodelחובה
- roleconst:assistantחובה
- סוג: string | nullstop
_reason חובה - typeconst:messageחובה
- סוג: string | nullstop
_sequence - סוג: object · Usageusage
אובייקט שימוש של הספק. השדות משתנים לפי נקודת הקצה והספק.
- propertyסוג: anything
Name
- סוג: anythingproperty
Name
- סוג: object · ClaudeErrorResponse400
שגיאת invalid_request_error של Claude או שגיאת אימות בקשה של ה-Router
מעטפת שגיאה תואמת Claude Errors API עבור בקשות Messages.
- סוג: objecterrorחובה
- messageסוג: stringחובה
- typeסוג: stringחובה
- propertyסוג: anything
Name
- typeconst:errorחובה
- סוג: stringrequest
_id - סוג: anythingproperty
Name
application/json - סוג: object · ClaudeErrorResponse401
מפתח API של Felo לא חוקי או חסר
מעטפת שגיאה תואמת Claude Errors API עבור בקשות Messages.
- סוג: objecterrorחובה
- messageסוג: stringחובה
- typeסוג: stringחובה
- propertyסוג: anything
Name
- typeconst:errorחובה
- סוג: stringrequest
_id - סוג: anythingproperty
Name
application/json - סוג: object · ClaudeErrorResponse402
יתרה לא מספקת
מעטפת שגיאה תואמת Claude Errors API עבור בקשות Messages.
- סוג: objecterrorחובה
- messageסוג: stringחובה
- typeסוג: stringחובה
- propertyסוג: anything
Name
- typeconst:errorחובה
- סוג: stringrequest
_id - סוג: anythingproperty
Name
application/json - סוג: object · ClaudeErrorResponse403
החשבון אינו מורשה להשתמש במודל. מודלים מושבתים נדחים גם הם לפני קריאות לספק החיצוני. בקשות ומשימות שכבר התקבלו ממשיכות.
מעטפת שגיאה תואמת Claude Errors API עבור בקשות Messages.
- סוג: objecterrorחובה
- messageסוג: stringחובה
- typeסוג: stringחובה
- propertyסוג: anything
Name
- typeconst:errorחובה
- סוג: stringrequest
_id - סוג: anythingproperty
Name
application/json - סוג: object · ClaudeErrorResponse429
הגעתם למגבלת הוצאות או בקשות
מעטפת שגיאה תואמת Claude Errors API עבור בקשות Messages.
- סוג: objecterrorחובה
- messageסוג: stringחובה
- typeסוג: stringחובה
- propertyסוג: anything
Name
- typeconst:errorחובה
- סוג: stringrequest
_id - סוג: anythingproperty
Name
application/json - סוג: object · ClaudeErrorResponse502
בקשת הספק החיצוני נכשלה
מעטפת שגיאה תואמת Claude Errors API עבור בקשות Messages.
- סוג: objecterrorחובה
- messageסוג: stringחובה
- typeסוג: stringחובה
- propertyסוג: anything
Name
- typeconst:errorחובה
- סוג: stringrequest
_id - סוג: anythingproperty
Name
application/json - סוג: object · ClaudeErrorResponse503
הספק או שירות החיוב אינם זמינים
מעטפת שגיאה תואמת Claude Errors API עבור בקשות Messages.
- סוג: objecterrorחובה
- messageסוג: stringחובה
- typeסוג: stringחובה
- propertyסוג: anything
Name
- typeconst:errorחובה
- סוג: stringrequest
_id - סוג: anythingproperty
Name
application/json
curl https://openapi.felo.ai/api/v1/messages \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"model": "claude-sonnet-4-5",
"max_tokens": 256,
"messages": [
{
"role": "user",
"content": "Write a one-sentence greeting."
}
],
"stream": false
}'
{
"id": "string",
"type": "message",
"role": "assistant",
"content": [
{
"type": "text",
"text": "string",
"id": "string",
"name": "string",
"input": {
"additionalProperty": "anything"
},
"content": "string",
"source": {
"additionalProperty": "anything"
},
"additionalProperty": "anything"
}
],
"model": "string",
"stop_reason": null,
"stop_sequence": null,
"usage": {
"additionalProperty": "anything"
},
"additionalProperty": "anything"
}