Temperature and max_token in api GPT-4?

Hello, I’m testing the GPT-4 API. In the playground, it’s possible to configure the temperature and max_token settings. The results are quite impressive.

However, when I make a CURL call, it seems impossible to configure the maximum number of tokens. I get this error message:
{ “error”: { “message”: “Additional properties are not allowed (‘temperature’ was unexpected) - ‘messages.0’”, “type”: “invalid_request_error”, “param”: null, “code”: null } }

As a result, the response is shorter and less adapted.

Will it be possible to create the same API calls as in the playground?

Looking for similar feature to see the behavior changes by setting 0.5 to 0.7 etc via API call. Seems this is not possible at this time.

Appreciated if anyone has solution for the same


I’ve had it working here in PHP. Can you enclose the cURL call in ``` so it’s easy to read? Might be a typo?