LinkedIn article, ready to publish (research + copy + sized images)
POST /v1/linkedin-articleHand over a topic and get a publish-ready LinkedIn article back: grounded web research with cited sources, three headline options, a hook-first body under subheads with facts linked to their sources, key takeaways, a companion post with hashtags, and generated images delivered at LinkedIn's own sizes (article cover 1920x1080, link-share 1200x627, feed square and portrait, in-article 16:9) as inline JPEG under 3 MB. Send POST /v1/linkedin-article with the required field topic and pay $1.10 per call over x402 with USDC on an EVM chain or MPP. It returns a JSON object with report, title, article, post, images and 3 more.
Optional byline, angle, audience, tone and CTA. Nothing from memory; nothing posted on your behalf. One payment, one package. Not cached. Takes up to 3 minutes to answer: send the paid call with "Prefer: respond-async" to get a job link at once and collect the answer from it (on x402 the payment settles only on a delivered result), or with "Prefer: wait=180" and keep the connection open for at least 210 seconds, because a client that disconnects first loses the answer. A paid call with neither header is answered 400 before any payment is taken. Some calls are paid before they run; a failed one can be retried free with the same payment, or is refunded.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
topic | string | yes | What the article is about (up to 600 chars). The research runs on this. Up to 600 characters. The example sends Why AI agents will pay for APIs with stablecoins. |
angle | string | no | Optional: the take or thesis to argue. Up to 400 characters. |
audience | string | no | Optional: who it is for, e.g. CFOs at mid-market SaaS. Up to 200 characters. The example sends fintech product leaders. |
tone | string | no | Optional voice, default: professional, first-person, direct. Up to 80 characters. |
author | object | no | Optional byline the article is written as. |
cta | string | no | Optional closing call to action. Up to 200 characters. |
length | string (one of: short, standard, long) | no | ~600 / ~1,000 / ~1,500 words (default standard). One of short, standard, long. |
images | object | no | |
hashtags | number | no | Hashtags on the companion post, 0-5 (default 4). |
Example request
curl -i -X POST https://agent402.tools/v1/linkedin-article \
-H "Content-Type: application/json" \
-d '{"topic":"Why AI agents will pay for APIs with stablecoins","audience":"fintech product leaders","length":"standard"}'Without payment this returns HTTP 402 Payment Required with the exact price for linkedin-article; any x402 v2 or MPP client pays it and retries.
Watch a call get paid
POST /v1/linkedin-article$1.10 USDCPAYMENT-SIGNATUREon 11 chains200 OKAgent402-ReceiptEd25519Example response
{
"report": "# Why agent payments settle on chain\n*One line of context*\n\n...\n\n## Sources\n1. [Example](https://example.com/...)\n\n---\n## Companion post (paste as a LinkedIn post, 1,120 of 3000 characters)\n...",
"title": "Why agent payments settle on chain",
"article": {
"headline": "Why agent payments settle on chain",
"headlines": [
"Why agent payments settle on chain",
"...",
"..."
],
"subtitle": "One line of context",
"body_markdown": "...",
"key_takeaways": [
"..."
],
"word_count": 980
},
"post": {
"caption": "...\n#AgenticFinance #Payments #AI #Stablecoins",
"hashtags": [
"#AgenticFinance",
"#Payments",
"#AI",
"#Stablecoins"
],
"chars": 1120
},
"images": [
{
"slot": "cover",
"alt": "An abstract network of nodes exchanging tokens",
"prompt": "...",
"source": {
"width": 1024,
"height": 1024,
"model": "black-forest-labs/flux.2-klein-4b"
},
"files": [
{
"name": "article-cover",
"use": "LinkedIn article cover image",
"width": 1920,
"height": 1080,
"format": "jpeg",
"media_type": "image/jpeg",
"bytes": 412000,
"b64": "/9j/4AAQ…"
},
{
"name": "post-link-share",
"use": "LinkedIn post / link-share image (1.91:1)",
"width": 1200,
"height": 627,
"format": "jpeg",
"media_type": "image/jpeg",
"bytes": 180000,
"b64": "/9j/4AAQ…"
}
]
}
],
"sources": [
{
"n": 1,
"title": "Example",
"url": "https://example.com/...",
"snippet": "...",
"fullText": true
}
],
"tables": [],
"meta": {
"tier": "linkedin-article",
"words": 980,
"images": 2,
"image_files": 5,
"post_chars": 1120,
"sources_listed": 12,
"sources_full_text": 4,
"synthesis_model": "anthropic/claude-opus-5"
}
}| Field | Type | Always present | In the example |
|---|---|---|---|
report | string | yes | # Why agent payments settle on chain *One line of context* ... ## Sources 1... |
title | string | yes | Why agent payments settle on chain |
article | object | yes | 6 fields: headline, headlines, subtitle, body_markdown, key_takeaways and 1 more |
post | object | yes | 3 fields: caption, hashtags, chars |
images | array of objects | yes | 1 item in the example |
sources | array of objects | yes | 1 item in the example |
tables | array | yes | 0 items in the example |
meta | object | yes | 8 fields: tier, words, images, image_files, post_chars and 3 more |
From an MCP client
catalog.call {
"slug": "linkedin-article",
"params": {
"topic": "Why AI agents will pay for APIs with stablecoins",
"audience": "fintech product leaders",
"length": "standard"
}
}The hosted connector at https://agent402.tools/mcp needs a payment for linkedin-article; the stdio package pays it from a wallet or from an AGENT402_CREDITS_KEY issued earlier. Local install: npx -y agent402-mcp@0.17.0.
Errors and behavior
topicis required. An input the tool rejects returns an HTTP 4xx whose body carrieserror,tool,expected,requiredandexample, so the caller can correct it.- A paid call that ends in any status of 400 or above is not charged over x402, MPP or a prepaid credits key: settlement runs after the tool and only on a successful response. Some calls are paid before they run; a failed one can be retried free with the same payment, or is refunded.
- Wallet-only: this tool runs a model, so it has no proof-of-work tier. A prepaid card-credits key issued earlier (
Authorization: Bearer a402_...) also pays it. - Model-backed: the answer is generated by a model, so the same input can produce a different result.
- Long-running: payment settles after the work finishes, so x402 is offered on EVM chains only and MPP on Base, Celo or card; Tempo is not offered.
- Usually answers in about 90 seconds and takes up to 180 seconds. Send the paid call with
Prefer: respond-asyncto get202and a job link at once, then pollGET /api/jobs/{id}for its stage, progress and ETA until it has the answer; payment still settles only when the answer is ready, except a Tempo transfer sent before the call, which is repaid after on-chain proof if the run fails. To wait on the connection instead, sendPrefer: wait=180and keep it open that long. A paid call with neither header is answered400before any payment is taken. - A
GETorHEADto /v1/linkedin-article returns the same 402 quote, so the price can be read without a body. - An
Idempotency-Keyheader makes a retried paid call replay the first 200 instead of charging again (an answer larger than 1 MB and a streamed response are not replayed).
Paid call (JavaScript agent)
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client();
client.setSpendControls?.({ maxAmountPerPayment: "$1.10" }); // refuse any quote above this tool's price
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.AGENT_KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);
const res = await payFetch("https://agent402.tools/v1/linkedin-article", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"topic": "Why AI agents will pay for APIs with stablecoins",
"audience": "fintech product leaders",
"length": "standard"
}),
});No wallet yet? Fund a first one with USDC on Base, no ETH needed, or run npx -y agent402-mcp@0.17.0 wallet new to make one on this computer: it stores the key and prints the address and the config, never the key.
The quote (Python)
Standard library only: the 402 and the price its PAYMENT-REQUIRED header quotes on each chain. To pay from Python, sign it with any x402 client.
import base64, json, urllib.error, urllib.request
req = urllib.request.Request("https://agent402.tools/v1/linkedin-article", method="POST", data="{\"topic\":\"Why AI agents will pay for APIs with stablecoins\",\"audience\":\"fintech product leaders\",\"length\":\"standard\"}".encode(), headers={"Content-Type": "application/json"})
try:
urllib.request.urlopen(req)
except urllib.error.HTTPError as e:
quote = json.loads(base64.b64decode(e.headers["PAYMENT-REQUIRED"]))
print(e.code, [(a["network"], a["amount"]) for a in quote["accepts"]]) # the price, per chain, in base unitsRelated tools
SEC filing report (what the company just filed)
Name a US ticker and get one cited, model-backed report on what the company just filed with the SEC: every filing.
Insider flow report (Form 4 transactions)
Name a US ticker and get one cited, model-backed insider-flow report: every Form 4 against the company in the window.
FDA recall report (drug, food, device)
Name a drug, food, ingredient, brand or medical device and get one cited, model-backed FDA recall report: every matching.
IPO pipeline digest (S-1 + 424B4)
A deterministic digest of the IPO pipeline for a window: every 424B4 final prospectus and every S-1/F-1 registration.
Ticker pack: dossier, insider flow and institutional holders
One ticker, one purchase, the full picture (model-backed).
Image gen (OpenAI-compatible)
OpenAI-compatible image generation over x402 - point any OpenAI SDK's images.generate() at base_url.