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 がサニタイズされたゲートウェイエラーのエンベロープを返すこともあります。

ヘッダー
  • X-Felo-Channel
    型: string

    カンマ区切りの公開チャンネルコード(順序どおり)。このヘッダーを省略すると default が使われ、default は単独でのみ使用できます。ウォレットモードでは、default はモデルの有効な公開チャンネル順を逆から走査し、未公開または利用不可のチャンネルをスキップして、最初に利用可能なチャンネルのプロバイダーを選択します。そのプロバイダーから、同じ上流モデル ID とサービスティアを持つ利用可能なエンドポイントを含めます。明示的なチャンネルはクライアントが指定した順序で検証され、最初のチャンネルのプロバイダーグループのみが送信されます。他のプロバイダーへの自動フォールバックはありません。従来のプロバイダーヘッダーでチャンネルルーティングを上書きすることはできません。

リクエストボディ·ClaudeMessagesRequest
必須
application/json
  • max_tokens
    型: integer
    最小値:  
    1
    必須

    Integer numbers.

  • messages
    型: array object[] · ClaudeMessage[] 1…
    必須

    Use a document block for a PDF or an image block for a picture. Set source to {type: 'file', file_id: 'felo_file_...'} for an uploaded Felo attachment, {type: 'url', url: 'https://...'} for an HTTPS URL, or provide type, media_type and data for a base64 source. PDF and image URL support are enabled per model.

    • content
      必須
      • 型: string
    • role
      型: string 列挙値
      必須
      値
      • user
      • assistant
    • propertyName
      型: anything
  • model
    型: string
    必須
  • metadata
    型: object
    • propertyName
      型: anything
  • service_tier
    型: string | null

    現在は default(standard)のみをサポートしています。省略、null、エイリアス、未対応の文字列は default にフォールバックし、それ以外のタイプは HTTP 400 を返します。設定済みのチャンネルと料金は変わりません。テキスト API はプロバイダーの標準値を使用し、Decisions と生成 API は上流のフィールドを省略します。

  • 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 列挙値
        必須
        値
        • 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
      定数:  
      assistant
      必須
    • stop_reason
      型: string | null
      必須
    • type
      定数:  
      message
      必須
    • stop_sequence
      型: string | null
    • usage
      型: object · Usage

      プロバイダーの usage オブジェクト。フィールドはエンドポイントとプロバイダーによって異なります。

      • 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
      定数:  
      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
      定数:  
      error
      必須
    • request_id
      型: string
    • propertyName
      型: anything
    application/json
  • 402
    型: object · ClaudeErrorResponse

    残高不足

    Messages リクエスト向けの、Claude Errors API 互換のエラーエンベロープ。

    • error
      型: object
      必須
      • message
        型: string
        必須
      • type
        型: string
        必須
      • propertyName
        型: anything
    • type
      定数:  
      error
      必須
    • request_id
      型: string
    • propertyName
      型: anything
    application/json
  • 403
    型: object · ClaudeErrorResponse

    アカウントにこのモデルの使用権限がありません。無効化されたモデルも上流呼び出しの前に拒否されます。既に受け付けたリクエストとタスクは継続します。

    Messages リクエスト向けの、Claude Errors API 互換のエラーエンベロープ。

    • error
      型: object
      必須
      • message
        型: string
        必須
      • type
        型: string
        必須
      • propertyName
        型: anything
    • type
      定数:  
      error
      必須
    • request_id
      型: string
    • propertyName
      型: anything
    application/json
  • 429
    型: object · ClaudeErrorResponse

    支出上限またはリクエスト上限に達しました

    Messages リクエスト向けの、Claude Errors API 互換のエラーエンベロープ。

    • error
      型: object
      必須
      • message
        型: string
        必須
      • type
        型: string
        必須
      • propertyName
        型: anything
    • type
      定数:  
      error
      必須
    • request_id
      型: string
    • propertyName
      型: anything
    application/json
  • 502
    型: object · ClaudeErrorResponse

    上流プロバイダーへのリクエストに失敗しました

    Messages リクエスト向けの、Claude Errors API 互換のエラーエンベロープ。

    • error
      型: object
      必須
      • message
        型: string
        必須
      • type
        型: string
        必須
      • propertyName
        型: anything
    • type
      定数:  
      error
      必須
    • request_id
      型: string
    • propertyName
      型: anything
    application/json
  • 503
    型: object · ClaudeErrorResponse

    プロバイダーまたは請求サービスが利用できません

    Messages リクエスト向けの、Claude Errors API 互換のエラーエンベロープ。

    • error
      型: object
      必須
      • message
        型: string
        必須
      • type
        型: string
        必須
      • propertyName
        型: anything
    • type
      定数:  
      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

ヘルプが必要ですか?

  • API・請求・アカウントのご質問はサポートへ。
  • Discord で Felo の開発者と交流できます。
  • 更新履歴 をご覧ください。
  • ボリューム価格や購買についてのご相談は営業窓口へ。
  • LLM での構築をお考えですか?llms.txt をご覧ください。