how do you compose your songs? if you write with a guitar like a lot of us you will already know the chords. if you play keyboards (i've found a lot of keyboard players who play by ear aren't as familiar with chords and chord structure as a guitarist) you may find that the keyboard part you play may have enough information for ACW.

record the keyboard part - assuming it's not just the single line melody and contains harmonizing notes to back the tune - as either a midi or audio track and see.

if you just sing a melody in unaccompanied there's no guarantee your pitch will be in a recognizable key