Convert External API into OpenAPI Specification using GenAI

Updated 

Sprinklr provides a capability to automatically convert API documentation into OpenAPI specifications using GenAI-powered interpretation. This feature eliminates the need for manual API configuration when working with  third-party platforms or proprietary in-house systems.

With this capability, you can upload API documentation in multiple formats or provide a public URL for API documentation. Sprinklr then extracts and interprets the details, generating a ready-to-use OpenAPI specification that can be configured as a custom extension.

This functionality ensures that API integration is quick, accurate, and future-proof, especially for customers managing multiple external or proprietary systems.

  • Faster onboarding: No need to manually define endpoints, headers, or response schemas.

  • Higher accuracy: GenAI automatically interprets parameters, authentication flows, and response formats.

  • Editable output: Generated OpenAPI specs can be reviewed and refined before use.

  • Flexibility: Works with PDFs, Postman Collections, documentation URLs, and text files.

Access the Generate OpenAPI Spec Option

You can generate an OpenAPI specification directly from the External API configuration flow.

  • Open an existing External API configuration or create a new one.

  • In the API Spec section, click the Generate OpenAPI Spec button.

This opens the Generate OpenAPI Spec window.

Input Options for API Documentation

The Generate OpenAPI Spec window provides three ways to input API documentation. Choose the option that best matches your source.

  • API Document URL

Paste the URL of publicly available API documentation (for example, Swagger UI URL, HTML-based docs, or hosted spec).

  • Import Collection

Provide the URL of a Postman Collection or paste the collection JSON directly.

  • Upload File

Upload a file that contains your API documentation.

Supported formats: PDF, DOC, DOCX, TXT.

Once you have provided the input through any of these methods, click Convert.

Processing and Output

Sprinklr uses GenAI to process the provided documentation. The system automatically:

  • Identifies available endpoints.

  • Maps HTTP methods (GET, POST, PUT, DELETE, etc.).

  • Extracts parameters (query, path, body).

  • Detects authentication flows (OAuth2, API key, Basic Auth).

  • Reads response structures and generates schema definitions.

The output is a valid OpenAPI Specification (YAML/JSON) file that Sprinklr stores as part of the custom extension.

Editing the Generated OpenAPI Spec

After generation, you can review and adjust the OpenAPI spec before finalizing it.

  • Edit endpoints: Modify endpoint paths or HTTP methods.

  • Update metadata: Add descriptions, version information, or tags.

  • Adjust parameters: Fine-tune query, path, or body parameters.

  • Refine response schema: Ensure response objects match your expected format.

All changes are saved within the Sprinklr extension, ensuring that the final spec matches your requirements.

The Generate OpenAPI Spec feature allows you to integrate proprietary systems into Sprinklr without manual effort. By converting human-readable or structured API documentation into an OpenAPI specification, Sprinklr enables faster, more accurate custom extensions that seamlessly integrate with the platform’s workflows, agents, and dashboards.