# Llama 2 API not working 404 error

**URL:** <https://discuss.huggingface.co/t/llama-2-api-not-working-404-error/63333>\
**Category:** 🤗Transformers\
**Created:** [November 23, 2023, 8:26pm UTC](https://discuss.huggingface.co/t/llama-2-api-not-working-404-error/63333 "2023-11-23T20:26:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![valogoblin](https://avatars.discourse-cdn.com/v4/letter/v/8e7dd6/32.png) [@valogoblin](https://discuss.huggingface.co/u/valogoblin)\
**Post date:** [November 23, 2023, 8:26pm UTC](https://discuss.huggingface.co/t/llama-2-api-not-working-404-error/63333/1 "2023-11-23T20:26:51Z")

</div>

hi i am trying use the API in my javaScript project, I got this API endpoint from llama 2 hugging face space from " use via API " but getting 404 not found error used exact same code given by hugging face.

```auto
import { client } from "@gradio/client";

const app = await client("https://huggingface-projects-llama-2-7b-chat.hf.space/--replicas/gm5p8/");
const result = await app.predict("/chat", [		
				"Howdy!", // string in 'Message' Textbox component		
				"Howdy!", // string in 'System prompt' Textbox component		
				1, // number (numeric value between 1 and 2048) in 'Max new tokens' Slider component		
				0.1, // number (numeric value between 0.1 and 4.0) in 'Temperature' Slider component		
				0.05, // number (numeric value between 0.05 and 1.0) in 'Top-p (nucleus sampling)' Slider component		
				1, // number (numeric value between 1 and 1000) in 'Top-k' Slider component		
				1, // number (numeric value between 1.0 and 2.0) in 'Repetition penalty' Slider component
	]);

console.log(result.data);

```
