# Access of LLaMA-2-7b-chat-hf Model

**URL:** <https://discuss.huggingface.co/t/access-of-llama-2-7b-chat-hf-model/96774>\
**Category:** Models\
**Created:** [July 11, 2024, 9:39am UTC](https://discuss.huggingface.co/t/access-of-llama-2-7b-chat-hf-model/96774 "2024-07-11T09:39:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Divya1501](https://avatars.discourse-cdn.com/v4/letter/d/97f17d/32.png) [@Divya1501](https://discuss.huggingface.co/u/Divya1501)\
**Post date:** [July 11, 2024, 9:39am UTC](https://discuss.huggingface.co/t/access-of-llama-2-7b-chat-hf-model/96774/1 "2024-07-11T09:39:06Z")

</div>

I was trying to connect  
$url = ‘[https://api-inference.huggingface.co/models/meta-llama/LLaMA-2-7b-chat-hf](https://api-inference.huggingface.co/models/meta-llama/LLaMA-2-7b-chat-hf)’  
with PHP code using API key

but it gives  
[error] =\> Model requires a Pro subscription; check out [Hugging Face – Pricing](http://hf.co/pricing) to learn more. Make sure to include your HF token in your query.

Please suggest any solution
