Tools / AI
Translate text
Translates up to 8000 characters into the target language. The source language is detected automatically. Markdown, line breaks and placeholders are preserved.
- Price per call
- $0.003 USDC
- Endpoint
- POST https://x402-tools.com/v1/translate
- Also accepts
- GET with query parameters
- Payment
- x402, exact scheme, USDC on Base
- Returns
- application/json
Parameters
| Name | Type | Description |
|---|---|---|
| text required | string | Text to translate (max 8000 characters). |
| target required | string | Target language, as a name or code (e.g. 'Dutch' or 'nl'). |
| source | string | Optional source language. Detected if omitted. |
Call it from an agent
import { wrapFetchWithPayment } from "x402-fetch";
import { privateKeyToAccount } from "viem/accounts";
const account = privateKeyToAccount(process.env.AGENT_PRIVATE_KEY);
const paidFetch = wrapFetchWithPayment(fetch, account);
const res = await paidFetch("https://x402-tools.com/v1/translate", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
"text": "Pay per request, no API key needed.",
"target": "Dutch"
}),
});
// costs $0.003 in USDC on Base
Without a payment the endpoint answers 402 with the price, so you can inspect it first:
curl -i -X POST "https://x402-tools.com/v1/translate" -H "content-type: application/json" -d '{"text":"Pay per request, no API key needed.","target":"Dutch"}'
Example response
{
"translated_text": "Betaal per verzoek, geen API-sleutel nodig.",
"target_language": "Dutch",
"detected_source_language": "English"
}
If the tool fails or your input is invalid, the payment is not settled.
Other tools
Web page to markdown$0.003
Turn any URL (HTML, PDF, Office docs) into clean markdown an agent can read.
Website screenshot$0.01
A PNG screenshot of any web page, rendered in a real browser.
Summarize text or a URL$0.005
A faithful short, medium or long summary of any text or web page.
Extract structured data$0.01
Pull JSON fields out of any text or web page, matching your schema.
Generate an image$0.02
Text-to-image with FLUX.1 schnell, returned in seconds.
Base wallet lookup$0.002
ETH, USDC and any ERC-20 balances for an address on Base, live from the chain.