EDIT: A question: if I write a short fanfic inspired by someone's work (artwork/song), can I just post it & giving credit & link to the original artist or should I get their permission first?
Many artists don't like to see their stuff reposted, even with links and credit, so it's always in good form to ask permission first, if only to avoid awkwardness. If they ask you to not repost the piece itself, you can still link to the art that inspired your story in your author's notes, so people will still have the reference.
That's for fanart, mostly. With a song, I suppose the artist (if we're talking about a youtube musician, or the like) would even prefer the extra exposure of an embedded video, to earn as many views as possible.
eta: unless I misunderstand your question, and what you're asking is if you need to ask permission to post your own story if it was inspired by something else? In that case, go ahead and post your stuff. Inspiration can come from anything, but the story is still yours.