Is it possible set weights to different parts of the text sent to Embedding API

Ya, I see what you mean.
I was thinking this might be useful for you, but you might have to make minor changes.
Let me know how it goes.