what are you talking about add it to the osbot window? the api just contains all of the available classes/methods for you to use when writing your script
yes, you need to grab the charid and sessionid using a packet sniffer and set the env vars for a 30 day active token, then launch osb.
SET JX_CHARACTER_ID="CHARID"
SET JX_DISPLAY_NAME="DoesntMatter"
SET JX_SESSION_ID="SessID"