[api] Do not create a PID file unless explicitely told to