# fastapi.online — OpenAPI Spec Generator

> fastapi.online — OpenAPI Spec Generator is a paid API for AI agents from api.fastapi.online, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-15).

Generates an OpenAPI specification document from a plain-text description of an API

## Facts

- Endpoint: POST https://api.fastapi.online/generate-openapi
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fastapi-online-openapi-spec-generator-704a7e12
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_rHkU9MulIr0T3QroXiQQi

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 fastapi-online-openapi-spec-generator-704a7e12 -d '<json body>'
```

Example prompt: Generate an OpenAPI spec for a REST API that lets users create, read, update, and delete todo items, with endpoints for listing all todos, fetching a single todo by ID, and marking a todo as complete.

## When to prefer this

Choose this endpoint when you need a quick, pay-per-call OpenAPI spec generation without signing up for a full documentation platform. Ideal for prototyping, hackathons, or automating API documentation workflows where you have a natural language description of an API and need a structured spec output at low cost.

## Known failure modes

- Description too short (below 2 character minimum) returns a validation error
- Description exceeds 2000 character maximum and is rejected
- Vague or ambiguous descriptions may produce incomplete or generic specs
- Payment failure (insufficient USDC) results in 402 response
- Server unavailability results in timeout or 5xx error

## How this service works

Chat, embeddings, OCR, speech-to-text, image editing, image understanding (captioning/Q&amp;A), text-to-speech, translation, writing tools, classification tools, developer tools, local utilities, format/checksum validators, encoding &amp; crypto utilities, date/time calculators, geo/coordinate math, math &amp; finance calculators, novelty tools, and business/social writing generators — 179 endpoints in all, across multiple specialized self-hosted models. Pay per call with crypto — no signup — or get an API key.

## Output

An OpenAPI specification document (likely JSON or YAML) describing the endpoints, request/response schemas, parameters, and structure of the API based on the plain-text description provided.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "description": {
   "type": "string",
   "maxLength": 2000,
   "minLength": 2,
   "description": "the API to document"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/fastapi-online-openapi-spec-generator-704a7e12/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.fastapi.online](https://www.zero.xyz/host/api.fastapi.online/llms.txt)
