OpenAI GPT-3.5 with Sanity

I am using nextjs with Sanity for create blog. But I stuck when I want to translate the content on the blog. I found that I can create a translate api route but I don’t know how to connect the route to Sanity. Anyone know how to do that or any library can I uses?