Wrapped API definition in closure