Runloop Devboxes default to the user user in the home folder /home/user/. You can specify a different user when creating a devbox via launch_parameters.user_parameters. Root is supported by natively as the following:
{
  launch_parameters: {
    user_parameters: {
      username: "root"
      uid: 0
    }
  }
}
Working example:
curl -X POST 'https://api.runloop.ai/v1/devboxes' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer $RUNLOOP_API_KEY" \
  -d '{
    "launch_parameters": {
      "user_parameters": {
        "username": "root",
        "uid": 0
      }
    }
  }
}'
Devboxes also support non-standard users from created blueprints. See Customizing the Base user for more information.