It looks like the OpenAI API has been reworked so that endpoints are now simply /v1/completions or /v1/edits, and models are specified as a "model" parameter in the body.
For example, the /edits endpoint:
curl https://api.openai.com/v1/edits \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-d '{
"model": "text-davinci-edit-001",
"input": "What day of the wek is it?",
"instruction": "Fix the spelling mistakes"
}'
The /completions endpoint:
curl https://api.openai.com/v1/completions \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-d '{
"model": "code-davinci-002",
"prompt": "Say this is a test",
"max_tokens": 5
}'
It looks like the OpenAI API has been reworked so that endpoints are now simply
/v1/completions
or/v1/edits
, and models are specified as a"model"
parameter in the body.For example, the
/edits
endpoint:The
/completions
endpoint:See: OpenAI Documentation