Skip to main content
POST
/
v1
/
agent
curl --request POST \
  --url https://api.stewrd.dev/v1/agent \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "message": "What is the capital of France?"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "object": "agent.response",
  "message": "<string>",
  "capabilities_used": [
    "<string>"
  ],
  "files": [
    {
      "name": "<string>",
      "content": "<string>",
      "url": "<string>"
    }
  ],
  "usage": {
    "requests_used": 123,
    "requests_limit": 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.

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.

Response

Successful agent response

id
string<uuid>

Unique request identifier.

object
enum<string>

Object type, always agent.response.

Available options:
agent.response
message
string

The agent's response message.

capabilities_used
string[]

Capabilities that were used for this request.

files
object[]

Files generated by the agent.

usage
object
meta
object