# Loyal Spark - Generate Program Defaults

> Loyal Spark - Generate Program Defaults is a paid API for AI agents from api.loyalspark.online, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Generates AI-suggested default configuration parameters for a new onchain loyalty rewards program on the Base Network.

## Facts

- Endpoint: POST https://api.loyalspark.online/x402-gateway/workflow/generate-program-defaults
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/loyal-spark-generate-program-defaults-edf4ac4c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Be3-PIqE3sG5FHJsN56K_

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 loyal-spark-generate-program-defaults-edf4ac4c -d '<json body>'
```

Example prompt: I want to launch an onchain loyalty program for my coffee shop 'Morning Bloom' on Base Network — can you generate smart default settings for the rewards program so I can get started quickly?

## When to prefer this

Use this endpoint when bootstrapping a new onchain loyalty program and you need AI-generated sensible defaults rather than manually specifying all configuration parameters. Ideal for businesses new to Web3 loyalty programs who want a starting point on Base Network without deep blockchain expertise.

## Known failure modes

- Missing or malformed required 'input' body field returns a validation error
- Unsupported bodyType value causes schema rejection
- Upstream Loyal Spark agent-api unavailable returns a 5xx error
- Insufficient USDC balance for x402 payment causes 402 Payment Required
- Empty or null body object may return incomplete or generic defaults

## How this service works

Onchain loyalty platform on Base Network. Businesses launch branded rewards in minutes, customers earn real value with every purchase, and AI agents automate the rest via REST and MCP. Free plan mints up to 1,000 tokens per month; every call is scoped by row-level security to the wallet behind the API key. 16 skill guides at loyalspark.online/.well-known/skills/index.md.

## Output

Returns a JSON object containing AI-generated default configuration values for a Loyal Spark loyalty rewards program, such as token name, reward rates, redemption rules, and other program parameters suitable for the business type provided.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object"
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {}
   }
  },
  "inputSchema": {
   "type": "object"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "schema": {
  "type": "object",
  "$schema": "https://json-schema.org/draft/2020-12/schema"
 },
 "description": "JSON from Loyal Spark agent-api or recipient-api. See OpenAPI for response shape."
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/loyal-spark-generate-program-defaults-edf4ac4c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.loyalspark.online](https://www.zero.xyz/host/api.loyalspark.online/llms.txt)
