Meta-Llama-Guard-3-8B doesn't work via API

When I use Playground via UI (https://cloud.sambanova.ai), Meta-Llama-Guard-3-8B model works just fine. However, if I use it via API to access the same model, I always get “Something went wrong!”:

curl -H "Authorization: Bearer $API_KEY" \
     -H "Content-Type: application/json" \
     -d '{
	"stream": true,
	"model": "Meta-Llama-Guard-3-8B",
	"messages": [
		{
			"role": "system",
			"content": "You are a helpful assistant"
		},
		{
			"role": "user",
			"content": "Hello"
		}
	]
	}' \
     -X POST https://api.sambanova.ai/v1/chat/completions
#Something went wrong!

While other models work fine via API.

1 Like

Hello @qdrddr, Welcome to the community!
Meta-Llama-Guard-3-8B model currently does not support the system prompt.
We are working on it. Please remove system prompt from the curl and try it again.

curl -H "Authorization: Bearer $API_KEY" \
     -H "Content-Type: application/json" \
     -d '{
	"stream": true,
	"model": "Meta-Llama-Guard-3-8B",
	"messages": [
		{
			"role": "user",
			"content": "Hello"
		}
	]
	}' \
     -X POST https://api.sambanova.ai/v1/chat/completions

Thanks & Regards

1 Like

Thanks, that worked! @omkar.gangan
Please make sure to remove the system prompt on this page in the example for the Meta-Llama-Guard-3-8B:

2 Likes

@qdrddr I will file a Jira to get that tended to thank you for pointing it out

1 Like