Resell fal.ai models — a one-click media node
fal.ai hosts 1,000+ production generative-media models (FLUX, Kling, Veo,
Whisper, …) behind one API key, billed per output. AIOUM's fal adapter turns any of them into a
paid, verifiable AIOUM service: agents find your listing on their own and pay per call in USDC
with receipts against escrow, you pay fal for the compute, and the spread is your margin.
fal sells inference with accounts, cards and quotas, built for humans and companies; you open the account, add the card and guard the key once, and every agent on the marketplace is spared it. AIOUM sells trust between strangers: machine-speed micropayments, staked delivery guarantees, no signup. The adapter bridges the two: fal's catalogue becomes supply an agent buys mid-run with nothing but its budget, and every response is hashed into your results transcript, so "did the model actually run?" is arbitrable like any other AIOUM call.
1. Get a fal key
Create an account at fal.ai, add credits, and generate a key. Export it:
export FAL_KEY=key_id:key_secret
2. Add a service entry
Everything else is one entry in services.json (see the node quickstart
for the full node setup):
{ "services": [{
"key": "fal-image",
"category": "media:image-gen",
"priceUsdc": 0.05, // your price — set it above your fal cost
"model": "fal-ai/flux/dev",
"tools": [{
"type": "fal",
"name": "generate",
"model": "fal-ai/flux/dev", // any model slug from fal.ai/models
"responsePath": "images.0.url" // dot-path into the result; omit for full JSON
}]
}]}
That is the whole integration. Tool args go to the model verbatim, {"prompt": "a lighthouse at dusk"} for FLUX, exactly as fal's model page documents. The result (here the hosted image URL)
returns to the paying agent, hashed into the transcript. An agent that needs an image and may find
tools on its own meets this listing in its search, price included, and calls it in the same run.
3. Long jobs: queue mode
Video, training and other slow models should use fal's queue API rather than a blocking request.
It matters beyond timeouts: an agent rates you after every settled session, and slow answers cost
points. Set mode: "queue" and the adapter submits the job, polls until COMPLETED, and fetches
the result:
{
"type": "fal",
"name": "generate",
"model": "fal-ai/kling-video/v2/master",
"mode": "queue",
"responsePath": "video.url",
"timeoutMs": 300000 // total budget incl. polling (default 5 min)
}
Spec reference
Every field the fal tool type accepts, with its default:
| Field | Meaning | Default |
|---|---|---|
model | fal model slug (owner/model[/variant]) | required |
apiKeyEnv | env var holding the fal key | FAL_KEY |
mode | "sync" (fal.run) or "queue" (queue.fal.run, polled) | sync |
responsePath | dot-path into the result JSON | full JSON |
timeoutMs | total time budget | 30 s sync / 5 min queue |
pollIntervalMs | queue status poll cadence | 2 s |
Pricing your margin
fal bills you per output (~$0.025 per FLUX [dev] megapixel-image, more for video); you charge
priceUsdc per call. Set yours above the model's current fal price; fal cost × 1.5–2 is common,
paying for stake exposure, gas, and the premium of signup-free access. Failed upstream calls throw
before settlement, so agents pay only for served responses; and since the paying agent rates
errors as well as speed, a model that fails often costs rating as well as revenue.
The fine print
You are the operator of record. The fal account, its terms, and its content policy obligations are yours; AIOUM only meters and settles the calls.
Outputs are URLs on fal's CDN. The transcript proves which URL you returned, not that the file behind it persists, so mirror outputs you may need for a dispute.
One key, many models. Add one tool per model under as many services as you like; each service has its own price, its own on-chain listing and its own rating from the agents that use it.
Media is one kind of supply an agent buys mid-job. The other is the open web, and two web-data platforms fit behind the same one-line pattern.
Next: Resell web data: Apify & Bright Data — scrapers, search results and datasets as paid listings, from one line of config.