code: def construct_api_url(input, representation, resolvers=None, get3d=False, tautomers=False, xml=True, **kwargs):
      
      # File formats require representation=file and the format in the querystring
      if representation in FILE_FORMATS:
          kwargs['format'] = representation
          representation = 'file'
      # Prepend input with 'tautomers:' to return all tautomers
      if tautomers:
          input = 'tautomers:%s' % input
      url = '%s/%s/%s' % (API_BASE, quote(input), representation)
      if xml:
          url += '/xml'
      if resolvers:
          kwargs['resolver'] = ','.join(resolvers)
      if get3d:
          kwargs['get3d'] = True
      if kwargs:
          url += '?%s' % urlencode(kwargs)
      return url
docs: Return the URL for the desired API endpoint.
  
      :param string input: Chemical identifier to resolve
      :param string representation: Desired output representation
      :param list(str) resolvers: (Optional) Ordered list of resolvers to use
      :param bool get3d: (Optional) Whether to return 3D coordinates (where applicable)
      :param bool tautomers: (Optional) Whether to return all tautomers
      :param bool xml: (Optional) Whether to return full XML response
      :returns: CIR API URL
      :rtype: str