curl --request POST \
--url 'http://localhost:8000/v1/messages' \
--header "Authorization: Bearer $STATESET_AGENTS_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"model": "string",
"messages": [
{
"role": "system",
"content": "Two-person tent, green — replacement for damaged pole set.",
"name": "Two-Person Tent",
"tool_call_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"tool_calls": []
}
],
"system": "string",
"max_tokens": 1,
"temperature": 1.5,
"top_p": 1.5,
"top_k": 1,
"stop_sequences": [
"string"
],
"stream": false,
"tools": [
{}
],
"tool_choice": "string",
"metadata": {},
"response_format": "anthropic"
}'
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "message",
"role": "assistant",
"model": "string",
"content": [
{}
],
"stop_reason": "string",
"stop_sequence": "string",
"usage": {
"input_tokens": 1,
"output_tokens": 1
}
}
Create Message
Anthropic-compatible Messages endpoint. Supports OpenAI-style messages as input and can return OpenAI-style responses when response_format=‘openai’ is provided.
POST
/
v1
/
messages
curl --request POST \
--url 'http://localhost:8000/v1/messages' \
--header "Authorization: Bearer $STATESET_AGENTS_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"model": "string",
"messages": [
{
"role": "system",
"content": "Two-person tent, green — replacement for damaged pole set.",
"name": "Two-Person Tent",
"tool_call_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"tool_calls": []
}
],
"system": "string",
"max_tokens": 1,
"temperature": 1.5,
"top_p": 1.5,
"top_k": 1,
"stop_sequences": [
"string"
],
"stream": false,
"tools": [
{}
],
"tool_choice": "string",
"metadata": {},
"response_format": "anthropic"
}'
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "message",
"role": "assistant",
"model": "string",
"content": [
{}
],
"stop_reason": "string",
"stop_sequence": "string",
"usage": {
"input_tokens": 1,
"output_tokens": 1
}
}
Anthropic-compatible Messages endpoint.
Supports OpenAI-style messages as input and can return OpenAI-style responses
when
response_format='openai' is provided.
Request body
MessagesRequest
Response
MessagesResponse
Status codes
| Code | Meaning |
|---|---|
200 | Anthropic-shaped reply. With response_format: 'openai' the body is an OpenAI chat completion instead; with stream: true it is a text/event-stream. |
401 | Authentication required |
422 | Validation Error |
429 | Rate limit exceeded |
curl --request POST \
--url 'http://localhost:8000/v1/messages' \
--header "Authorization: Bearer $STATESET_AGENTS_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"model": "string",
"messages": [
{
"role": "system",
"content": "Two-person tent, green — replacement for damaged pole set.",
"name": "Two-Person Tent",
"tool_call_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"tool_calls": []
}
],
"system": "string",
"max_tokens": 1,
"temperature": 1.5,
"top_p": 1.5,
"top_k": 1,
"stop_sequences": [
"string"
],
"stream": false,
"tools": [
{}
],
"tool_choice": "string",
"metadata": {},
"response_format": "anthropic"
}'
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "message",
"role": "assistant",
"model": "string",
"content": [
{}
],
"stop_reason": "string",
"stop_sequence": "string",
"usage": {
"input_tokens": 1,
"output_tokens": 1
}
}
Last modified on August 31, 2026