AI Translator Skill for Agents
AI Translator Skill for Agents
A ready-to-use skill for AI agents to translate text between languages via the AI Pass API.
Quick Start
Set your API key as $AIPASS_API_KEY (get one at the Developer Dashboard).
Translate Text
curl -s -X POST https://aipass.one/apikey/v1/chat/completions \
-H "Authorization: Bearer $AIPASS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5-mini",
"messages": [
{"role": "system", "content": "Translate to Spanish. Return only the translation."},
{"role": "user", "content": "Hello, how are you today?"}
]
}'
Response path: choices[0].message.content
Parameters
- model:
gpt-5-mini(fast, accurate) - Target language: Specify in system prompt
- 100+ languages supported
Pricing
- $1 free credit on signup
- Pay as you go
Related
Skill File
---
name: translator
description: Translate text between any languages using AI Pass text completion API.
version: 1.0.0
---
# Translator Skill
Translate text using AI completion.
## Requirements
- AI Pass API key (create at https://aipass.one/panel/developer.html)
- Set as environment variable: `$AIPASS_API_KEY`
## Usage
### Translate Text (curl)
```bash
curl -s -X POST https://aipass.one/apikey/v1/chat/completions \
-H "Authorization: Bearer $AIPASS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5-mini",
"messages": [
{"role": "system", "content": "You are a professional translator. Translate the following text to Spanish. Preserve meaning, tone, and context. Return only the translated text."},
{"role": "user", "content": "The quick brown fox jumps over the lazy dog. This sentence contains every letter of the English alphabet."}
]
}'
```
Response: `r.choices[0].message.content` — translated text.
### Multiple Languages
```bash
curl -s -X POST https://aipass.one/apikey/v1/chat/completions \
-H "Authorization: Bearer $AIPASS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5-mini",
"messages": [
{"role": "system", "content": "Translate to Japanese. Return only the translation."},
{"role": "user", "content": "Hello, how are you today?"}
]
}'
```
### Python
```python
import requests, os
def translate(text, target_language):
r = requests.post(
"https://aipass.one/apikey/v1/chat/completions",
headers={
"Authorization": f"Bearer {os.environ['AIPASS_API_KEY']}",
"Content-Type": "application/json"
},
json={
"model": "gpt-5-mini",
"messages": [
{"role": "system", "content": f"Translate to {target_language}. Preserve meaning and tone. Return only the translation."},
{"role": "user", "content": text}
]
}
)
return r.json()["choices"][0]["message"]["content"]
print(translate("Good morning, world!", "French"))
print(translate("I love programming", "German"))
```
## Supported Languages
100+ languages including: Spanish, French, German, Chinese, Japanese, Korean, Arabic, Portuguese, Russian, Hindi, Italian, Dutch, Turkish, Polish, and more.
## Notes
- Model: `gpt-5-mini` (fast, accurate translations)
- $1 free credit on signup at https://aipass.one
- Create API key at https://aipass.one/panel/developer.html
## Related
- App: https://aipass.one/apps/translator
- User guide: https://aipass.one/blog/ai-translator-online
- Dev tutorial: https://aipass.one/blog/build-ai-translator
Download Skill File