Errors when using the Gemini API to translate between Korean and Japanese

I get an error like 「うあああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああっっ!?」=아아아아 Sentences fill up to the limit of the token. when using the API to translate between Korean and Japanese. It happens on all models. Sometimes it happens even when I translate directly from AI studio.

Hey @user1090, Welcome to the forum.

Though I’m not proficient in Korean and Japanese, I experimented with Gemini API, and it seems to work fine, didn’t get any errors. Here is the Colab gist for your reference.

If possible, could you share the Japanese or Korean text so that I can reproduce the issue from my end?

Thanks!