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.
- 型: integermax
_tokens 最小値:1必須Integer numbers.
- 型: array object[] · ClaudeMessage[] 1…messages必須
- content必須
- 型: string
- role型: string 列挙値必須値
- user
- assistant
- property型: anything
Name
- 型: stringmodel必須
- 型: objectmetadata
- property型: anything
Name
- 型: stringservice
_tier - 型: array string[]stop
_sequences - 型: booleanstream
- system
- 型: string
- 型: numbertemperature最小値:0最大値:1
- 型: objectthinking
- property型: anything
Name
- tool
_choice - 型: string
- 型: array object[]tools
- property型: anything
Name
- 型: anythingproperty
Name
- 型: integertop
_k 最小値:0Integer numbers.
- 型: numbertop
_p 最小値:0最大値:1 - 型: anythingproperty
Name
- 型: object · ClaudeMessageResponse200
Claude message or streaming response
- 型: array object[] · ClaudeContentBlock[]content必須
- type型: string 列挙値必須値
- text
- image
- document
- tool
_use - tool
_result - thinking
- content型: string | array
- id型: string
- input型: object
- property型: anything
Name
- name型: string
- source型: object
- property型: anything
Name
- text型: string
- property型: anything
Name
- 型: stringid必須
- 型: stringmodel必須
- role定数:assistant必須
- 型: string | nullstop
_reason 必須 - type定数:message必須
- 型: string | nullstop
_sequence - 型: object · Usageusage
Provider usage object. Fields vary by endpoint and provider.
- property型: anything
Name
- 型: anythingproperty
Name
- 型: object · ClaudeErrorResponse400
Claude invalid_request_error or Router request validation error
Claude Errors API-compatible error envelope for Messages requests.
- 型: objecterror必須
- message型: string必須
- type型: string必須
- property型: anything
Name
- type定数:error必須
- 型: stringrequest
_id - 型: anythingproperty
Name
application/json - 型: object · ClaudeErrorResponse401
Invalid or missing Felo API key
Claude Errors API-compatible error envelope for Messages requests.
- 型: objecterror必須
- message型: string必須
- type型: string必須
- property型: anything
Name
- type定数:error必須
- 型: stringrequest
_id - 型: anythingproperty
Name
application/json - 型: object · ClaudeErrorResponse402
Insufficient balance
Claude Errors API-compatible error envelope for Messages requests.
- 型: objecterror必須
- message型: string必須
- type型: string必須
- property型: anything
Name
- type定数:error必須
- 型: stringrequest
_id - 型: anythingproperty
Name
application/json - 型: object · ClaudeErrorResponse403
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.
- 型: objecterror必須
- message型: string必須
- type型: string必須
- property型: anything
Name
- type定数:error必須
- 型: stringrequest
_id - 型: anythingproperty
Name
application/json - 型: object · ClaudeErrorResponse429
Spending or request limit reached
Claude Errors API-compatible error envelope for Messages requests.
- 型: objecterror必須
- message型: string必須
- type型: string必須
- property型: anything
Name
- type定数:error必須
- 型: stringrequest
_id - 型: anythingproperty
Name
application/json - 型: object · ClaudeErrorResponse502
Upstream provider request failed
Claude Errors API-compatible error envelope for Messages requests.
- 型: objecterror必須
- message型: string必須
- type型: string必須
- property型: anything
Name
- type定数:error必須
- 型: stringrequest
_id - 型: anythingproperty
Name
application/json - 型: object · ClaudeErrorResponse503
Provider or billing service unavailable
Claude Errors API-compatible error envelope for Messages requests.
- 型: objecterror必須
- message型: string必須
- type型: string必須
- property型: anything
Name
- type定数:error必須
- 型: stringrequest
_id - 型: anythingproperty
Name
application/json
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"
}