Preheat grill to medium-high heat.
Place the chili powder, paprika, thyme, salt, garlic powder, pepper, cumin, and cayenne pepper in a large bowl and whisk to combine. Set aside.
Rinse chicken under cold running water and pat dry with paper towels. Rub the spice mixture all over the chicken legs or thighs. Place the chicken skin side down on the grill. Cook about 5 minutes, then turn at a 45 degree angle to establish nice grill marks. Cook another 3 to 5 minutes, until skin is crispy, then flip the chicken pieces over. Cook chicken until the internal temperature reaches 165 degrees F and until the juices run clear, about 8 to 10 minutes more.
Remove the chicken from the grill and serve immediately.