Felo API PlatformFelo API Platform
v0.4.0
OpenAPI 3.1.0

יצירת הודעת Claude

שרת:https://openapi.felo.ai
ספריות לקוח

יצירת הודעת Claude

​

נקודת קצה תואמת Claude Messages API. הגדירו stream=true כדי לקבל אירועי זרם הודעות בסגנון Claude. שדות הבקשה, התגובה ושגיאות האימות עוקבים אחר פרוטוקול Claude Messages; ה-Router עשוי גם להחזיר מעטפת שגיאת gateway מסוננת עבור כשלי תשתית.

כותרות
  • X-Felo-Channel
    סוג: string

    קודי ערוץ ציבורי מופרדים בפסיקים ובסדר מוגדר. השמיטו את הכותרת כדי להשתמש ב-default; אסור להשתמש ב-default יחד עם ערכים אחרים. במצב ארנק, default סורק את סדר הערוצים הציבוריים האפקטיבי של המודל מהסוף להתחלה, מדלג על ערוצים לא מפורסמים או לא זמינים, ובוחר את הספק של הערוץ הזמין הראשון. הוא כולל נקודות קצה זמינות מאותו ספק עם אותו מזהה מודל חיצוני ואותה דרגת שירות. ערוצים מפורשים מאומתים לפי הסדר שהלקוח ציין; רק קבוצת הספק של הערוץ הראשון נשלחת. אין נפילה אוטומטית לספקים אחרים. כותרות ספק מדור קודם אינן יכולות לעקוף את ניתוב הערוצים.

גוף·ClaudeMessagesRequest
חובה
application/json
  • max_tokens
    סוג: integer
    מינימום:  
    1
    חובה

    Integer numbers.

  • messages
    סוג: array object[] · ClaudeMessage[] 1…
    חובה
    • content
      חובה
      • סוג: string
    • role
      סוג: string enum
      חובה
      ערכים
      • user
      • assistant
    • propertyName
      סוג: anything
  • model
    סוג: string
    חובה
  • metadata
    סוג: object
    • propertyName
      סוג: anything
  • service_tier
    סוג: string | null

    נכון לעכשיו נתמך רק default (סטנדרטי). ערך שהושמט, null, כינויים ומחרוזות לא נתמכות נופלים חזרה ל-default; סוגים אחרים מחזירים HTTP 400. הערוצים והמחירים המוגדרים נשארים ללא שינוי. ממשקי טקסט שולחים את הערך הסטנדרטי של הספק; ממשקי Decisions ויצירה משמיטים את השדה מהבקשה לספק.

  • stop_sequences
    סוג: array string[]
  • stream
    סוג: boolean
  • system
    • סוג: string
  • temperature
    סוג: number
    מינימום:  
    0
    מקסימום:  
    1
  • thinking
    סוג: object
    • propertyName
      סוג: anything
  • tool_choice
    • סוג: string
  • tools
    סוג: array object[]
    • propertyName
      סוג: anything
  • propertyName
    סוג: anything
  • top_k
    סוג: integer
    מינימום:  
    0

    Integer numbers.

  • top_p
    סוג: number
    מינימום:  
    0
    מקסימום:  
    1
  • propertyName
    סוג: anything
