The Sub-micron Resolution X-ray spectroscopy (SRX) beamline will benefit from the ultralow emittance of the National Synchrotron Light Source II to address a wide variety of scientific applications studying heterogeneous systems at the sub-micrometer scale. This work focuses on the KB branch (ΔE: 4.65-28 keV). Its main optical components include a horizontally focusing mirror forming an adjustable secondary source, a horizontally deflecting monochromator and two sets of Kirkpatrick-Baez mirrors as focusing optics of two distinct inline stations for operations requiring either high flux or high resolution. In the first approach, the beamline layout was optimized with ray-tracing calculations involving Shadowvui computer codes. As a result, the location and characteristics of optics were specified for achieving either the most intense or the smallest monochromatic beam possible on the target (10 13 ph/s or 10 12 ph/s respectively in a 500 nm or 65 nm focal spot). At the nanoprobe station, the diffraction limited focusing of X-rays is governed by the beam coherence. Hence, a classical geometric approach is not anymore adapted. To get reliable estimates of the Nanoprobe performances, a wavefront propagation study was performed using Synchrotron Radiation Workshop (SRW) code. At 7.2 keV, calculations show an intense (10 12 ph/s) 67 nm wide diffraction limited spot achieved with actual metrological data of mirrors.