Felo API PlatformFelo API Platform
v0.3.0
OpenAPI 3.1.0

Create a Claude message

Сервер:https://openapi.felo.ai
Клиентские библиотеки

Create a Claude message

​

Claude Messages API-compatible endpoint. Set stream=true to receive Claude-style message stream events. Request, response, and validation-error fields follow the Claude Messages protocol; the Router may also return a sanitized gateway error envelope for infrastructure failures.

Тело·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
  • 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 message or streaming response

    • 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
      константа:  
      assistant
      обязательно
    • stop_reason
      Тип: string | null
      обязательно
    • type
      константа:  
      message
      обязательно
    • stop_sequence
      Тип: string | null
    • usage
      Тип: object · Usage

      Provider usage object. Fields vary by endpoint and provider.

      • propertyName
        Тип: anything
    • propertyName
      Тип: anything
  • 400
    Тип: object · ClaudeErrorResponse

    Claude invalid_request_error or Router request validation error

    Claude Errors API-compatible error envelope for Messages requests.

    • error
      Тип: object
      обязательно
      • message
        Тип: string
        обязательно
      • type
        Тип: string
        обязательно
      • propertyName
        Тип: anything
    • type
      константа:  
      error
      обязательно
    • request_id
      Тип: string
    • propertyName
      Тип: anything
    application/json
  • 401
    Тип: object · ClaudeErrorResponse

    Invalid or missing Felo API key

    Claude Errors API-compatible error envelope for Messages requests.

    • error
      Тип: object
      обязательно
      • message
        Тип: string
        обязательно
      • type
        Тип: string
        обязательно
      • propertyName
        Тип: anything
    • type
      константа:  
      error
      обязательно
    • request_id
      Тип: string
    • propertyName
      Тип: anything
    application/json
  • 402
    Тип: object · ClaudeErrorResponse

    Insufficient balance

    Claude Errors API-compatible error envelope for Messages requests.

    • error
      Тип: object
      обязательно
      • message
        Тип: string
        обязательно
      • type
        Тип: string
        обязательно
      • propertyName
        Тип: anything
    • type
      константа:  
      error
      обязательно
    • request_id
      Тип: string
    • propertyName
      Тип: anything
    application/json
  • 403
    Тип: object · ClaudeErrorResponse

    Account is not permitted to use the model. Disabled models are also rejected before upstream calls. Existing accepted requests and tasks continue.

    Claude Errors API-compatible error envelope for Messages requests.

    • error
      Тип: object
      обязательно
      • message
        Тип: string
        обязательно
      • type
        Тип: string
        обязательно
      • propertyName
        Тип: anything
    • type
      константа:  
      error
      обязательно
    • request_id
      Тип: string
    • propertyName
      Тип: anything
    application/json
  • 429
    Тип: object · ClaudeErrorResponse

    Spending or request limit reached

    Claude Errors API-compatible error envelope for Messages requests.

    • error
      Тип: object
      обязательно
      • message
        Тип: string
        обязательно
      • type
        Тип: string
        обязательно
      • propertyName
        Тип: anything
    • type
      константа:  
      error
      обязательно
    • request_id
      Тип: string
    • propertyName
      Тип: anything
    application/json
  • 502
    Тип: object · ClaudeErrorResponse

    Upstream provider request failed

    Claude Errors API-compatible error envelope for Messages requests.

    • error
      Тип: object
      обязательно
      • message
        Тип: string
        обязательно
      • type
        Тип: string
        обязательно
      • propertyName
        Тип: anything
    • type
      константа:  
      error
      обязательно
    • request_id
      Тип: string
    • propertyName
      Тип: anything
    application/json
  • 503
    Тип: object · ClaudeErrorResponse

    Provider or billing service unavailable

    Claude Errors API-compatible error envelope for Messages requests.

    • 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