  We consider Lie algebras admitting an ad-invariant metric, and we study the
problem of uniqueness of the ad-invariant metric up to automorphisms. This is a
common feature in low dimensions, as one can observe in the known
classification of nilpotent Lie algebras of dimension $\leq 7$ admitting an
ad-invariant metric. We prove that uniqueness of the metric on a complex Lie
algebra $\mathfrak{g}$ is equivalent to uniqueness of ad-invariant metrics on
the cotangent Lie algebra $T^*\mathfrak{g}$; a slightly more complicated
equivalence holds over the reals. This motivates us to study the broader class
of Lie algebras such that the ad-invariant metric on $T^*\mathfrak{g}$ is
unique.
  We prove that uniqueness of the metric forces the Lie algebra to be solvable,
but the converse does not hold, as we show by constructing solvable Lie
algebras with a one-parameter family of inequivalent ad-invariant metrics. We
prove sufficient conditions for uniqueness expressed in terms of both the
Nikolayevsky derivation and a metric counterpart introduced in this paper.
  Moreover, we prove that uniqueness always holds for irreducible Lie algebras
which are either solvable of dimension $\leq 6$ or real nilpotent of dimension
$\leq 10$.
