cURL command that wrote in documentation doesn't work

I used curl https://api.openai.com/v1/files -H "Authorization: Bearer my_secret_key" -d purpose="classifications" -d file='@train.jsonl' command and I had a “The browser (or proxy) sent a request that this server could not understand.” error. Where is the mistake that I made?

1 Like

Can you try the same command in python and report the results?

Also, if you can make the curl command verbose with -vi (i prints response headers) and paste the output here, that might help figure out the problem.

Try use

curl https://api.openai.com/v1/files \
  -H "Authorization: Bearer my_secret_key" \
  -F purpose="classifications" \
  -F file='@train.jsonl'

I tried the same command in python but again it wasn’t working as well, because the problem wasn’t related to me. It was related to OpenAI and they solved it. Thanks to all of you!

1 Like