# OpenAPI Spec Generator from Natural Language

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

Generates a complete OpenAPI 3.1 specification from a natural language description of an API

## Facts

- Endpoint: GET https://api.strale.io/x402/openapi-generate
- Price: $0.162/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 4
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-strale-io-4d56155f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_vVgdy0PDdsNFKwPltbhbs

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-4d56155f
```

Example prompt: Generate a complete OpenAPI 3.1 spec for a REST API that manages a to-do list with endpoints to create, read, update, and delete tasks, where each task has a title, description, due date, and status.

## When to prefer this

Use this endpoint when you need to rapidly scaffold an OpenAPI 3.1 specification from a plain-English API description, saving time over manually writing specs. Ideal for prototyping, documentation bootstrapping, or when a developer describes their API in natural language and needs a machine-readable contract.

## Known failure modes

- Missing required 'description' query parameter returns a 400 error
- Ambiguous or too-vague description may produce an incomplete or generic spec
- Very complex multi-service descriptions may result in truncated or simplified output
- Rate limiting or payment failure may return 402 or 429 errors

## How this service works

Generate a complete OpenAPI 3.1 specification from a natural language API description.

## Output

A complete, production-ready OpenAPI 3.1 specification in JSON or YAML format, including endpoint definitions, request/response schemas, parameter descriptions, and HTTP method mappings derived from the natural language input.

## Example request

```json
{
 "description": "A REST API for managing a library catalog with endpoints to search books by title or author, retrieve book details including ISBN and publication date, add new books to the catalog, update book information, and remove books. Each book resource contains title, author, ISBN, publication date, and availability status."
}
```

## 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",
     "required": [
      "description"
     ],
     "properties": {
      "description": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-strale-io-4d56155f/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)
