If the encryption system is good (AES), then there should be no way to distinguish its original output from random data - therefore, in particular, there should be no way to distinguish between AES-128 and AES-256, at least on the output bits.
However, most protocols that use encryption ultimately include some metadata that, without ambiguity, indicates the type of algorithm used, including the key size. This means that the recipient knows what to use for decryption. This is not considered a problem. Thus, in practice, everyone should assume that any attacker is looking at your system, knows whether the key is really a 128-bit or 256-bit key.
Some side channels may also provide this information. AES encryption with a 256-bit key is 40% slower than AES encryption with a 128-bit key: just specify how long the encryption server takes to respond, it can determine the key size.
source share