81trust / 100
Rewrite
by x402.hydratrader.ai in Markets & finance
x402 APIPassing, checked 1 h ago
Rewrite text: Verb-path alias of POST /v1/cheap-errand ($0.01 USDC). Same handler + payment terms; path defaults task=rewrite when body.task omitted. Cheap agent glue for buyer-supplied text. Base via x402. No API key.
POST https://x402.hydratrader.ai/v1/rewrite
Last 30 days
All checks passedSome failedAll failedNot checked
- Uptime
- 100%
- Response time
- 190 ms typical, 190 ms slowest 5%
- Last check
- 1 h ago
- Next check
- any minute now
How to call it
# See the payment challenge (nothing is charged)
curl -i -X POST "https://x402.hydratrader.ai/v1/rewrite" \
-H "content-type: application/json" \
-d '{"input":"x402 lets agents pay for APIs with USDC via HTTP 402.","options":{"max_words":40}}'import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client().register(
"eip155:8453",
new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fx402.hydratrader.ai%2Fv1%2Frewrite
const res = await pay("https://x402.hydratrader.ai/v1/rewrite", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"input":"x402 lets agents pay for APIs with USDC via HTTP 402.","options":{"max_words":40}}),
});
console.log(await res.json());Example input
{
"input": "x402 lets agents pay for APIs with USDC via HTTP 402.",
"options": {
"max_words": 40
}
}Example output
{
"client_ref": null,
"endpoint": "cheap-errand",
"next_tasks": [
{
"endpoint": "https://x402.hydratrader.ai/v1/cheap-errand",
"example_body": {
"input": "x402 lets agents pay for APIs with USDC via HTTP 402.",
"task": "extract_keywords"
},
"method": "POST",
"price_usd": "0.01",
"task": "extract_keywords",
"why": "Ranked keywords from the same text"
}
],
"ok": true,
"result": {
"keywords": null,
"label": null,
"meta": {
"chars_in": 58,
"model_hint": "fast"
},
"sentiment": null,
"text": "x402 is an HTTP 402 micropayment protocol so agents can pay USDC for API calls."
},
"task": "rewrite",
"usage": {
"latency_ms": 420,
"price_usdc": "0.01"
}
}Security scan
- No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 1 h ago | Passed | 402 | 771 ms | $0.01 |
| 6 h ago | Passed | 402 | 190 ms | $0.01 |