# fal.ai Generative AI via Locus x402

> fal.ai Generative AI via Locus x402 is a paid API for AI agents from fal.x402.paywithlocus.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-13).

Submits a generative AI job (image, video, or audio) to fal.ai models via a micropayment-gated x402 proxy, returning a request ID and status URL for async result polling.

## Facts

- Endpoint: POST https://fal.x402.paywithlocus.com/fal/generate?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fal-ai-generative-ai-via-locus-x402-b38fa2d9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_LbxmVZB4i8pdQPJqdGuLd

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability fal-ai-generative-ai-via-locus-x402-b38fa2d9 -d '<json body>'
```

Example prompt: Using fal.ai via FLUX Schnell, generate 4 images of a neon-lit cyberpunk cityscape at night with rain-soaked streets, and let me know when they're ready.

## When to prefer this

Choose this endpoint when you need to run fal.ai generative models (image, video, or audio) without managing fal.ai API keys directly, and when micropayment-per-call billing via x402/USDC is preferable to subscription-based access. Ideal for agent workflows that generate media on-demand and can handle async job completion via polling or webhook. Best suited for use cases involving the specific curated model set (FLUX Schnell, Qwen Image 2, Gemini image editing, Seedance, Veo, Grok Video, Happy Horse).

## Known failure modes

- Invalid or unsupported model ID returns an error — only curated LocusFounder fal model IDs are accepted
- Missing required 'prompt' field causes job rejection
- Video jobs without a 'duration' field may be rejected as it is required for public x402 video jobs
- Payment failure or insufficient USDC balance prevents job submission
- Webhook URL that is not HTTPS may be rejected or ignored
- Polling the statusUrl may show a pending or failed state if the underlying fal.ai job errors out

## How this service works

Locus public pay-per-use API

## Output

Returns a JSON object containing a 'success' flag, a 'request' object with a UUID job ID and a statusUrl path for polling the async result, and a 'payment' object confirming the settled USDC amount (0.001 USDC). The actual generated media is not returned inline but retrieved via the statusUrl once the job completes.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "model": {
   "type": "string"
  },
  "prompt": {
   "type": "string"
  },
  "duration": {
   "type": "number"
  },
  "image_url": {
   "type": "string"
  },
  "image_urls": {
   "type": "array",
   "items": {}
  },
  "num_images": {
   "type": "number"
  },
  "resolution": {
   "type": "string"
  },
  "webhook_url": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {},
  "payment": {
   "scheme": "exact",
   "settledUsdc": "0.001000",
   "authorizedMaxUsdc": "0.001000"
  },
  "request": {
   "id": "00000000-0000-4000-8000-000000000000",
   "statusUrl": "/requests/00000000-0000-4000-8000-000000000000"
  },
  "success": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/fal-ai-generative-ai-via-locus-x402-b38fa2d9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from fal.x402.paywithlocus.com](https://www.zero.xyz/host/fal.x402.paywithlocus.com/llms.txt)
