Skip to main content
POST
/
ask
Ask (streaming)
curl --request POST \
  --url https://api.zo.computer/ask \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "q": "<string>",
  "model_name": "<string>",
  "context_paths": [
    "<string>"
  ],
  "command_paths": [
    "<string>"
  ],
  "context_parts": [
    {}
  ],
  "conversation_id": "<string>",
  "open_file_path": "<string>",
  "open_file_page": 123,
  "expanded_paths": [
    "<string>"
  ],
  "workspace_overview": "<string>",
  "terminal_contents": "<string>",
  "restart_point": 123,
  "zo_site_config": {},
  "mode": "chat"
}
'
{
  "index": 123,
  "part": {
    "content": "<string>",
    "part_kind": "text"
  },
  "event_kind": "part_start"
}

Authorizations

Authorization
string
header
required

Zo API key (zo_sk_...)

Body

application/json
q
string
required

User's message/question

model_name
string | null

Model override

context_paths
string[] | null

File paths to include as context

command_paths
string[] | null

Command file paths

context_parts
Context Parts · object[] | null

Pre-formatted context parts

conversation_id
string | null

Continue existing conversation

open_file_path
string | null

Currently open file path

open_file_page
integer | null

Current page in open file

expanded_paths
string[] | null

Expanded directory paths

workspace_overview
string | null

Workspace tree overview

terminal_contents
string | null

Terminal output to include

restart_point
integer | null

Message index to restart from

zo_site_config
Zo Site Config · object

Site configuration

mode
enum<string> | null
default:chat

Agent mode: 'chat' or 'schedule' etc

Available options:
chat,
schedule,
sms,
email

Response

SSE stream of agent events

SSE event indicating the start of a new message part.

index
integer
required

Index of this part in the message

part
TextPart · object
required

Text content part.

event_kind
string
default:part_start

Event type identifier

Allowed value: "part_start"