Translate text (100 languages)

$0.003 per call · failed calls are never charged · no account or API key needed

Translate text between about 100 languages with Meta's M2M100 1.2B model. Give the target language as an ISO code such as en, sv, de, fr, es, zh or ja; the source language is optional. Use to localise messages and documents.

Run it free (25 free calls) Buy credits by card (from $5) Example result (JSON)

Inputs

NameTypeDescription
text (required)stringText, up to 4,000 characters
to (required)stringTarget language code, e.g. sv
fromstringSource language code (default en)

Request

Over HTTP, with a card key from /credits:

curl -H "Authorization: Bearer adt_…" "https://agent-data-tools.revmesh2074.workers.dev/ai/translate?text=Payment%20received%2C%20thank%20you!&to=sv"

Or one of your 25 free calls, no key:

curl "https://agent-data-tools.revmesh2074.workers.dev/ai/translate?text=Payment%20received%2C%20thank%20you!&to=sv&trial=1"

Without a key, the same URL answers 402 Payment Required with x402 and MPP terms, so an agent with a wallet pays per call in USDC (Base, Polygon, Arbitrum, Monad, World Chain or Tempo) and retries.

Example result

{
  "translatedText": "Betalning mottagen, tack!",
  "from": "en",
  "to": "sv",
  "model": "@cf/meta/m2m100-1.2b"
}

From an AI agent (MCP)

Add the MCP server to Claude, Cursor or any MCP client. This tool is ai_translate, and the first 25 successful calls are free:

https://agent-data-tools.revmesh2074.workers.dev/mcp

Related tools