Set up RPC API