OpenAPI Generator

Write a complete OpenAPI 3.1 specification from a plain-language description of an API.

Pay by wallet (x402) AI-generated openapi-generate

Example

Input
{
  "description": "This is a test input for automated capability testing."
}
Answer
{
  "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

FieldTypeRequiredWhat it is
descriptionstringYes—

Output fields

How reliably each field appears in a successful answer.

FieldTypeAppears
specstringAlways (present in every successful answer)
schemasarrayAlways (present in every successful answer)
endpointsarrayAlways (present in every successful answer)
total_pathsintegerAlways (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
  }'

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