The Oklahoma State Butterfly is the black swallowtail. It is also the state butterfly of New Jersey.
The larval stage, or caterpillar, has distinctive bands of green marked with black and yellow. When startled or threatened, the caterpillar can produce a pair of bright yellow horn-like antennae on its head. The structure is called an osmeterium, from the Greek words meaning “odor organ.”
The osmeterium releases an unpleasant odor, and in doing so discourages a potential predator. The organ is quickly withdrawn once the threat has passed.
I could not smell anything from the one in the photo. Perhaps I wasn’t close enough or my sense of smell wasn’t that acute.
You can easily attract these beautiful butterflies and their caterpillars to your garden by planting dill, fennel, or parsley, the host plants for the caterpillar.