From what I reed Cyanobacteria will use atmospheric N2 to produce ammonia.
Quote:
Nitrogen fixation, the biochemical conversion of “inert” atmospheric N (N 2) to biologically available ammonia (NH 3), is a microbially mediated process of global significance because it provides “new” N to aquatic ecosystems in which biological production is often controlled by N availability
1,
2. N 2 fixation is an anaerobic process carried out by specific prokaryotes, including heterotrophic and chemolithotrophic bacteria and some cyanobacteria (blue-green algae)
source:
Nitrogen fixation, the enzymatic conversion of atmospheric N (N 2) to ammonia (NH 3), is a microbially mediated process by which “new” N is supplied to N-deficient water bodies. Certain bloom-forming cyanobacterial species are capable of conducting ...
www.ncbi.nlm.nih.gov
This leads to believe like all other photosynthetic organisms that ammonia is the easiest to assimilate as it doesn’t require to be transformed.