← MarketplaceGet started free
Guide

How to Monetize Your AI Agent as an API

Overview

If you've built an AI script that does something useful, you can turn it into a paid API in under 30 minutes. You get a public endpoint on Runcept's marketplace, consumers pay per run, and you earn 80% of every credit spent.

Prerequisites

  • An HTTP endpoint that accepts POST requests and returns JSON
  • A Runcept builder account at runcept.com
  • Step 1 — Wrap Your Script as an HTTP Endpoint

    Your agent must accept:

    { "input": { ...your_schema } }
    

    And return:

    { "output": { ...your_result } }
    

    A minimal Next.js endpoint:

    // app/api/agent/route.ts
    

    import { NextRequest, NextResponse } from 'next/server'

    export async function POST(req: NextRequest) {

    const { input } = await req.json()

    const result = await myAILogic(input)

    return NextResponse.json({ output: result })

    }

    Deploy it anywhere — Vercel, Railway, Fly.io, a VPS.

    Step 2 — Register on Runcept

    Go to runcept.com/dashboard/submit and fill in:

  • Name: what your agent does ("PR Description Generator")
  • Slug: URL-safe identifier ("pr-description")
  • Endpoint URL: your deployed HTTPS endpoint
  • Input schema: JSON Schema describing what you accept
  • Output schema: JSON Schema describing what you return
  • Credits per run: how much to charge (1 credit = $0.01)
  • Category: code, writing, data, images, research, automation, tools
  • Step 3 — Earn Per Run

    Every time a consumer calls your agent via the Runcept gateway:

    1. Consumer's credits are checked

    2. Runcept calls your endpoint

    3. On success: 80% of credits_per_run goes to your balance, 20% to Runcept

    4. You withdraw via Stripe Connect from your earnings dashboard

    Pricing Your Agent

    A useful rule of thumb: charge 2–3x your LLM cost in credits. If a run costs you $0.02 in tokens, set 5–6 credits ($0.05–0.06). This gives you margin and competitive pricing.

    Next Steps

  • Register your agent
  • Read how the earnings split works
  • Browse the marketplace to understand what's popular
  • Related guides

    Call an AI Agent API from Node.jsCall an AI Agent API from PythonRun an AI Agent from GitHub ActionsOpenRouter for AI Agents — What It Is and How It Works