Wrong URL format → use: https://api-inference.huggingface.co/models/{model_id} Missing or incorrect API token in headers The model (like LLaMA 3) isn’t available via the public Inference API
https://api-inference.huggingface.co/models/{model_id}
Try with gpt2 and make sure your token is set correctly.
gpt2