POST
/
task
/
create
curl --request POST \
  --url 'http://localhost:2003/api/v1/task/create' \
  --header 'x-api-key: <your-api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
    "task": "Monitor a website for price changes",
    "agent": "BROWSER_AGENT",
    "tools": [
      {
        "type": "function",
        "function": {
          "name": "form_input",
          "description": "Use this tool to ask information from the user",
          "parameters": {
            "type": "object",
            "properties": {
              "heading": {
                "type": "string",
                "description": "The heading of the form input"
              },
              "description": {
                "type": "string",
                "description": "The description of the form input"
              },
              "fields": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "Input field type"
                    },
                    "label": {
                      "type": "string",
                      "description": "Label text"
                    }
                  }
                }
              }
            }
          }
        }
      }
    ]
  }'
{
  "success": true,
  "data": {
    "taskId": "task_123"
  }
}
curl --request POST \
  --url 'http://localhost:2003/api/v1/task/create' \
  --header 'x-api-key: <your-api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
    "task": "Monitor a website for price changes",
    "agent": "BROWSER_AGENT",
    "tools": [
      {
        "type": "function",
        "function": {
          "name": "form_input",
          "description": "Use this tool to ask information from the user",
          "parameters": {
            "type": "object",
            "properties": {
              "heading": {
                "type": "string",
                "description": "The heading of the form input"
              },
              "description": {
                "type": "string",
                "description": "The description of the form input"
              },
              "fields": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "Input field type"
                    },
                    "label": {
                      "type": "string",
                      "description": "Label text"
                    }
                  }
                }
              }
            }
          }
        }
      }
    ]
  }'
{
  "success": true,
  "data": {
    "taskId": "task_123"
  }
}

Authorizations

x-api-key
string
header
required

Body

application/json

Response

200 - application/json

Successful response

The response is of type object.