Is this possible to allow creating nodes only for Administrator via interface but for others in custom code? As author of my content type I can choose any user (current user, even anonymous).

Nodes will created programmatically, so:

$node->uid = $current_user->uid;

However I want to allow access to node/add/custom_type (node form) only for Administrator or even block for everyone.

I am no totally sure that Drupal checks permissions before node_save(), so that's why I am asking.
If what you are asking is...

How can I allow nodes of a certain type to be created programmatically by everyone, but, at the same time, disallow everyone but the Administrator from creating them from the UI?

...the quickest way might be for you to use Rules to create a redirect away from node/add/custom_type for everyone but the Administrator.

However, if you are already creating custom module code, you could also do this pretty simply in hoot_init(), eg, something along the lines of:

global $user;
if ($_GET['q']=='node/add/custom_type') {
   if ($user-&gt;uid != 1) { // or whatever logic you want to use to determine the Administrator
     drupal_goto('somewhere else');
   }
}


In either case, you'd have to set up permissions to allow any user to create these types of nodes.