AI-Powered API Analytics: Grow API Products with Moesif AI Explain

Your API (application programming interface) analytics contain crucial signals about customer adoption and potential growth opportunities. However, translating complex charts and metrics into clear actions can pose challenges. Not all teams have the same level of API product analytics expertise or familiarity with its nuances to interpret them effectively for actionable insights. Having dedicated analysts may not be something you want to invest in as well. Moreover, for a lot of large companies, product teams need to submit tickets to get a report from a data team which may take days or weeks which slows decision making. 

Moesif’s AI Explain feature directly addresses this by letting you ask questions about your data in plain natural language, helping you quickly understand why trends are happening and help plan out what to do next. Product managers can analyze data and make decisions in real-time instead of waiting.

This tutorial demonstrates how to leverage AI Explain to make analytics and insights faster and more accessible.

Understanding Growth of AI Consumption

For this tutorial, we’ll leverage AI Explain to uncover insights around customer growth rate of an example embeddings API. The analysis will use a lag plot to visualize and highlight the day-by-day growths of customers. By identifying top customers with accelerating growth, you can drive a more efficient sales process. Similarly, identifying customers with declining growth can indicate churn risk. AI Explain can help you uncover these insights without requiring a data scientist.

Prerequisites

To use AI Explain and follow this tutorial, make sure you have an active Moesif account with any paid subscription. 

Objectives

  • Configure a time series analysis in Moesif to track daily API product usage changes for specific customer segments—using company domains.
  • Interpret a lag plot to quickly visualize which customers are increasing or decreasing their API consumption compared to the previous day.
  • Utilize the AI Explain feature to ask plain-language questions in a conversation session about your API usage data and charts.
  • Leverage AI Explain’s answers to extract specific, actionable insights regarding customer growth patterns and potential risks.
  • Identify key questions to ask AI Explain for understanding API product adoption and informing growth strategies.

Set up the Analysis

In this tutorial, you will analyze an embeddings API /v1/embeddings/generate that allows users to generate vector representations of inputs. To analyze its growth, you will instruct Moesif to perform comparative analysis:

  • Count the number of events for the current day and the preceding day.
  • Define a custom formula to calculate the change ratio to quantify the percentage growth or decline.
  • Use a lag plot to visualize the change.

Follow these steps to set up the analysis:

Step 1: Create a New Time Series Analysis

Create a time series chart by selecting + Create New in the navigation menu and then selecting Time Series.

Createing a new time series in Moesif.

Step 2: Define the Filter

In the Filters pane, set the event filter Request.URI Route to /v1/embeddings/generate. This tells Moesif to only consider events for that endpoint in the analysis.

Filters in Moesif analytics.

Step 3: Define the Group-By

Use the Group By pane to break down the analysis by various companies:

  1. Select + Group By.
  2. Select Company.Company Domain from the fields list.

Step 4: Define the Metrics

In the following steps, we define the API metrics, specify the analysis function for the plot, and define a custom formula for the growth analysis:

Create the Event Count Metric for the Current Day

By default, the plot has an Event Count metric with the label a. This denotes the event count for each day. Let’s give it a custom name:

  1. Select ⋯ Configuration and shortcuts.
  2. Select the Custom Name checkbox.
  3. Enter the name Current.

    Creating and configuring the first event count metric in a Moesif Time Series.

Create the Event Count Metric for the Preceding Day

Let’s create another event count metric to get the event count for the preceding day. 

  1. Select + Add Metric and then select Event Count from the Volume type metrics list. Moesif assigns this metric the label b. Creating and configuring the second event count metric in a Moesif Time Series.
  2. Give the metric a custom name Yesterday.
  3. Select the greek letter sigma icon Σ for the metric and choose Lag Plot.

    Selecting the Lag Plot function for the metric.

Create the Growth Computation Metric

Create the third metric to compute the change ratio that illustrates the percentage growth of the embeddings API:

  1. Select + Add Metric and then select Enter Formula.
  2. Enter the formula (a-b)/b.
  3. Give the metric a custom name Change ratio.
  4. In the configuration and shortcuts menu, select Y-Axis B (Ratio as %) from the chart display settings. This plots the decimal metric values of the Change ratio metric as whole number percentages.

    Defining the growth computation metric.

Optionally, select the a and b metrics to hide them from the plot. This only leaves the Change ratio metric in the plot for a clean visualization of the growth analysis.

After following these steps, the time series analysis is complete:

Completed Time Series analysis after following the preceding steps.

Understand the Lag Plot for Growth

Using a lag plot, the analysis directly compares each day’s usage against the preceding day’s usage for each company. This plot type allows you to highlight changes in behavior rather than just absolute volume. You can easily interpret the results and evaluate growth: 

  • Companies that have seen increased API usage compared to the previous day have higher bar heights. They always have a positive growth percentage value and bars above the 0% baseline for the Change ratio metric.
  • Companies that have undergone decreased API usage consequently have lower bar heights compared to the preceding day. They may have negative growth percentage values and bars below the 0% baseline for the  Change ratio metric.

