Felo API PlatformFelo API Platform
v0.4.0
OpenAPI 3.1.0

Claude پیغام بنائیں

سرور:https://openapi.felo.ai
کلائنٹ لائبریریاں

Claude پیغام بنائیں

​

Claude Messages API سے مطابقت رکھنے والا endpoint۔ Claude طرز کے پیغام اسٹریم ایونٹس وصول کرنے کے لیے stream=true سیٹ کریں۔ درخواست، جواب اور تصدیقی خرابی کے فیلڈز Claude Messages پروٹوکول کی پیروی کرتے ہیں؛ Router انفراسٹرکچر کی ناکامیوں پر صاف شدہ گیٹ وے خرابی کا لفافہ بھی واپس کر سکتا ہے۔

ہیڈرز
  • X-Felo-Channel
    قسم: string

    ترتیب شدہ، کوما سے الگ کیے گئے پبلک چینل کوڈز۔ default استعمال کرنے کے لیے یہ ہیڈر چھوڑ دیں؛ default کو تنہا ہی استعمال کرنا ہوگا۔ wallet موڈ میں default ماڈل کے مؤثر پبلک چینل کی ترتیب کو الٹی سمت میں اسکین کرتا ہے، غیر شائع شدہ یا غیر دستیاب چینلز کو نظر انداز کرتا ہے، اور پہلے دستیاب چینل کے پرووائیڈر کا انتخاب کرتا ہے۔ اس میں اسی اپ اسٹریم ماڈل ID اور سروس ٹیئر والے اس پرووائیڈر کے دستیاب endpoints شامل کیے جاتے ہیں۔ واضح چینلز کی توثیق کلائنٹ کی بتائی ہوئی ترتیب میں ہوتی ہے؛ صرف پہلے چینل کا پرووائیڈر گروپ جمع کیا جاتا ہے۔ دیگر پرووائیڈرز کی طرف کوئی خودکار fallback نہیں ہے۔ پرانے پرووائیڈر ہیڈرز چینل روٹنگ کو اوور رائیڈ نہیں کر سکتے۔

باڈی·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 (standard) معاون ہے۔ چھوڑا گیا، null، عرفی نام اور غیر معاون اسٹرنگز default پر fallback کرتے ہیں؛ دیگر اقسام HTTP 400 واپس کرتی ہیں۔ ترتیب شدہ چینلز اور قیمتیں تبدیل نہیں ہوتیں۔ Text APIs پرووائیڈر کی standard قدر بھیجتے ہیں؛ Decisions اور generation APIs اپ اسٹریم فیلڈ شامل نہیں کرتے۔

  • 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

      پرووائیڈر کا استعمال آبجیکٹ۔ فیلڈز endpoint اور پرووائیڈر کے لحاظ سے مختلف ہوتے ہیں۔

      • propertyName
        قسم: anything
    • propertyName
      قسم: anything
  • 400
    قسم: object · ClaudeErrorResponse

    Claude کا invalid_request_error یا Router کی درخواست کی تصدیق کی خرابی

    Messages درخواستوں کے لیے Claude Errors API سے مطابقت رکھنے والا خرابی کا لفافہ۔

    • error
      قسم: object
      لازمی
      • message
        قسم: string
        لازمی
      • type
        قسم: string
        لازمی
      • propertyName
        قسم: anything
    • type
      const:  
      error
      لازمی
    • request_id
      قسم: string
    • propertyName
      قسم: anything
    application/json
  • 401
    قسم: object · ClaudeErrorResponse

    غلط یا غیر موجود Felo API کلید

    Messages درخواستوں کے لیے Claude Errors API سے مطابقت رکھنے والا خرابی کا لفافہ۔

    • error
      قسم: object
      لازمی
      • message
        قسم: string
        لازمی
      • type
        قسم: string
        لازمی
      • propertyName
        قسم: anything
    • type
      const:  
      error
      لازمی
    • request_id
      قسم: string
    • propertyName
      قسم: anything
    application/json
  • 402
    قسم: object · ClaudeErrorResponse

    ناکافی بیلنس

    Messages درخواستوں کے لیے Claude Errors API سے مطابقت رکھنے والا خرابی کا لفافہ۔

    • error
      قسم: object
      لازمی
      • message
        قسم: string
        لازمی
      • type
        قسم: string
        لازمی
      • propertyName
        قسم: anything
    • type
      const:  
      error
      لازمی
    • request_id
      قسم: string
    • propertyName
      قسم: anything
    application/json
  • 403
    قسم: object · ClaudeErrorResponse

    اکاؤنٹ کو اس ماڈل کے استعمال کی اجازت نہیں۔ غیر فعال ماڈلز بھی اپ اسٹریم کالز سے پہلے مسترد کر دیے جاتے ہیں۔ پہلے سے قبول شدہ درخواستیں اور ٹاسکس جاری رہتے ہیں۔

    Messages درخواستوں کے لیے Claude Errors API سے مطابقت رکھنے والا خرابی کا لفافہ۔

    • error
      قسم: object
      لازمی
      • message
        قسم: string
        لازمی
      • type
        قسم: string
        لازمی
      • propertyName
        قسم: anything
    • type
      const:  
      error
      لازمی
    • request_id
      قسم: string
    • propertyName
      قسم: anything
    application/json
  • 429
    قسم: object · ClaudeErrorResponse

    اخراجات یا درخواست کی حد پوری ہو گئی

    Messages درخواستوں کے لیے Claude Errors API سے مطابقت رکھنے والا خرابی کا لفافہ۔

    • error
      قسم: object
      لازمی
      • message
        قسم: string
        لازمی
      • type
        قسم: string
        لازمی
      • propertyName
        قسم: anything
    • type
      const:  
      error
      لازمی
    • request_id
      قسم: string
    • propertyName
      قسم: anything
    application/json
  • 502
    قسم: object · ClaudeErrorResponse

    اپ اسٹریم پرووائیڈر کی درخواست ناکام رہی

    Messages درخواستوں کے لیے Claude Errors API سے مطابقت رکھنے والا خرابی کا لفافہ۔

    • error
      قسم: object
      لازمی
      • message
        قسم: string
        لازمی
      • type
        قسم: string
        لازمی
      • propertyName
        قسم: anything
    • type
      const:  
      error
      لازمی
    • request_id
      قسم: string
    • propertyName
      قسم: anything
    application/json
  • 503
    قسم: object · ClaudeErrorResponse

    پرووائیڈر یا بلنگ سروس دستیاب نہیں

    Messages درخواستوں کے لیے Claude Errors API سے مطابقت رکھنے والا خرابی کا لفافہ۔

    • 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