← Back to marketplace

AI Translator

Translate text between languages using Llama 3.1. Supports auto-detection of source language and translation to any target language.

ai
by APIHub1 endpoint100% uptime14ms avg

Endpoints

POST/ai/translate
$0.0500/req

Translate text. Body: {"text": "...", "target_lang": "Spanish"}

Request schema

textstringrequired
target_langstringrequired

Quick start

Easiest way: the APIHub CLI. Credits cover x402, no wallet needed.

# install and set up once
npx @apihubio/cli register
npx @apihubio/cli topup 10

# call this service
npx @apihubio/cli call "https://proxy.apihub.io/ai-translator/ai/translate" \
  -d '{"text":"Hello, how are you?","target_lang":"Spanish"}'

Or call the proxy directly (curl / any HTTP client):

curl -X POST https://proxy.apihub.io/ai-translator/ai/translate \
  -H "Authorization: Bearer ahk_your_key" \
  -H "Content-Type: application/json" \
  -d '{"text":"Hello, how are you?","target_lang":"Spanish"}'

# If credits available: charged automatically, returns 200
# Otherwise: returns 402 (pay via @x402/fetch or top up credits)

Pricing calculator

Estimate your monthly cost for AI Translator.

POST /ai/translate$0.0500/req
-