Skip to main content
POST
/
api
/
tasks
Create task
curl --request POST \
  --url https://sontairo.com/api/tasks \
  --header 'Content-Type: application/json' \
  --data '
{
  "workspaceId": "<string>",
  "prompt": "<string>",
  "projectId": "<string>",
  "selectedProvider": "<string>",
  "selectedModel": "<string>",
  "providerKeyId": "<string>",
  "connectorIds": [
    "<string>"
  ],
  "autonomyLevel": "supervised"
}
'
{
  "data": {
    "id": "<string>",
    "workspaceId": "<string>",
    "projectId": "<string>",
    "status": "PENDING",
    "prompt": "<string>",
    "output": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  }
}

Body

application/json
workspaceId
string
required
prompt
string
required

Task instruction in natural language

Required string length: 1 - 10000
projectId
string | null
selectedProvider
string

AI provider to use

selectedModel
string

AI model to use

providerKeyId
string
connectorIds
string[]

Connector IDs the agent can use

autonomyLevel
enum<string>
Available options:
supervised,
semi-autonomous,
autonomous

Response

201 - application/json

Task created and run started

data
object