How to Use API + custom gpt

Hi everyone, I have a question. I usually use the openai API (both from php and phyton), I would like to understand how to use my custom chatgpts (therefore trained with my personal data), rather than a basic model? Thanks so much to anyone who can help me, possibly even with some example code. Thank you in advance.