Analyzing and plotting this way allows you to prioritize follow-up actions based on momentum.

Now that you have the context from the basic visual interpretation, let’s explore how to leverage AI Explain for deeper insights.

Extract Insights with AI Explain

Select Ask AI to start using AI Explain.

Ask AI dialog.

You can select one of the three example queries to get started, or enter your own query and press Enter.

For example, here’s the response after selecting the builtin query Summarize the data from this time series.

Asking Ask AI to summarize the data from the time series.

AI Explain converts the visual complexity of the chart and underlying data into straightforward text summaries and answers. It makes sophisticated analysis accessible regardless of your analytics background. Instead of manually cross-referencing points on the chart with company names and calculating changes, you can simply ask the AI. This significantly speeds up the process of extracting meaningful information so your team can focus on acting on the insights rather than just finding them.

The next sections go through some example queries you can try out.

Example Query: Identifying Top Growing Companies

A good starting point is to ask AI Explain to identify the most significant positive movers. Let’s type the following question:

Which companies showed the highest percentage growth in embeddings API calls yesterday compared to the day before?

It responds in the following manner:

Using Ask AI to find top growing companies in the time series analysis.

This question directly targets the key information needed to identify successful adoption or upselling opportunities. Specific, quantitative answers like this to questions you can answer in a conversational way is far more actionable than just visually scanning the plot, especially with many data points.

Example Query: Investigating Declines

Let’s try to understand the most significant decrease that has occurred in the analysis period with the following question:

Which companies saw the most significant decrease in usage in the past 7 days?

AI Explain gives this response:

Using Ask AI to find companies with declining growth in the time series analysis.

Example Query: Average Growth

We can try to understand the average growth with a query like the following:

What was the average growth rate across all companies in the analysis time period?

AI Explain generates the following response:

Using Ask AI to find the average growth rate for companies in the time series.

While this gives you a simple arithmetic average of the individual percentage changes, treating each company equally, it becomes a good place to start further investigation.

However, you can fine tune your query to calculate a more precise average calculation. For example:

Calculate the average growth rate across all companies in the analysis time period using the event counts for each company in this time period.

Using Ask AI to find the average growth rate for companies in the time series based on the event counts for each company.

Turn AI Insights into Actionable Growth Strategies

AI Explain successfully has translated the time series analysis into clear answers about which companies changed their embeddings API usage. You have identified top growers, potential declines, and even correlated endpoint usage without needing complex manual analysis. This acceleration closes the gap between observing data and making informed decisions through AI-driven analytics so you can respond faster to customer behavior. Next, you can channel your findings into targeted actions across your teams.

For example, when you observe a company with a significant positive growth spike—for example, +150% day-over-day—you can notify your customer success or sales team. This insight provides a timely reason for outreach; the CSM can congratulate the company on their expanding usage, inquire about their project’s success, and explore potential upsell opportunities for higher tiers or related services. Knowing your rapidly growing customers allows for proactive relationship building and revenue expansion efforts.

This tutorial takes into account the data for only a single endpoint. However, you can include other relevant endpoints in your analysis. Then, you can leverage AI Explain to figure out what other endpoints the companies with increasing embeddings usage also frequently increase calls to. For example, you can ask this:

List companies that showed positive growth in embeddings usage yesterday AND also significantly increased calls to the /vector-search endpoint.

This correlation gives a valuable signal for your API product team and allows you to take measures like the following:  

  • Share this insight with the product team.
  • Use Moesif for further exploratory analysis.
  • Validate assumptions about complementary feature usage
  • Justify bundling features more explicitly.
  • Guide documentation updates to showcase combined workflows

This can lead to potentially boosting adoption of both features.

If AI Explain observes a sharp decline in usage for a company, you can immediately start investigation by support or customer success. They can use Moesif for corresponding error rate increases for the company, review recent support interactions, or initiate proactive outreach to understand the cause. Addressing friction points, technical issues, or changing needs you identify through declining usage can prevent customer churn.

Beyond individual accounts, leveraging AI Explain with Moesif’s analytics suite might help you dig out broader trends when analyzing aggregated data over time or with different segmentations. If the analysis consistently shows, for example, that mid-sized SaaS companies are adopting the embeddings API the fastest, you can initiate discussion with marketing and sales strategy. This data can help refine your ideal customer profile (ICP) and focus more efforts on segments demonstrating the strongest product-market.

Powered by artificial intelligence, Moesif’s AI Explain acts as an accelerator that surfaces opportunities and risks dormant within your API traffic. Combine data insights with your team’s domain knowledge and integrate into specific workflows for sales, customer success, product, and support, to get the most value out of your analytics. Continuously asking targeted questions using AI Explain transforms raw analytics into a dynamic engine for informed decision-making and sustainable API product growth.

Next Steps

Updated: