Since your ex is claiming head of household, I assume the child resides with your ex more than 50% of the time, making him the custodial parent.
As
non-custodial parent, you cannot claim her unless your ex releases his claim
by providing you with a signed Form 8332. You must attach this release to your return to claim a child that does not reside with you.