Hi Nicolas. It is because the Web Credential Type is HTTP Header and the token is in the Web Credential. OpenAI uses a token passed in the header of the request to authenticate it's web services.
everal new AI features are immediately useful to anyone looking to incorporate Generative AI into their APEX Apps
Nicolas Pilot
Thanks John for sharing. One thing that catches my attention: I see that you are using "make_rest_request" using a "credential_id" but you don't specify the "p_token_url". How is this possible?