class_docstr: Client to configure requests and make calls to the HuggingFace Inference API.
  
  Example:
  
  ```python
  >>> from huggingface_hub.inference_api import InferenceApi
  
  >>> # Mask-fill example
  >>> inference = InferenceApi("bert-base-uncased")
  >>> inference(inputs="The goal of life is [MASK].")
  [{'sequence': 'the goal of life is life.', 'score': 0.10933292657136917, 'token': 2166, 'token_str': 'life'}]
  
  >>> # Question Answering example
  >>> inference = InferenceApi("deepset/roberta-base-squad2")
  >>> inputs = {
  ...     "question": "What's my name?",
  ...     "context": "My name is Clara and I live in Berkeley.",
  ... }
  >>> inference(inputs)
  {'score': 0.9326569437980652, 'start': 11, 'end': 16, 'answer': 'Clara'}
  
  >>> # Zero-shot example
  >>> inference = InferenceApi("typeform/distilbert-base-uncased-mnli")
  >>> inputs = "Hi, I recently bought a device from your company but it is not working as advertised and I would like to get reimbursed!"
  >>> params = {"candidate_labels": ["refund", "legal", "faq"]}
  >>> inference(inputs, params)
  {'sequence': 'Hi, I recently bought a device from your company but it is not working as advertised and I would like to get reimbursed!', 'labels': ['refund', 'faq', 'legal'], 'scores': [0.9378499388694763, 0.04914155602455139, 0.013008488342165947]}
  
  >>> # Overriding configured task
  >>> inference = InferenceApi("bert-base-uncased", task="feature-extraction")
  
  >>> # Text-to-image
  >>> inference = InferenceApi("stabilityai/stable-diffusion-2-1")
  >>> inference("cat")
  <PIL.PngImagePlugin.PngImageFile image (...)>
  
  >>> # Return as raw response to parse the output yourself
  >>> inference = InferenceApi("mio/amadeus")
  >>> response = inference("hello world", raw_response=True)
  >>> response.headers
  {"Content-Type": "audio/flac", ...}
  >>> response.content # raw bytes from server
  b'(...)'
  ```
code: def __repr__(self):
      # Do not add headers to repr to avoid leaking token.
      return f"InferenceAPI(api_url='{self.api_url}', task='{self.task}', options={self.options})"
  
file_path: huggingface_hub/src/huggingface_hub/inference_api.py
imports: import io
  from typing import Any, Dict, List, Optional, Union
  from .constants import INFERENCE_ENDPOINT
  from .hf_api import HfApi
  from .utils import build_hf_headers, get_session, is_pillow_available, logging, validate_hf_hub_args
  from .utils._deprecation import _deprecate_method
label_desc: Use image node_id 2 for calling the InferenceApi obj's underlying member method code with example usage: obj.__repr__() and returns: str, self, str, self, str, self, str