Create completion

POST {{baseUrl}}/completions

Creates a completion for the provided prompt and parameters.

Request Body

{"model"=>"text-davinci-003", "prompt"=>"Write a limmerick about APIs", "max_tokens"=>250, "temperature"=>0.7}

RESPONSES

status: OK

{"id":"cmpl-6wJaCFIsaoGKIQ5wTAm0P1lnGWrKt","object":"text_completion","created":1679356320,"model":"text-davinci-003","choices":[{"text":"\n\nAn API can be a delight\nFor making a website so bright\nAn interface that's neat\nGives you a treat\nFor coding with all your might","index":0,"logprobs":null,"finish_reason":"stop"}],"usage":{"prompt_tokens":7,"completion_tokens":34,"total_tokens":41}}