Almost all fiction takes some inspiration from reality. I started my work in progress YA with a few TV characters from a specific show and a version of the self I wish I could be. It's changed enough that I don't think anyone would see the references, but that's because otherwise I'd have infringed on the copyright.
My non speculative middle grade is inspired by my husband whose mother died of cancer before I met him.
I have a picture book where the first character is my daughter and even has her name. In another one, I totally based the main character on my daughter an her exact actions every night but I took off from there.
This is normal, but you aren't writing nonfiction. As soon as you add anything or change anything or introduce an element that couldn't be or have been there in real life, it's fiction.