# Sly Random Classical Poem

> Sly Random Classical Poem is a paid API for AI agents from api.getsly.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Returns a random classical poem (title, author, lines, and line count) sourced from PoetryDB, served via the Sly x402 micropayment gateway.

## Facts

- Endpoint: GET https://api.getsly.ai/x402/demo/poem
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-getsly-ai-df890538
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_nhK-Bw1K3-2urghGyRnHe

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 api-getsly-ai-df890538
```

Example prompt: Can you grab me a random classical poem — something with the title, author, and full lines?

## When to prefer this

Use this endpoint when you need a quick, random classical poem with structured metadata (title, author, lines, line count) and are operating in an x402 micropayment context. Ideal for creative inspiration, literary apps, or testing x402 payment flows at very low cost ($0.001 USDC per call).

## Known failure modes

- Payment failure or insufficient USDC balance — x402 payment not accepted, returns 402 Payment Required
- Upstream PoetryDB unavailability — gateway may return 502 or 503
- Network timeout — no response from Sly gateway
- Malformed request — missing required HTTP method field returns 400

## How this service works

Get a random classical poem (title, author, lines, line count) wrapped from poetrydb.org. Powered by Sly (https://getsly.ai).

## Output

A JSON object containing the poem's title, author name, an array of lines, and a line count — sourced at random from the PoetryDB collection of classical poems.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET"
 }
}
```

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    }
   },
   "additionalProperties": true
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-getsly-ai-df890538/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.getsly.ai](https://www.zero.xyz/host/api.getsly.ai/llms.txt)
