I was trying to use nvidia/llama-3.1-nemotron-70b-instruct model with OpenAI API. Using curl everything is working but not in cursor.
I’m getting following error when trying to add OpenAI custom api key:
(status code 0)
TypeError: Failed to fetch
But when running using curl, everything is working fine.
curl https://integrate.api.nvidia.com/v1/chat/completions -H "Content-Type: application/json" -H "Authorization: Bearer nvapi-Zz" -d '{
"messages": [
{
"role": "system",
"content": "You are a test assistant."
},
{
"role": "user",
"content": "Testing. Just say hi and nothing else."
}
],
"model": "nvidia/llama-3.1-nemotron-70b-instruct"
}'
{"id":"chat-dd091bcec726407bb1be66e469a8ab50","object":"chat.completion","created":1729179133,"model":"nvidia/llama-3.1-nemotron-70b-instruct","choices":[{"index":0,"message":{"role":"assistant","content":"Hi."},"logprobs":null,"finish_reason":"stop","stop_reason":null}],"usage":{"prompt_tokens":31,"total_tokens":33,"completion_tokens":2},"prompt_logprobs":null}%