It is possible to ask for a NIF for a minor, but you will need some more documents to complete your application. You will need the following :
Birth certificate
Copy of passport of the first parent
Copy of passport of the second parent
If there’s only one parent, we will need proof of a single custodial parent instead of the second passport (proof of custody, death certificate…).