Felo API PlatformFelo API Platform
v0.4.0
OpenAPI 3.1.0

יצירת השלמת צ'אט

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

יצירת השלמת צ'אט

​

ממשק Chat Completions תואם OpenAI. הגדירו stream=true כדי לקבל Server-Sent Events. מעטפת התגובה והשגיאה עוקבת אחר צורת Chat Completions התואמת ל-OpenAI.

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

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

גוף·ChatCompletionRequest
חובה
application/json
  • messages
    סוג: array object[] · ChatMessage[] 1…
    חובה
    • content
      עשוי להיות null
      חובה
      • סוג: string
    • role
      סוג: string enum
      חובה
      ערכים
      • system
      • developer
      • user
      • assistant
      • tool
    • name
      סוג: string
    • tool_call_id
      סוג: string
    • tool_calls
      סוג: array object[]
      • propertyName
        סוג: anything
    • propertyName
      סוג: anything
  • model
    סוג: string
    חובה
  • max_completion_tokens
    סוג: integer
    מינימום:  
    1

    Integer numbers.

  • max_tokens
    סוג: integer
    מינימום:  
    1

    Integer numbers.

  • n
    סוג: integer
    מינימום:  
    1

    Integer numbers.

  • response_format
    סוג: object
    • propertyName
      סוג: anything
  • service_tier
    סוג: string | null

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

  • stop
    עשוי להיות null
    • סוג: string
  • stream
    סוג: boolean
  • temperature
    סוג: number
    מינימום:  
    0
  • tool_choice
    • סוג: string
  • tools
    סוג: array object[]
    • propertyName
      סוג: anything
  • propertyName
    סוג: anything
  • top_p
    סוג: number
    מינימום:  
    0
    מקסימום:  
    1
  • user
    סוג: string
  • propertyName
    סוג: anything
תגובות
  • 200
    סוג: object · ChatCompletionResponse

    השלמת צ'אט או תגובת סטרימינג

    • choices
      סוג: array object[] · ChatChoice[]
      חובה
      • finish_reason
        סוג: string | null
      • index
        סוג: integer

        Integer numbers.

      • logprobs
        סוג: object | null
        • propertyName
          סוג: anything
      • message
        סוג: object · ChatMessage
        • content
          עשוי להיות null
          חובה
          • סוג: string
        • role
          סוג: string enum
          חובה
          ערכים
          • system
          • developer
          • user
          • assistant
          • tool
        • name
          סוג: string
        • tool_call_id
          סוג: string
        • tool_calls
          סוג: array object[]
          • propertyName
            סוג: anything
        • propertyName
          סוג: anything
      • propertyName
        סוג: anything
    • id
      סוג: string
      חובה
    • object
      סוג: string
      חובה

      בדרך כלל chat.completion בתגובות ללא סטרימינג.

    • created
      סוג: integer פורמט: int64

      Signed 64-bit integers (long type).

    • model
      סוג: string
    • system_fingerprint
      סוג: string
    • usage
      סוג: object · Usage

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

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

    בקשה, מודל או מיפוי ספקים לא חוקיים

    מעטפת שגיאה תואמת OpenAI. ה-Router עשוי לכלול code ו-message בלי כל שדות הספק החיצוני האופציונליים.

    • error
      סוג: object
      חובה
      • message
        סוג: string
        חובה
      • code
        סוג: string | null
      • param
        סוג: string | null
      • type
        סוג: string

        סוג שגיאה תואם OpenAI כשמסופק.

      • propertyName
        סוג: anything
    • propertyName
      סוג: anything
    application/json
  • 401
    סוג: object · OpenAIErrorResponse

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

    מעטפת שגיאה תואמת OpenAI. ה-Router עשוי לכלול code ו-message בלי כל שדות הספק החיצוני האופציונליים.

    • error
      סוג: object
      חובה
      • message
        סוג: string
        חובה
      • code
        סוג: string | null
      • param
        סוג: string | null
      • type
        סוג: string

        סוג שגיאה תואם OpenAI כשמסופק.

      • propertyName
        סוג: anything
    • propertyName
      סוג: anything
    application/json
  • 402
    סוג: object · OpenAIErrorResponse

    יתרה לא מספקת

    מעטפת שגיאה תואמת OpenAI. ה-Router עשוי לכלול code ו-message בלי כל שדות הספק החיצוני האופציונליים.

    • error
      סוג: object
      חובה
      • message
        סוג: string
        חובה
      • code
        סוג: string | null
      • param
        סוג: string | null
      • type
        סוג: string

        סוג שגיאה תואם OpenAI כשמסופק.

      • propertyName
        סוג: anything
    • propertyName
      סוג: anything
    application/json
  • 403
    סוג: object · OpenAIErrorResponse

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

    מעטפת שגיאה תואמת OpenAI. ה-Router עשוי לכלול code ו-message בלי כל שדות הספק החיצוני האופציונליים.

    • error
      סוג: object
      חובה
      • message
        סוג: string
        חובה
      • code
        סוג: string | null
      • param
        סוג: string | null
      • type
        סוג: string

        סוג שגיאה תואם OpenAI כשמסופק.

      • propertyName
        סוג: anything
    • propertyName
      סוג: anything
    application/json
  • 429
    סוג: object · OpenAIErrorResponse

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

    מעטפת שגיאה תואמת OpenAI. ה-Router עשוי לכלול code ו-message בלי כל שדות הספק החיצוני האופציונליים.

    • error
      סוג: object
      חובה
      • message
        סוג: string
        חובה
      • code
        סוג: string | null
      • param
        סוג: string | null
      • type
        סוג: string

        סוג שגיאה תואם OpenAI כשמסופק.

      • propertyName
        סוג: anything
    • propertyName
      סוג: anything
    application/json
  • 502
    סוג: object · OpenAIErrorResponse

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

    מעטפת שגיאה תואמת OpenAI. ה-Router עשוי לכלול code ו-message בלי כל שדות הספק החיצוני האופציונליים.

    • error
      סוג: object
      חובה
      • message
        סוג: string
        חובה
      • code
        סוג: string | null
      • param
        סוג: string | null
      • type
        סוג: string

        סוג שגיאה תואם OpenAI כשמסופק.

      • propertyName
        סוג: anything
    • propertyName
      סוג: anything
    application/json
  • 503
    סוג: object · OpenAIErrorResponse

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

    מעטפת שגיאה תואמת OpenAI. ה-Router עשוי לכלול code ו-message בלי כל שדות הספק החיצוני האופציונליים.

    • error
      סוג: object
      חובה
      • message
        סוג: string
        חובה
      • code
        סוג: string | null
      • param
        סוג: string | null
      • type
        סוג: string

        סוג שגיאה תואם OpenAI כשמסופק.

      • propertyName
        סוג: anything
    • propertyName
      סוג: anything
    application/json
Request Example for post/api/v1/chat/completions
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"
}
Create a chat completion