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.
- Type: integermax
_tokens min:1requiredInteger numbers.
- Type: array object[] · ClaudeMessage[] 1…messagesrequired
- contentrequired
- Type: string
- roleType: string enumrequiredvalues
- user
- assistant
- propertyType: anything
Name
- Type: stringmodelrequired
- Type: objectmetadata
- propertyType: anything
Name
- Type: stringservice
_tier - Type: array string[]stop
_sequences - Type: booleanstream
- system
- Type: string
- Type: numbertemperaturemin:0max:1
- Type: objectthinking
- propertyType: anything
Name
- tool
_choice - Type: string
- Type: array object[]tools
- propertyType: anything
Name
- Type: anythingproperty
Name
- Type: integertop
_k min:0Integer numbers.
- Type: numbertop
_p min:0max:1 - Type: anythingproperty
Name
- Type: object · ClaudeMessageResponse200
Claude message or streaming response
- Type: array object[] · ClaudeContentBlock[]contentrequired
- typeType: string enumrequiredvalues
- text
- image
- document
- tool
_use - tool
_result - thinking
- contentType: string | array
- idType: string
- inputType: object
- propertyType: anything
Name
- nameType: string
- sourceType: object
- propertyType: anything
Name
- textType: string
- propertyType: anything
Name
- Type: stringidrequired
- Type: stringmodelrequired
- roleconst:assistantrequired
- Type: string | nullstop
_reason required - typeconst:messagerequired
- Type: string | nullstop
_sequence - Type: object · Usageusage
Provider usage object. Fields vary by endpoint and provider.
- propertyType: anything
Name
- Type: anythingproperty
Name
- Type: object · ClaudeErrorResponse400
Claude invalid_request_error or Router request validation error
Claude Errors API-compatible error envelope for Messages requests.
- Type: objecterrorrequired
- messageType: stringrequired
- typeType: stringrequired
- propertyType: anything
Name
- typeconst:errorrequired
- Type: stringrequest
_id - Type: anythingproperty
Name
application/json - Type: object · ClaudeErrorResponse401
Invalid or missing Felo API key
Claude Errors API-compatible error envelope for Messages requests.
- Type: objecterrorrequired
- messageType: stringrequired
- typeType: stringrequired
- propertyType: anything
Name
- typeconst:errorrequired
- Type: stringrequest
_id - Type: anythingproperty
Name
application/json - Type: object · ClaudeErrorResponse402
Insufficient balance
Claude Errors API-compatible error envelope for Messages requests.
- Type: objecterrorrequired
- messageType: stringrequired
- typeType: stringrequired
- propertyType: anything
Name
- typeconst:errorrequired
- Type: stringrequest
_id - Type: anythingproperty
Name
application/json - Type: 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.
- Type: objecterrorrequired
- messageType: stringrequired
- typeType: stringrequired
- propertyType: anything
Name
- typeconst:errorrequired
- Type: stringrequest
_id - Type: anythingproperty
Name
application/json - Type: object · ClaudeErrorResponse429
Spending or request limit reached
Claude Errors API-compatible error envelope for Messages requests.
- Type: objecterrorrequired
- messageType: stringrequired
- typeType: stringrequired
- propertyType: anything
Name
- typeconst:errorrequired
- Type: stringrequest
_id - Type: anythingproperty
Name
application/json - Type: object · ClaudeErrorResponse502
Upstream provider request failed
Claude Errors API-compatible error envelope for Messages requests.
- Type: objecterrorrequired
- messageType: stringrequired
- typeType: stringrequired
- propertyType: anything
Name
- typeconst:errorrequired
- Type: stringrequest
_id - Type: anythingproperty
Name
application/json - Type: object · ClaudeErrorResponse503
Provider or billing service unavailable
Claude Errors API-compatible error envelope for Messages requests.
- Type: objecterrorrequired
- messageType: stringrequired
- typeType: stringrequired
- propertyType: anything
Name
- typeconst:errorrequired
- Type: stringrequest
_id - Type: 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"
}