OpenAPI Generator
Write a complete OpenAPI 3.1 specification from a plain-language description of an API.
openapi-generate Example
{
"description": "This is a test input for automated capability testing."
} {
"spec": "openapi: 3.1.0\ninfo:\n title: Test API\n description: This is a test input for automated capability testing.\n version: 1.0.0\nservers:\n - url: https://api.example.com\n description: Production server\npaths:\n /test:\n get:\n summary: Test endpoint\n description: A simple test endpoint for automated capability testing\n operationId: getTest\n responses:\n '200':\n description: Successful response\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/TestResponse'\n post:\n summary: Create test resource\n description: Create a new test resource\n operationId: postTest\n requestBody:\n required: true\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/TestRequest'\n responses:\n '201':\n description: Resource created\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/TestResponse'\ncomponents:\n schemas:\n TestRequest:\n type: object\n properties:\n name:\n type: string\n description: Test resource name\n value:\n type: integer\n description: Test resource value\n required:\n - name\n TestResponse:\n type: object\n properties:\n id:\n type: string\n description: Unique identifier\n name:\n type: string\n description: Test resource name\n value:\n type: integer\n description: Test resource value\n timestamp:\n type: string\n format: date-time\n description: Creation timestamp\n required:\n - id\n - name",
"schemas": [
"TestRequest",
"TestResponse"
],
"endpoints": [
{
"path": "/test",
"method": "GET",
"summary": "Test endpoint"
},
{
"path": "/test",
"method": "POST",
"summary": "Create test resource"
}
],
"total_paths": 1
} Inputs
| Field | Type | Required | What it is |
|---|---|---|---|
description | string | Yes | — |
Output fields
How reliably each field appears in a successful answer.
| Field | Type | Appears |
|---|---|---|
spec | string | Always (present in every successful answer) |
schemas | array | Always (present in every successful answer) |
endpoints | array | Always (present in every successful answer) |
total_paths | integer | Always (present in every successful answer) |
How to call it
The same tool through each route. MCP clients reach it through Strale’s server at https://api.strale.io/mcp; the call below is what the agent sends.
# Needs an API key. max_price_cents caps what this call may cost.
curl -X POST https://api.strale.io/v1/do \
-H "Authorization: Bearer $STRALE_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"capability_slug": "openapi-generate",
"inputs": {
"description": "This is a test input for automated capability testing."
},
"max_price_cents": 15
}' {
"tool": "strale_execute",
"arguments": {
"slug": "openapi-generate",
"inputs": {
"description": "This is a test input for automated capability testing."
},
"max_price_cents": 15
}
} import { Strale } from "straleio";
const strale = new Strale({ apiKey: process.env.STRALE_API_KEY! });
const result = await strale.do({
capability_slug: "openapi-generate",
inputs: {
"description": "This is a test input for automated capability testing."
},
max_price_cents: 15,
}); import os
from straleio import Strale, DoRequest
strale = Strale(api_key=os.environ["STRALE_API_KEY"])
result = strale.do(DoRequest(
capability_slug="openapi-generate",
inputs={
"description": "This is a test input for automated capability testing.",
},
max_price_cents=15,
)) # No account. The first request answers 402 with the price in USDC;
# an x402 client pays it from your wallet and repeats the request.
curl -i 'https://api.strale.io/x402/v2/openapi-generate?description=This+is+a+test+input+for+automated+capability+testing.' Limitations
Complex schemas may need manual refinement
AI-generated OpenAPI spec from code or descriptions — complex request/response schemas may need manual refinement
What to do instead: Validate the generated spec with openapi-validate and test against actual API behaviour
Output size cap per call
Structured output is limited to about 4000 output tokens per call; requests exceeding this limit are refused rather than returned truncated. Requests with large results can exceed this limit, and repeating the same request does not help.
What to do instead: Describe fewer endpoints per call
Related tools
- Agent Trace Analysis €0.20
- API Docs Generator €0.20
- API Mock Responses €0.05
- Changelog Generator €0.03
- Code Converter €0.05
- Commit Message Generator €0.05