Content Pipeline
A content pipeline (a podcast, a short video, a narrated explainer) is a chain of stages: research, script, voiceover, images, transcription, subtitles, dubbing and media checks. On Agent402.Tools each stage is one paid call, paid from one wallet over x402 or MPP, with no API key. The guide with a runnable example per stage, an end-to-end flow and live prices is at agent402.tools/guides/content-pipeline.
Stages
| Stage | Slugs | Model-backed | Source |
|---|---|---|---|
| Answer with citations | answer |
yes | src/tools/search.js |
| Research report | research (also research-pro, research-max) |
yes | src/tools/research-deep-kit.js |
| Script | v1-chat-metered (quoted per request), or a flat /v1 chat tier |
yes | src/tools/llm-gateway-kit.js |
| Voiceover | tts-lite, tts, tts-hd |
yes | src/tools/tts-kit.js |
| Images | v1-images-fast, v1-images-pro |
yes | src/tools/llm-images-fast-kit.js |
| Image edits | v1-images-edit |
yes | src/tools/llm-images-fast-kit.js |
| Transcription | transcribe, transcribe-pro (a URL); v1-audio-transcriptions (a multipart upload) |
yes | src/tools/stt-kit.js |
| Subtitles | srt-convert (also free with proof-of-work) |
no | src/tools/kit2.js |
| Subtitles in one call | skill-subtitle-pipeline |
yes | src/tools/skill-runner.js |
| Dubbing | dub |
yes | src/tools/dub-kit.js |
| Media checks | media-info |
no | src/tools/media-kit.js |
| Audio conversion | audio-convert, audio-normalize |
no | src/tools/media-kit.js |
Prices and each route's chains are on /api/pricing. Speech, dubbing and metered chat are quoted per request, so the 402 for that body is the price.
How the outputs chain
answerreturnsanswerandcitations; the citations become the show notes and the answer feeds the script prompt.- The metered chat answer's
choices[0].message.contentis the script.ttsreturns the audio as base64 inaudio; split a script longer than the tier's character cap at sentence ends. - Transcription and the media checks read a public URL, so the pipeline stores each audio file where it already keeps media and passes that URL on. Audio held as bytes goes to
POST /v1/audio/transcriptionsas a multipartfile. transcribewithdiarize: truereturnswordswithstartandendin seconds. Grouped into cues (start,endin milliseconds,text), they go tosrt-convertwithtoset tosrt,vtt,textorjson. The subtitle-pipeline skill pack returns the whole clip as one cue, for when per-line timing is not needed.dubwithjson: truereturnstranslationand the spokenaudio; without it the answer is the audio bytes with the translation inX-Dub-Translation.audio-normalizeandaudio-convertreturn MP3 asmp3Base64;media-inforeturnsdurationSecand per-stream codecs.
Slow stages
A route runs as a job when its /api/pricing row has an async block (src/slow-routes.js, src/async-jobs.js). research requires Prefer: respond-async or Prefer: wait=<maxSeconds> and answers a paid call with neither 400 before payment. v1-images-fast and v1-images-pro take Prefer: respond-async on request. The other stages answer on the connection. agent402-client sends the header where the row recommends it and collects the job.
Paying for a pipeline
- Spend caps. agent402-client's
maxPerCallUsd,dailyLimitUsdandmaxPerHostUsdare checked before a payment is signed, against the quote for that request. agent402-mcp usesAGENT402_MAX_PER_CALLandAGENT402_BUDGET. Limits, retries and replays for long runs: Buying at Volume. - Chains.
research,v1-images-fast,v1-images-proandv1-images-editare long-running, so they take x402 exact on EVM chains only (isLongRunningSluginsrc/composite-spend-guard.js). Every other stage takes every offered chain, over x402 or MPP. - Tempo. Offered on every stage except
research,v1-images-fast,v1-images-proandv1-images-edit(tempoOfferedForinsrc/mpp-tempo.js). A pull credential (payloadtypetransaction) is broadcast only after the stage answers under 400, so for a stage that fails a Tempo pull transaction is never broadcast and nothing is charged. A push credential (payloadtypehash) is a transfer already sent and final before the stage runs; if the stage then fails, the transfer is booked as a refund owed to the paying wallet and repaid after on-chain proof. Pipelines pay with pull: pinmode: "pull"on the Tempo charge method. A pull payment whose connection closed before the answer can still be broadcast, and is then booked as owed. See Paying with MPP. - x402. A response of 400 or above is not settled, so a failed x402 stage is not charged.