APA has advice now: https://apastyle.apa.org/blog/how-to-cite-chatgpt
Primary difference is to decide if you (the writer) can retrieve the content or not? If you can retrieve the content, cite it as a conversation with your AI of choice and this should look different than having your AI write code or a model.

MLA does a nice job as well: https://style.mla.org/citing-generative-ai/
5 examples of how AI was used and how to cite it include: Paraphrasing Text, Quoting Text, Citing Creative Visual Works, Quoting Creative Textual Works, Citing Secondary Sources Used by an AI Tool
[read the MLA entry for clear examples of these differences. really.]

Remember to check any sources AI generates. As of early 2024, it’s still hallucinating them and has no access to the big publishers.

For code, my earlier post seems to still be useful. MIT has not updated this page to mention AI specifically, but covers the principles: https://integrity.mit.edu/handbook/writing-code

Nature and Science weighed in and have explicitly stated that AI can’t be an author. I’ll keep looking and update when the answers get clearer.
Science journals policy and a March 2023 article from NIH’s Environmental Factor with additional links.