What is the correct method for adding information to an API "ChatGPT"?

i have like two html pages , first for gathering information like name , preferred Language , age, etc.
and second page is a chatGPT API will make a conversation and ask user question based on the first page answers “data”
What is the correct method for adding information to a GPT API?
and what to use for this kind of projects as API “chat GPT” ?
assistant , chat API ?