curl -sf -N https://gateway.flocks.local/v1/execute \
  -H 'Accept: text/event-stream' \
  -H 'Content-Type: application/json' \
  -d '{
    "idempotency_key": "demo-1",
    "task": "Respond exactly: flocks-playground-ok",
    "driver": "codex",
    "auth_token": "ops"
  }'

Request

{
  "idempotency_key": "string",
  "task":            "string",
  "driver":          "claude | codex | gemini | …",
  "model":           "string (optional)",
  "auth_token":      "string"
}

Response (SSE)

The stream is a sequence of OutputEvent JSON payloads. Final event is session_end.
data: {"kind":"agent_token","text":"flocks"}

data: {"kind":"agent_token","text":"-playground-ok"}

data: {"kind":"session_end","exit_code":0,"duration_ms":3411}