🚀 Getting Started

Welcome to Sonex! This guide will help you integrate AI-powered natural language processing into your application.

🤖 What is Sonex?

Sonex is an AI-powered, voice-enabled assistant that can be added to any existing web application to provide users an extra layer of convenience. If an application utilizes Sonex, its users can call functions through Sonex's chat widget, removing the need for complex user journeys where possible.

Key Features:

  • Voice & Text Input: Users can interact via voice or text
  • AI-Powered: Uses OpenAI's Whisper for transcription and Chat Completion APIs for intent mapping
  • Easy Integration: Simple npm package installation
  • Customizable: Extensive theming and configuration options
  • Function Calling: Execute app functions directly through conversation

📋 Prerequisites

OpenAI API license (required for Whisper and Chat Completion APIs)
Node.js 14+ and npm/yarn/pnpm installed
A React-based web application
Backend server for session management

Quick Start

1Create an Account

Sign up for a Sonex account to get started.

Sign up now →

2Generate API Key

Navigate to your dashboard and generate your API key with your OpenAI API key and application description.

Go to Dashboard →

3Upload Your Intents File

Create and upload a JSON file that describes your API capabilities. This enables Sonex to understand and execute your API endpoints through natural language.

📄What is an Intent File?

An intent file is a JSON document that lists all the actions ("intents") your application exposes. Each intent defines:

  • • What the API does (description)
  • • What parameters it requires (JSON Schema)
  • • How the system should call it (endpoint, method, authentication)

Intent Structure:


{
  "intent": [
              {
                "name": "view_profile",
                "description": "View the authenticated user's profile information",
                "endpoint": "/api/profile",
                "method": "GET",
                "tags": ["profile"],
                "authentication": {
                  "required": true,
                  "type": "Bearer",
                  "tokenSource": "login",
                  "headerName": "Authorization",
                  "format": "Bearer {jwt_token}"
                },
                "parameters": {
                  "type": "object",
                  "properties": {},
                  "required": []
                }
              }
        ]
}

⚙️Key Fields Explained:

name:Unique identifier for the action (e.g., "log_transaction", "create_user")
description:Human-readable explanation of what the action does
parameters:JSON Schema object describing input fields with types and descriptions
authentication:Defines how to authenticate requests (Bearer token, API key, etc.)

Example: Transaction API Intent

{
  "intent": [
    {
      "name": "log_transaction",
      "description": "Log an expense or earning with details",
      "endpoint": "/api/transaction",
      "method": "POST",
      "parameters": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number",
            "description": "Amount of the transaction"
          },
          "category": {
            "type": "string",
            "description": "Category (groceries, rent, salary, etc.)"
          },
          "currency": {
            "type": "string",
            "description": "Currency code (USD, EUR, JPY)"
          },
          "date": {
            "type": "string",
            "format": "date",
            "description": "Transaction date (ISO format)"
          }
        },
        "required": [
          "amount",
          "currency"
        ]
      }
    }
  ]
}

Once you've created your intents file, upload it in the dashboard to enable Sonex to understand your API capabilities.

Upload Intents File →