# API Documentation Generator from OpenAPI Spec or Natural Language

> API Documentation Generator from OpenAPI Spec or Natural Language is a paid API for AI agents from api.strale.io, paid per call via x402, $0.216001/call, status unknown (last checked 2026-09-14).

Generates markdown API documentation from an OpenAPI spec or natural language description, including parameters, examples, and error codes

## Facts

- Endpoint: GET https://api.strale.io/x402/api-docs-generate
- Price: $0.216001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-strale-io-7b339d95
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_hm-E14xutL242w1EwN8NJ

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-strale-io-7b339d95
```

Example prompt: Generate markdown API documentation for my endpoint — here's the OpenAPI spec: {paste spec here}. I need it to include parameters, usage examples, and error codes.

## When to prefer this

Use this endpoint when you need to rapidly generate structured, readable markdown API documentation from either a machine-readable OpenAPI/Swagger spec or a plain English description of an endpoint. Ideal for teams that want to automate their doc pipeline, bootstrap documentation for new APIs, or produce consistent reference material without manual writing.

## Known failure modes

- Missing both openapi_spec and endpoint_description parameters — returns error requiring at least one input
- Invalid or malformed OpenAPI spec — may return partial documentation or parsing error
- Natural language description too vague — may produce incomplete or inaccurate documentation
- Payment failure via x402 protocol — returns 402 with payment details
- Rate limit or server error — returns 5xx response

## How this service works

Generate markdown API documentation from an OpenAPI spec or natural language description. Returns documentation with parameters, examples, error codes.

## Output

Returns formatted markdown API documentation including parameter descriptions, request/response examples, and error code explanations, ready to publish or embed in a developer portal.

## Example request

```json
{
 "endpoint_description": "A REST API endpoint that retrieves user profile information. Accepts a user ID as a path parameter and returns JSON containing name, email, created_date, and account_status fields. Returns 404 if user not found, 401 if unauthorized."
}
```

## 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"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "openapi_spec": {
       "type": "string"
      },
      "endpoint_description": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

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