# Unable to access Llama3.1 model despite having access granted

**URL:** <https://discuss.huggingface.co/t/unable-to-access-llama3-1-model-despite-having-access-granted/105863>\
**Category:** Models\
**Created:** [September 8, 2024, 3:41pm UTC](https://discuss.huggingface.co/t/unable-to-access-llama3-1-model-despite-having-access-granted/105863 "2024-09-08T15:41:39Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [September 9, 2024, 3:30am UTC](https://discuss.huggingface.co/t/unable-to-access-llama3-1-model-despite-having-access-granted/105863/2 "2024-09-09T03:30:37Z")

</div>

That’s normal. This model is **Gated** , so you have to provide personal information and use a token for your account to use it.  
If that’s not possible, you’ll have to find another copy of one of these.

> [@Is there llama3 api for hugging face to use?](https://discuss.huggingface.co/t/is-there-llama3-api-for-hugging-face-to-use/105411/6):
>
> Hi, HF provides the [serverless Inference API](https://discuss.huggingface.co/t/is-there-llama3-api-for-hugging-face-to-use/105411/6) to do just that. It comes with OpenAI-compatible APIs. Usage is as follows (add your HF token): # instead of `from openai import OpenAI` from huggingface\_hub import InferenceClient # instead of `client = OpenAI(...)` client = InferenceClient( "meta-llama/Meta-Llama-3.1-8B-Instruct", token=\<your-hf-token\>, ) output = client.chat.completions.create( model="meta-llama/Meta-Llama-3-8B-Instruct", messages=[ {"role": "system", "…

---

_[View the full topic](https://discuss.huggingface.co/t/unable-to-access-llama3-1-model-despite-having-access-granted/105863)._
