Hello Jared!
I actually used different API key. Also, I have solved the problem:
So, instead of using " " to declare the string, I have used ` to make sure \" isn't causing the issue. Also, I found out using Marshal doesn't work with Clarifai api. After using default encoding ([]byte) it solved the situation.
testStr := `{"inputs": [{"data": {"image": {"url": "https://samples.clarifai.com/metro-north.jpg"}}}]}`
datas := []byte(testStr)
urlAPI := "https://api.clarifai.com/v2/models/aaa03c23b3724a16a56b629203edc62c/outputs"
req, err := http.NewRequest("POST", urlAPI, bytes.NewBuffer(datas))
req.Header.Set("Authorization", "Key MY_KEY")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()