api plugin setup