Request :
curl --location --request POST 'https://api.openai.com/v1/engines/davinci/completions'
--header 'Content-Type: application/json'
--header 'Authorization: Bearer '
--data-raw '{"prompt":"What is the capital of France?", "max_tokens": 100}'
{
"id": "cmpl-6Z34AK0A6Pb3Tamvb0ZggZznXY1D3",
"object": "text_completion",
"created": 1673811286,
"model": "davinci",
"choices": [
{
"text": "\n\nWhat is the capital of Russia?\n\nWhat is the capital of Ukraine?\n\nWhat is the capital of China?\n\n62-67\n\nComplete the braille text.\n\n68\n\nAnswer the question.\n\nIs this a big book? No, this book is not big.\n\n69-72\n\nWhich country is the oldest country in the world?\n\n73-77\n\nCan you give me a new hat? No, I",
"index": 0,
"logprobs": null,
"finish_reason": "length"
}
],
"usage": {
"prompt_tokens": 7,
"completion_tokens": 100,
"total_tokens": 107
}