Skip to main content
POST
/
api
/
v1
/
tasks
Create task (stream/json)
curl --request POST \
  --url https://neo.api.projectdiscovery.io/api/v1/tasks \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "agent_id": "<string>",
  "agent_ids": [
    "<string>"
  ],
  "ask_question": false,
  "auto_execute": false,
  "file_keys": [
    "<string>"
  ],
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "isolated": false,
  "max_iterations": 2,
  "max_steps": 102,
  "message": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "parts": [
      {
        "type": "text",
        "media_type": "<string>",
        "name": "<string>",
        "text": "<string>",
        "url": "<string>"
      }
    ],
    "role": "user"
  },
  "mode": "agent",
  "model": "auto",
  "project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "response_format": "sse",
  "secrets": [
    "<string>"
  ],
  "task": "<string>",
  "visibility": "public"
}
'
"<string>"

Documentation Index

Fetch the complete documentation index at: https://docs.neo.projectdiscovery.io/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

JWT authentication token

Body

application/json
agent_id
string

Bypass AgentSwarm and route to specific agent

agent_ids
string[]

Array of agent IDs for multi-agent orchestration

ask_question
boolean
default:false

Enable the ask_question tool for the planner with durable DB-backed suspension. When false (default), the tool and its prompt sections are removed entirely so the planner must proceed without asking the user clarifying questions.

auto_execute
boolean
default:false

When mode=plan, auto-execute the plan without waiting for user approval

file_keys
string[]

Optional file references

id
string<uuid>

Optional task ID. If omitted or invalid, server generates one.

isolated
boolean
default:false

Run task in an ephemeral sandbox with no prior user context

max_iterations
integer

Max execution-verification loop iterations. When omitted, defaults to 0 for agent mode (no verification) and 1 for plan mode (single execute + verify cycle). 0 = explicitly skip verification. 1+ = run that many execute+verify cycles.

Required range: 0 <= x <= 5
max_steps
integer

Max LLM steps for execution mode only. Does not affect plan or verification phases. Defaults to 45 (direct) or 60 (swarm).

Required range: 4 <= x <= 200
message
object
mode
enum<string>
default:agent

agent = full tools, chat = limited tools, plan = info-gathering + strategic planning

Available options:
agent,
chat,
plan
model
enum<string>

Optional model. If omitted/empty, server resolves default via user/team/tag policy.

Available options:
auto,
opus-4.7,
opus-4.6,
sonnet-4.6,
haiku-4.5,
gpt-5.5-high,
gpt-5.4-xhigh,
gpt-5.4-high,
gpt-5.3-codex-high,
gemini-3-pro,
gemini-3-flash,
grok-4.1-fast,
grok-4-fast,
grok-code,
kimi-k2.6,
glm-5
project_id
string<uuid>

Project ID to scope task to. If omitted, task is user-scoped.

response_format
enum<string>

Optional response mode.

  • sse: stream response events
  • json: immediate acknowledgement with task id/status When omitted, server falls back to Accept header and defaults to sse.
Available options:
sse,
json
schedule
object
secrets
string[]

Optional secret names to expose at runtime (opt-in). Only listed names are resolved and made available to tools. If omitted or empty, no user/project secrets are exposed.

task
string

Optional shorthand user input. Used only when message.parts is absent.

visibility
enum<string>

Task visibility. Defaults to private when omitted/empty.

Available options:
public,
private,
unlisted,
team

Response

Streaming SSE response

The response is of type string.