API returns empty response or repeated prompts

Because you’re using the wonderful Davinci you can use
“echo”: true

Just to see how your prompt is being formatted.

Otherwise, can’t help without seeing your request & response