# Strale JSDoc Generator

> Strale JSDoc Generator is a paid API for AI agents from api.strale.io, paid per call via x402, $0.054/call, status unknown (last checked 2026-11-17).

Generates JSDoc documentation comments from a provided JavaScript/TypeScript code snippet

## Facts

- Endpoint: GET https://api.strale.io/x402/v2/jsdoc-generate?utm_source=zero.xyz
- Price: $0.054/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/strale-jsdoc-generator-d888c8cd
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_QGca94ZDziRnnYXoCGsVn

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 strale-jsdoc-generator-d888c8cd
```

Example prompt: Can you generate proper JSDoc documentation for this JavaScript function: `function calculateTax(income, rate) { return income * rate; }`?

## When to prefer this

Choose this endpoint when you need automated, on-demand JSDoc generation for individual JavaScript or TypeScript functions or classes without setting up a local documentation toolchain. It is especially useful for agents assisting with code review, documentation generation pipelines, or developer productivity workflows where code snippets are processed one at a time.

## Known failure modes

- Missing 'code' query parameter returns a validation error
- Invalid or unparseable code snippet may produce incomplete or generic JSDoc
- Non-JavaScript/TypeScript code may result in incorrect type annotations
- Very long or complex code snippets may produce truncated output
- Network or service errors return standard HTTP error codes

## How this service works

The trust layer for AI agents — 250+ independently tested data capabilities across 27 countries. Execute capabilities via REST, MCP, A2A, or x402 micropayments. Every call returns an audit record with cryptographic chain hashing.

## Output

Returns generated JSDoc comment blocks with @param, @returns, @description, and other relevant JSDoc tags inferred from the provided code snippet, ready to be inserted above the function or class definition.

## 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": [
      "code"
     ],
     "properties": {
      "code": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "const": "json"
    },
    "example": {
     "type": "object",
     "properties": {
      "tags_used": {
       "type": "array"
      },
      "documented_code": {
       "type": "string"
      },
      "functions_documented": {
       "type": "integer"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/strale-jsdoc-generator-d888c8cd/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)
