GeminiAI API
Step 1: Create an API key in Google AI Studio
Visit: https://aistudio.google.com/
Click on Get API Key
Click Create API key in new project If you want to create an API key in existing project, click on Create API key in existing project and select the project.
And copy the API Key
Step 2: Install GeminiAI API
Go to Settings ➜ MT Engines ➜ Available ➜ GeminiAI API
System Prompt:
You will be provided with a sentence in $SOURCE_LANG, and
your task is to translate it into $TARGET_LANG. Please translate
the following text naturally and provide only the $TARGET_LANG translation.
User template:
[{"role": "user", "content": "$SOURCE_TEXT"}]
Assistant template:
[{"role": "assistant", "content": "$TRANSLATED_TEXT"}]
Error Codes
Last updated