# Obol API Code Generation — Description to OpenAPI + Hono Server PR

> Obol API Code Generation — Description to OpenAPI + Hono Server PR is a paid API for AI agents from api.obol.sh, paid per call via x402, $5/call, status unknown (last checked 2026-10-13).

Generates an OpenAPI spec and Hono server implementation from a plain-English API description and opens a GitHub pull request with the result

## Facts

- Endpoint: POST https://api.obol.sh/api?utm_source=zero.xyz
- Price: $5/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/obol-api-code-generation-description-to-openapi-hono-server-pr-64a1939c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_uJzfCRgHiRv_1-yHW5d-o

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 obol-api-code-generation-description-to-openapi-hono-server-pr-64a1939c -d '<json body>'
```

Example prompt: Can you generate an OpenAPI spec and Hono server for a REST API for a todo app with auth and CRUD operations, then open a pull request on my GitHub repo acme-org/todo-api? Notify me at dev@acme.com when it's ready.

## When to prefer this

Choose this endpoint when you need to go from a plain-English API description to a working OpenAPI spec plus a Hono TypeScript server scaffold, delivered directly as a GitHub PR. Prefer this over generic code generation tools when you want the result committed to a specific repository automatically rather than returned as raw text.

## Known failure modes

- Invalid or inaccessible GitHub repo (owner/repo not found or no permissions) — PR creation fails
- Insufficient payment or payment not sent via x402 protocol — 402 response returned
- Malformed or too-vague description causing generation to fail — partial or empty file output
- Invalid email format causing notification delivery failure
- GitHub API rate limiting or downtime preventing fork or PR creation

## How this service works

Obol: Description → OpenAPI spec + Hono server → GitHub PR — $5 USDC

## Output

Returns the URL of the opened pull request on a fork of the target repo, the fork URL, the branch name, and a list of file paths written — including the generated OpenAPI spec and Hono server files.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "repo",
  "description"
 ],
 "properties": {
  "repo": {
   "type": "string",
   "description": "Target GitHub repo in owner/repo format"
  },
  "email": {
   "type": "string",
   "description": "Email address to notify when PR is ready"
  },
  "description": {
   "type": "string",
   "description": "Plain-English description of the API (e.g. \"REST API for a todo app with auth and CRUD\")"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "pr": {
  "type": "string",
  "description": "URL of the opened pull request"
 },
 "fork": {
  "type": "string",
  "description": "URL of the forked repository"
 },
 "files": {
  "type": "array",
  "description": "File paths written to the branch"
 },
 "branch": {
  "type": "string",
  "description": "Branch name on the fork"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/obol-api-code-generation-description-to-openapi-hono-server-pr-64a1939c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.obol.sh](https://www.zero.xyz/host/api.obol.sh/llms.txt)
