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
string
required
Model identifier
MessageInput[]
required
Conversation messages
string
System prompt (string or content blocks)
integer,null
Maximum tokens to generate
number,null
Sampling temperature
number,null
Top-p
integer,null
Top-k
string[],null
Stop sequences (Anthropic style)
boolean
Stream response tokens
object[],null
Tool definitions (Anthropic or OpenAI format)
string
Tool choice configuration
object,null
Arbitrary metadata
string,null
Response format preference
Response
MessagesResponse
string
required
Message identifier
string
Response type
string
Assistant role
string
required
Model identifier
object[]
required
Response content blocks
string,null
Stop reason
string,null
Stop sequence
UsageInfo
required
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