Logo
Artificial Intelligence API Documentation

Create edit

POST {{baseUrl}}/edits

Creates a new edit for the provided input, instruction, and parameters.

 

Body PARAM

Key Datatype Required Description 



HEADERS

Key Datatype Required Description 




RESPONSES

status OK

{ "object": "edit", "created": 1670702460, "choices": [ { "text": "What day of the week is it?\n", "index": 0 } ], "usage": { "prompt_tokens": 25, "completion_tokens": 28, "total_tokens": 53 } }



Curl
curl -X POST 'https://api.openai.com/v1/edits' -d '{"model":"text-davinci-edit-001","input":"What day of the wek is it?","instruction":"Fix the spelling mistakes"}'

ENDPOINTS