For most alien individuals present in the U.S. on an F-1 Student Visa, the answer is no. Generally speaking, the time spent by an alien individual studying in the U.S. on an F-1 Student Visa would not count toward determining whether he or she was a resident alien under the substantial presence test for federal tax purposes. Thus, if you are an alien individual with an F-1 Student Visa, you are probably a nonresident alien.
In general, if you are a nonresident alien for any part of the year, you do not qualify for the AOTC.However, your parents may qualify for the credit even if you are a nonresident alien student if they claim you as a dependent on their tax return. If you are a U.S. resident filing Form 1040, and your parents do not claim you as a dependant, and you meet all of the other requirements for the credit, you may qualify for the credit. I have posted an informative link below.