# Or in an asyncio context:
>>> await endpoint.async_client.text_generation("I am")
```  
If the Inference Endpoint is not running, an [`InferenceEndpointError`] exception is raised:  
```py
>>> endpoint.client
huggingface_hub._inference_endpoints.InferenceEndpointError: Cannot create a client for this Inference Endpoint as it is not yet deployed. Please wait for the Inference Endpoint to be deployed using `endpoint.wait()` and try again.
```