curl --request POST \
--url 'http://localhost:8000/v1/chat/completions' \
--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": []
}
],
"max_tokens": 1,
"temperature": 1.5,
"top_p": 1.5,
"stream": false,
"stop": "string",
"tools": [
{}
],
"tool_choice": "string"
}'
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"object": "string",
"created": 1,
"model": "string",
"choices": [
{}
],
"usage": {}
}
Chat Completions (OpenAI Compatible)
Successful Response
POST
/
v1
/
chat
/
completions
curl --request POST \
--url 'http://localhost:8000/v1/chat/completions' \
--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": []
}
],
"max_tokens": 1,
"temperature": 1.5,
"top_p": 1.5,
"stream": false,
"stop": "string",
"tools": [
{}
],
"tool_choice": "string"
}'
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"object": "string",
"created": 1,
"model": "string",
"choices": [
{}
],
"usage": {}
}
Request body
OpenAIChatCompletionRequest
string
required
Model identifier
OpenAIChatMessage[]
required
Chat messages
integer,null
Max tokens to generate
number,null
Sampling temperature
number,null
Top-p sampling
boolean
Stream partial responses
string
Stop sequence(s)
object[],null
Tool definitions
string
Tool choice
Response
OpenAIChatCompletionResponse
string
required
string
required
integer
required
string
required
object[]
required
object,null
Status codes
| Code | Meaning |
|---|---|
200 | Successful Response |
401 | Authentication required |
422 | Validation Error |
429 | Rate limit exceeded |
curl --request POST \
--url 'http://localhost:8000/v1/chat/completions' \
--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": []
}
],
"max_tokens": 1,
"temperature": 1.5,
"top_p": 1.5,
"stream": false,
"stop": "string",
"tools": [
{}
],
"tool_choice": "string"
}'
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"object": "string",
"created": 1,
"model": "string",
"choices": [
{}
],
"usage": {}
}
Last modified on August 31, 2026