Some notes regarding the OG values on the node object I use when creating nodes programatically.
$client->og_description = $client->title; //A mandatory field, I just use the title
$client->og_private = 1; //visible only to its members
$client->og_register = 1; //a corresponding checkbox will be added to the user registration form
$client->og_selective = 3; //Closed - membership is exclusively managed by an administrator.
$client->og_parent = (int) $server->field_default_group_nid; //Set OG ancestry (parent)