openAI API token max_tokens

i am running query with OpenAPI token
i keep getting error in retool: "invalid type for 'max_tokens' expected an integer, but got a string instead". with Postman the query running with no errors.

I would appreciate your help
Thx

Hi @eli_shmueli :wave:

Welcome to the forum. Would you mind sharing a screenshot of the API Request?

Hi Abbey,
Thank you for your response. issue solved :).
Other issue i am facing is the fact that when i am using REAT API query with my own openAPI Keys the response is very slow. and i am not using Retool AI query.

Any help here will be appreciated.
Thx

Hey @eli_shmueli,

Glad you got it resolved!
Happy to help. If you hover over the query runtime you can see a more detailed breakdown on what’s taking the extra time. Could you please share screen shots and runtimes?

Here's a Doc that may be helpful: Query performance best practices | Retool Docs