# LeoClaw Hair Formula API

> LeoClaw Hair Formula API is a paid API for AI agents from api.leoclaw.cc, paid per call via x402, $0.5/call, status unknown (last checked 2026-09-14).

Analyzes a face photo to determine face shape, then generates 3 personalized barber-ready haircut recommendations plus 3 styles to avoid, with shareable cards.

## Facts

- Endpoint: POST https://api.leoclaw.cc/hair-formula
- Price: $0.5/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/leoclaw-hair-formula-api-31cfa262
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_bF7Ymo-oJGvVYotOYy0dG

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 leoclaw-hair-formula-api-31cfa262 -d '<json body>'
```

Example prompt: Look at this photo of me and tell me what face shape I have, which three haircuts my barber should give me, and which styles I should stay away from — here's my image: [image_url].

## When to prefer this

Choose this endpoint when you need AI-driven, personalized hair recommendations derived directly from a face photo rather than manually selected face shapes or generic style guides. It is ideal for consumer apps, barber booking platforms, beauty assistants, or any agent workflow that needs to go from a selfie to actionable, barber-ready haircut instructions in a single call.

## Known failure modes

- No face detected in image — returns error if photo is unclear or not a face
- Image too small or low resolution — analysis may fail or return low-confidence results
- Invalid image URL or inaccessible image — returns URL fetch error
- Both image_b64 and image_url omitted — returns validation error
- Side profile URL inaccessible — falls back to front-only analysis or errors

## How this service works

Hair recommendations from a face photo: face-shape analysis + 3 barber-ready haircut recipes + 3 styles to avoid + share cards.

## Output

Returns a face shape classification (e.g. oval, round, square, heart), three barber-ready haircut recipes tailored to that shape, three hairstyles to avoid, and shareable card assets the user can save or send.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "image_b64": {
   "type": "string",
   "minLength": 1
  },
  "image_url": {
   "type": "string",
   "format": "uri"
  },
  "idempotency_key": {
   "type": "string"
  },
  "side_profile_url": {
   "type": "string",
   "format": "uri"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/leoclaw-hair-formula-api-31cfa262/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.leoclaw.cc](https://www.zero.xyz/host/api.leoclaw.cc/llms.txt)
