How can I get the exact date the image was captured?

Hi, I’m using the Rest API and retrieving image from this endpoint: https://services.sentinel-hub.com/api/v1/process Here’s my request example:

url = "https://services.sentinel-hub.com/api/v1/process"

headers = {
  'Accept': '*/*',
  'Content-Type': 'application/json',
  'Authorization': f'Bearer {token["access_token"]}',
  'Origin': 'https://apps.sentinel-hub.com',
  'Connection': 'keep-alive',
  'TE': 'Trailers'
}

res = requests.request("POST", url, headers=headers, data = json.dumps(payload), timeout=10)

What I get in the res.content is an image but I’m also interested in the date it was captured. Is there any way I can get the date it was captured?

We usually follow a different route - first using the catalogue API (for the moment best on WFS but very soon a STAC option as well) to gather meta-data about available scenes in the area (including their timestamps), then use process API to retreive the data for that specific timestamp.

There is however a function in the EVALSCRIPT to do what you are after, see this example:
https://docs.sentinel-hub.com/api/latest/#/data/Examples_for_S2L1C?id=true-color-and-metadata-multi-part-response-geotiff-and-json