{"uid":"cap_vVgdy0PDdsNFKwPltbhbs","slug":"api-strale-io-4d56155f","name":"OpenAPI Spec Generator from Natural Language","description":"Generate a complete OpenAPI 3.1 specification from a natural language API description.","url":"https://api.strale.io/x402/openapi-generate","method":"GET","headers":{},"bodySchema":{"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":["description"],"properties":{"description":{"type":"string"}}}},"additionalProperties":false}}},"responseSchema":null,"example":{"request":{"description":"A REST API for managing a library catalog with endpoints to search books by title or author, retrieve book details including ISBN and publication date, add new books to the catalog, update book information, and remove books. Each book resource contains title, author, ISBN, publication date, and availability status."},"response":{"spec":"openapi: 3.1.0\ninfo:\n  title: Library Catalog API\n  description: A REST API for managing a library catalog with endpoints to search books by title or author, retrieve book details including ISBN and publication date, add new books to the catalog, update book information, and remove books.\n  version: 1.0.0\nservers:\n  - url: https://api.library.example.com/v1\n    description: Production server\n  - url: http://localhost:8000/v1\n    description: Development server\npaths:\n  /books:\n    get:\n      summary: Search books by title or author\n      operationId: searchBooks\n      parameters:\n        - name: title\n          in: query\n          description: Search by book title\n          schema:\n            type: string\n        - name: author\n          in: query\n          description: Search by author name\n          schema:\n            type: string\n        - name: limit\n          in: query\n          description: Maximum number of results to return\n          schema:\n            type: integer\n            default: 10\n        - name: offset\n          in: query\n          description: Number of results to skip\n          schema:\n            type: integer\n            default: 0\n      responses:\n        '200':\n          description: Successful search results\n          content:\n            application/json:\n              schema:\n                type: object\n                properties:\n                  items:\n                    type: array\n                    items:\n                      $ref: '#/components/schemas/Book'\n                  total:\n                    type: integer\n        '400':\n          description: Invalid search parameters\n    post:\n      summary: Add a new book to the catalog\n      operationId: addBook\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/BookInput'\n      responses:\n        '201':\n          description: Book successfully created\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Book'\n        '400':\n          description: Invalid input data\n        '409':\n          description: Book with this ISBN already exists\n  /books/{bookId}:\n    get:\n      summary: Retrieve book details by ID\n      operationId: getBook\n      parameters:\n        - name: bookId\n          in: path\n          required: true\n          description: The unique identifier of the book\n          schema:\n            type: string\n      responses:\n        '200':\n          description: Book details retrieved successfully\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Book'\n        '404':\n          description: Book not found\n    put:\n      summary: Update book information\n      operationId: updateBook\n      parameters:\n        - name: bookId\n          in: path\n          required: true\n          description: The unique identifier of the book\n          schema:\n            type: string\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/BookInput'\n      responses:\n        '200':\n          description: Book successfully updated\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Book'\n        '400':\n          description: Invalid input data\n        '404':\n          description: Book not found\n        '409':\n          description: ISBN already exists for another book\n    delete:\n      summary: Remove a book from the catalog\n      operationId: deleteBook\n      parameters:\n        - name: bookId\n          in: path\n          required: true\n          description: The unique identifier of the book\n          schema:\n            type: string\n      responses:\n        '204':\n          description: Book successfully deleted\n        '404':\n          description: Book not found\ncomponents:\n  schemas:\n    Book:\n      type: object\n      properties:\n        id:\n          type: string\n          description: Unique identifier for the book\n        title:\n          type: string\n          description: Title of the book\n        author:\n          type: string\n          description: Author name\n        isbn:\n          type: string\n          description: International Standard Book Number\n          pattern: '^[0-9-]{10,17}$'\n        publicationDate:\n          type: string\n          format: date\n          description: Publication date in YYYY-MM-DD format\n        available:\n          type: boolean\n          description: Availability status of the book\n        createdAt:\n          type: string\n          format: date-time\n          description: Timestamp when the book was added to the catalog\n        updatedAt:\n          type: string\n          format: date-time\n          description: Timestamp when the book was last updated\n      required:\n        - id\n        - title\n        - author\n        - isbn\n        - publicationDate\n        - available\n    BookInput:\n      type: object\n      properties:\n        title:\n          type: string\n          description: Title of the book\n          minLength: 1\n        author:\n          type: string\n          description: Author name\n          minLength: 1\n        isbn:\n          type: string\n          description: International Standard Book Number\n          pattern: '^[0-9-]{10,17}$'\n        publicationDate:\n          type: string\n          format: date\n          description: Publication date in YYYY-MM-DD format\n        available:\n          type: boolean\n          description: Availability status of the book\n          default: true\n      required:\n        - title\n        - author\n        - isbn\n        - publicationDate\n","_meta":{"payment":{"method":"x402","price_usd":0.162,"settlement_id":"0xbb024882d92291e7728a9d1f99bbb128f21d5f365051e73e9906315b3e174321"},"capability":"openapi-generate","latency_ms":7370,"provenance":{"source":"claude-haiku","fetched_at":"2026-06-13T04:25:15.479Z"}},"schemas":["Book","BookInput"],"endpoints":[{"path":"/books","method":"GET","summary":"Search books by title or author"},{"path":"/books","method":"POST","summary":"Add a new book to the catalog"},{"path":"/books/{bookId}","method":"GET","summary":"Retrieve book details by ID"},{"path":"/books/{bookId}","method":"PUT","summary":"Update book information"},{"path":"/books/{bookId}","method":"DELETE","summary":"Remove a book from the catalog"}],"total_paths":5}},"exampleRequest":{"description":"A REST API for managing a library catalog with endpoints to search books by title or author, retrieve book details including ISBN and publication date, add new books to the catalog, update book information, and remove books. Each book resource contains title, author, ISBN, publication date, and availability status."},"tags":["x402"],"displayCostAmount":"0.162","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.162/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.162","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.162","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_a3-tasR0ALeIwcNqJe4yt","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.162","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates a complete OpenAPI 3.1 specification from a natural language description of an API","exampleAgentPrompt":"Generate a complete OpenAPI 3.1 spec for a REST API that manages a to-do list with endpoints to create, read, update, and delete tasks, where each task has a title, description, due date, and status.","exampleUseCases":[{"title":"Rapid API documentation for legacy systems","prompt":"I have an older payment processing API that was never properly documented. Can you generate a complete OpenAPI 3.1 spec from this description: it has endpoints to submit payments, check transaction status, refund charges, and retrieve payment history, with fields for amount, currency, transaction ID, and timestamp?"},{"title":"Spec generation from stakeholder requirements","prompt":"Our finance team just described a new expense management API they need. Turn this into a production-ready OpenAPI spec: it should let users submit expense reports, attach receipts, get approval status, and retrieve reimbursement records with details like amount, category, department, and date submitted."},{"title":"Quick API contract for third-party integration","prompt":"We're integrating with a partner's inventory system and they gave us a plain English rundown of their API capabilities. Generate an OpenAPI 3.1 specification from this: endpoints to list products, check stock levels, place orders, track shipments, plus fields for product ID, quantity, warehouse location, and delivery date."}],"resultDescription":"A complete, production-ready OpenAPI 3.1 specification in JSON or YAML format, including endpoint definitions, request/response schemas, parameter descriptions, and HTTP method mappings derived from the natural language input.","failureModes":["Missing required 'description' query parameter returns a 400 error","Ambiguous or too-vague description may produce an incomplete or generic spec","Very complex multi-service descriptions may result in truncated or simplified output","Rate limiting or payment failure may return 402 or 429 errors"],"whenToPreferThis":"Use this endpoint when you need to rapidly scaffold an OpenAPI 3.1 specification from a plain-English API description, saving time over manually writing specs. Ideal for prototyping, documentation bootstrapping, or when a developer describes their API in natural language and needs a machine-readable contract.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":4,"lastUsedAt":"2026-05-13T00:49:35.261Z","lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:44:15.584Z","isFirstParty":false}