תגובות
  • 200
    סוג: object · ClaudeMessageResponse

    הודעת Claude או תגובת סטרימינג

    • content
      סוג: array object[] · ClaudeContentBlock[]
      חובה
      • type
        סוג: string enum
        חובה
        ערכים
        • text
        • image
        • document
        • tool_use
        • tool_result
        • thinking
      • content
        סוג: string | array
      • id
        סוג: string
      • input
        סוג: object
        • propertyName
          סוג: anything
      • name
        סוג: string
      • source
        סוג: object
        • propertyName
          סוג: anything
      • text
        סוג: string
      • propertyName
        סוג: anything
    • id
      סוג: string
      חובה
    • model
      סוג: string
      חובה
    • role
      const:  
      assistant
      חובה
    • stop_reason
      סוג: string | null
      חובה
    • type
      const:  
      message
      חובה
    • stop_sequence
      סוג: string | null
    • usage
      סוג: object · Usage

      אובייקט שימוש של הספק. השדות משתנים לפי נקודת הקצה והספק.

      • propertyName
        סוג: anything
    • propertyName
      סוג: anything
  • 400
    סוג: object · ClaudeErrorResponse

    שגיאת invalid_request_error של Claude או שגיאת אימות בקשה של ה-Router

    מעטפת שגיאה תואמת Claude Errors API עבור בקשות Messages.

    • error
      סוג: object
      חובה
      • message
        סוג: string
        חובה
      • type
        סוג: string
        חובה
      • propertyName
        סוג: anything
    • type
      const:  
      error
      חובה
    • request_id
      סוג: string
    • propertyName
      סוג: anything
    application/json
  • 401
    סוג: object · ClaudeErrorResponse

    מפתח API של Felo לא חוקי או חסר

    מעטפת שגיאה תואמת Claude Errors API עבור בקשות Messages.

    • error
      סוג: object
      חובה
      • message
        סוג: string
        חובה
      • type
        סוג: string
        חובה
      • propertyName
        סוג: anything
    • type
      const:  
      error
      חובה
    • request_id
      סוג: string
    • propertyName
      סוג: anything
    application/json
  • 402
    סוג: object · ClaudeErrorResponse

    יתרה לא מספקת

    מעטפת שגיאה תואמת Claude Errors API עבור בקשות Messages.

    • error
      סוג: object
      חובה
      • message
        סוג: string
        חובה
      • type
        סוג: string
        חובה
      • propertyName
        סוג: anything
    • type
      const:  
      error
      חובה
    • request_id
      סוג: string
    • propertyName
      סוג: anything
    application/json
  • 403
    סוג: object · ClaudeErrorResponse

    החשבון אינו מורשה להשתמש במודל. מודלים מושבתים נדחים גם הם לפני קריאות לספק החיצוני. בקשות ומשימות שכבר התקבלו ממשיכות.

    מעטפת שגיאה תואמת Claude Errors API עבור בקשות Messages.

    • error
      סוג: object
      חובה
      • message
        סוג: string
        חובה
      • type
        סוג: string
        חובה
      • propertyName
        סוג: anything
    • type
      const:  
      error
      חובה
    • request_id
      סוג: string
    • propertyName
      סוג: anything
    application/json
  • 429
    סוג: object · ClaudeErrorResponse

    הגעתם למגבלת הוצאות או בקשות

    מעטפת שגיאה תואמת Claude Errors API עבור בקשות Messages.

    • error
      סוג: object
      חובה
      • message
        סוג: string
        חובה
      • type
        סוג: string
        חובה
      • propertyName
        סוג: anything
    • type
      const:  
      error
      חובה
    • request_id
      סוג: string
    • propertyName
      סוג: anything
    application/json
  • 502
    סוג: object · ClaudeErrorResponse

    בקשת הספק החיצוני נכשלה

    מעטפת שגיאה תואמת Claude Errors API עבור בקשות Messages.

    • error
      סוג: object
      חובה
      • message
        סוג: string
        חובה
      • type
        סוג: string
        חובה
      • propertyName
        סוג: anything
    • type
      const:  
      error
      חובה
    • request_id
      סוג: string
    • propertyName
      סוג: anything
    application/json
  • 503
    סוג: object · ClaudeErrorResponse

    הספק או שירות החיוב אינם זמינים

    מעטפת שגיאה תואמת Claude Errors API עבור בקשות Messages.

    • error
      סוג: object
      חובה
      • message
        סוג: string
        חובה
      • type
        סוג: string
        חובה
      • propertyName
        סוג: anything
    • type
      const:  
      error
      חובה
    • request_id
      סוג: string
    • propertyName
      סוג: anything
    application/json
Request Example for post/api/v1/messages
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"
}
Create a Claude message