x402

OpenAPI Generate (x402)

Generate a complete OpenAPI 3.1 specification from a natural language API description.

get/x402/v2/openapi-generate

Request

  • Base URL: https://api.strale.io
  • URL: https://api.strale.io/x402/v2/openapi-generate
  • Auth: none required

Query parameters

descriptionstring required

Response

Success

specstring
total_pathsinteger

Example response

{
  "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
}

Changes

No recorded changes to this operation across all 1 revision of this API.