Self-insertion is a literary device in which the author writes themself into the story as a fictional character.
In art, the equivalent of self-insertion is the inserted self-portrait, where the artist includes a self-portrait in a painting of a narrative subject. This has been a common artistic device since at least the European Renaissance.
This literary device should not be confused with a first-person narrator, an author surrogate,[clarification needed] or a character somewhat based on the author, whether the author included it intentionally or not. Many characters have been described as unintentional self-insertions, implying that their author is unconsciously using them as an author surrogate.
"X-insert" or "reader-insert" fiction has the reader appear as a character in the story; their name is substituted with "you" or "y/n" ("your name").