We analyzed 53 historical textile samples from a collection of caftans and brocades dating between the sixteenth and nineteenth century in the Topkapi Palace Museum (TPM) by scanning electron microscopy with energy dispersive X-ray spectroscopy (SEM-EDX). Data were collected on the type, dimensions, elemental composition, and level of corrosion. The technique is presented in this work as an efficient and micro-destructive tool for the characterization of the structure of historical metal threads. SEM-EDX analysis for different energies was performed on a selection of gold and silver threads belonging to the historical textiles. The results were interpreted via laboratory prepared samples of gilt Ag and sulfur reacted Ag at different thicknesses for Au and Ag2S layers respectively. A series of Au-Ag alloys for different Au/Ag ratios were prepared for comparative analysis. The threads were made of metal strips wound around a silk core. Metal wires and flat strips were also used. The use of differential energies allowed for differentiating strips and wires made of homogeneous silver and gold alloys from the ones coated with a thin gold layer. Analysis of EDX data revealed that the Au film thickness was very thin (10-60 nm). Formation of Ag2S layers over the thin Au film as thick as 1.5 mu m was taking place. Formation of thinner Ag2S layers over non-gilt Ag suggested different reaction mechanisms for gilt and non-gilt cases.