Provisions an ephemeral sandbox, clones a public GitHub, GitLab, or Bitbucket repository (full HTTPS URL required), and runs a read-only agent against the working tree.
JSON (default): Returns the completed job payload as application/json when stream is not true and Accept does not prefer text/event-stream.
Server-Sent Events: Send Accept: text/event-stream or set "stream": true in the body. Events are JSON objects with a type field (job, status, opencode for read-only agent stream output, result, error, done). Comment lines (: keep-alive) may appear between events. Set "stream": false to force JSON even if Accept requests SSE.
Consumes the same query billing operation as POST /search; failed runs are refunded on the server.
API key must be provided in the Authorization header
Full HTTPS clone URL for a public GitHub, GitLab, or Bitbucket repository (not org/repo shorthand).
1Natural-language question for the read-only agent.
1Optional branch, tag, or commit to check out.
1When true, use SSE unless explicitly set to false (which forces JSON regardless of Accept).
Successful Response (JSON job payload, or text/event-stream when streaming)
Serialized sandbox query job. Optional fields depend on workspace kind and job status.