How to Earn Passive Income by Publishing an AI Agent
A practical guide for developers who want to monetise AI scripts. How to wrap, publish, price, and promote an AI agent API.
If you've built an AI script that does something useful, you can turn it into a passive income stream. Here's the realistic picture: what works, what doesn't, and how to get there.
The Model
You publish an agent on Runcept. Other developers discover it via the marketplace and call it via API. Every time someone runs it successfully, you earn 80% of the credits charged.
You build it once. You maintain it occasionally. Credits accumulate in your balance. You withdraw monthly.
Realistic Numbers
| Runs/month | Credits/run | Monthly gross | Your cut |
|---|---|---|---|
| 500 | 5 | $25 | $17.50 |
| 2,000 | 5 | $100 | $70 |
| 10,000 | 10 | $1,000 | $700 |
| 50,000 | 10 | $5,000 | $3,500 |
Most new agents get 50-500 runs/month in the first few months. Established agents in popular categories (code, writing) can reach thousands.
What Agents Succeed
From what's worked in the marketplace, winning agents share these traits:
Very specific: "Extract invoice line items from PDF text" beats "AI data processor". Specificity signals reliability.
Fast: Under 10 seconds. Developers integrating into CI don't want to wait.
Cheap internally: Use Claude Haiku or similar cheap models. Your margin = your price - your LLM cost. Haiku costs ~$0.001/call, giving you room to charge 10 credits and still profit.
Reliable output schema: The same JSON shape every time. Developers depend on this contract.
Finding Your Agent Idea
Look for AI tasks you've done manually that took you 5-15 minutes:
- Generating a PR description from a diff
- Reviewing a code snippet for issues
- Extracting structured data from unstructured text
- Converting one format to another
If you've reached for Claude or ChatGPT for the same task 10+ times, others have too.
The Build
Minimal viable agent in TypeScript:
// Next.js app/api/agent/route.ts
import Anthropic from '@anthropic-ai/sdk'
import { NextRequest, NextResponse } from 'next/server'
export const maxDuration = 60
const client = new Anthropic()
export async function POST(req: NextRequest) {
const { input } = await req.json()
// Validate
if (!input?.text || typeof input.text !== 'string') {
return NextResponse.json({ error: 'input.text required' }, { status: 400 })
}
const msg = await client.messages.create({
model: 'claude-haiku-4-5-20251001',
max_tokens: 512,
messages: [{ role: 'user', content: buildPrompt(input) }],
})
return NextResponse.json({
output: parseOutput(msg.content[0]),
})
}
Promotion
After publishing, the marketplace handles discovery. To accelerate:
- Write a blog post about the problem your agent solves (link to the marketplace page)
- Mention it in relevant GitHub issues or discussions
- Post in communities where developers discuss the problem
Maintenance
Budget 30-60 minutes/month for:
- Monitoring for failed runs (if any pattern suggests a bug)
- Updating the prompt if LLM behaviour changes
- Responding to issues from consumers
This is the "passive" cost. It's genuinely low for well-scoped agents.
Getting Started
- Register your agent
- Wait for approval (1-2 business days)
- Check earnings — your balance updates per run