# Slugify Text API (x402 Micro-Pay)

> Slugify Text API (x402 Micro-Pay) is a paid API for AI agents from x402-micro-pay.com, paid per call via x402, $0.003/call, status unknown (last checked 2026-11-20).

Converts arbitrary text into a URL-safe, hyphenated slug string with optional maximum length constraint.

## Facts

- Endpoint: POST https://x402-micro-pay.com/api/skills/slugify?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/slugify-text-api-x402-micro-pay-cad20a22
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_rlbMDucgpYnf88OzK02Hb

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 slugify-text-api-x402-micro-pay-cad20a22 -d '<json body>'
```

Example prompt: Turn the text 'Hello, Grokzilla Shop!' into a URL slug, keeping it under 40 characters.

## When to prefer this

Choose this endpoint when you need a reliable, pay-per-call slugification service with no API key or account setup, especially in agentic workflows on Base/x402 infrastructure. Ideal for one-off or low-volume slug generation tasks where spinning up a local library is impractical, or when operating in a fully autonomous agent pipeline that handles x402 micropayments natively.

## Known failure modes

- Text input exceeds 4000 character limit — request rejected
- max_len below 1 or above 200 — validation error
- Unpaid request returns HTTP 402 requiring USDC payment on Base via x402 before retrying
- Empty or whitespace-only input produces a slug where empty=true
- Network timeout or service unavailability returns a non-200 error

## How this service works

41 pay-per-call JSON APIs for AI agents. No account or API key: an unpaid POST returns HTTP 402, pay in USDC on Base with x402 v2, retry. Prices from $0.001 per call.

## Output

Returns a JSON object with: ok (boolean success flag), slug (the URL-safe hyphenated string), chars (character count of the resulting slug), empty (boolean indicating if the result is an empty string), and skill (always 'slugify').

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "maxLength": 4000
  },
  "max_len": {
   "type": "integer",
   "default": 80,
   "maximum": 200,
   "minimum": 1
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "slug": "hello-grokzilla-shop",
  "chars": 20,
  "empty": false,
  "skill": "slugify"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/slugify-text-api-x402-micro-pay-cad20a22/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-micro-pay.com](https://www.zero.xyz/host/x402-micro-pay.com/llms.txt)
