Integrate search based on chatgpt in page html

Hi, i want to integrate a search input based on api chatgpt in my html page of web site.
i wrote the api-key but it’s not working yet !
‘Content-Type’: ‘application/json’,
‘Authorization’: ‘Bearer My_key’ // Remplacez par votre jeton API ChatGPT
how can i solve this problem please