Skip to content

Alfred - AI Assistant

What is Alfred?

Alfred is Treblle’s AI assistant that helps improve your API workflows. It uses your API documentation to provide real-time answers.

You can use Alfred in several ways:

Integrate with Treblle SDK

Integrating the Treblle SDK will automatically generate API docs and a developer portal with Alfred.

You can find integration guides for various languages and platforms here.

Step 1: Access Alfred

  • Go to the API Docs section of your Treblle workspace.

  • Look for Alfred in the bottom right corner of the screen.

Step 2: Interact with Alfred

  • Click on Alfred to open an interface with predefined prompts.

  • Ask questions or request assistance with your API documentation, such as identifying issues, generating code examples, or improving endpoint documentation.

Example:

Upload your OpenAPI Specification

If you are not integrating the Treblle SDK, you can upload your OpenAPI Specification (version 3 or above) directly to the Treblle platform.

Step 1: Access OpenAPI Specification

  • Go to the API Setting section of your Treblle workspace.

Step 2: Upload OpenAPI Specification

  • Click on upload to add your OpenAPI Specification.

Embed Alfred in your Developer Portal

To embed Alfred into your developer portal, follow these steps:

  1. Add a one line script to your HTML:
<script src="https://assets.treblle.com/alfred-embed-v5.min.js"></script>

Place the script before your portal’s </body> tag to ensure smooth page rendering.

  1. Replace _YOUR_TREBLLE_PROJECT_ID_ with your API ID and _YOUR_CUSTOMER_API_KEY_ with your SDK TOKEN. This enables Alfred to append your customer’s details into the integration process.
<div
class="getalfred-io"
data-api="_YOUR_TREBLLE_PROJECT_ID_"
data-auth="_YOUR_CUSTOMER_API_KEY_"
></div>