Skip to main content
POST
/
v1
/
sessions
/
{session_id}
/
messages
curl --request POST \
  --url https://api.stewrd.dev/v1/sessions/{session_id}/messages \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "message": "Research the top 5 project management tools"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "object": "session.message",
  "session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "message": "<string>",
  "capabilities_used": [
    "<string>"
  ],
  "files": [
    {
      "name": "<string>",
      "content": "<string>",
      "url": "<string>"
    }
  ],
  "usage": {
    "credits_this_request": 123,
    "credits_remaining": 123,
    "tokens_used": 123
  },
  "meta": {
    "duration_ms": 123,
    "project_id": "<string>",
    "plan": "<string>"
  }
}

Authorizations

Authorization
string
header
required

API key in the format sk-stw_.... Get yours at stewrd.dev/dashboard.

Path Parameters

session_id
string<uuid>
required

The session ID returned from Create Session.

Body

application/json
message
string
required

The task or question for the agent.

Example:

"What is the capital of France?"

capabilities
enum<string>[]

Filter which capabilities to use for this request. Omit to use all capabilities enabled on the project.

Available options:
chat,
research,
documents,
code,
data,
files
files
object[]

Files to include with the request.

stream
boolean
default:false

Set to true to receive a Server-Sent Events stream instead of a JSON response. Not supported when tools is provided.

tools
object[]

Custom tool definitions for function calling. When provided, only the chat capability is used and streaming is disabled. Max 20 tools per request.

Maximum array length: 20

Response

Successful session message response

id
string<uuid>

Unique request identifier.

object
enum<string>

Object type, always session.message.

Available options:
session.message
session_id
string<uuid>

The session this message belongs to.

message
string

The agent's response message.

capabilities_used
string[]

Capabilities used for this request.

files
object[]

Files generated by the agent.

usage
object
meta
object