Can I use XB24 802.15.4 10ec devices with api firmware? One module shuod send temperature to another module

Yes you can inter mix the modules with transparent mode and API mode.

The output depends on the setting of any given radio. If you have transparent (AT mode) on one side and API on the other, then a message sent in the UART on the transparent side will come out as API on the other sideā€¦ API and Transparent only affect the local modules output, it has nothing to do with the actual transmission of data.