i need to use Xbee S2 in API mode, 1 Coordinator and 2 router, how to coding program in arduino

i need to use Xbee S2 in API mode.i have 1 Coordinator and 2 routers.
how to coding program in arduino?

//Can anyone guide me how to configure in XCTU-Program
and how to coding in Arduino to connect between routers and Coordinator.

PLz help

Varawut,

You can configure the XBee modules for API mode by either loading on the proper Router API firmware or by setting the ATAP command to 1 or 2 depending on what your Arduino code wants.

Digi Support