Back Back to Articles

Introducing the CamelAI API: AI-Powered Analytics, Programmatically

Introducing the CamelAI API: AI-Powered Analytics, Programmatically

Introducing the CamelAI API: AI-Powered Analytics, Programmatically

The last BI tool you'll ever need just got even more powerful. Today, we're excited to announce the launch of the CamelAI API, bringing our deep research agent capabilities directly into your applications, workflows, and systems.

What AI Did for Coding, CamelAI Does for Analytics

For too long, getting insights from your data has required wrestling with complex BI tools, writing SQL by hand, or waiting days for data team responses. The CamelAI API changes that by putting our AI-powered analytics engine at your fingertips through simple REST endpoints.

Bottom line: Transform natural language questions into comprehensive reports with interactive visualizations—all through a single API call.

Two Approaches, Infinite Possibilities

The CamelAI API supports both stateful and stateless implementations, giving you the flexibility to integrate our platform exactly how your architecture demands.

Stateful API: Set It and Forget It

Perfect for applications with consistent data sources and established analytics patterns:

  • Pre-configure your database connections, reference queries, and knowledge base
  • Streamlined requests with minimal payload requirements
  • Consistent context across all queries using your company's established metrics
curl --request POST \
  --url https://api.camelai.com/api/v1/ask_camel \
  --header 'Content-Type: application/json' \
  --data '{
    "message": "What was our revenue growth compared to last quarter?",
    "source_id": 123
  }'

Stateless API: Complete Control

Ideal for dynamic environments, multi-tenant applications, or one-off analyses:

  • Everything in one call - database connections, context, and queries
  • No pre-setup required - each request is completely self-contained
  • Maximum flexibility for varying data sources and use cases
curl --request POST \
  --url https://api.camelai.com/api/v1/ask_camel \
  --header 'Content-Type: application/json' \
  --data '{
    "message": "Analyze customer churn by region",
    "source": {
      "type": "postgresql",
      "hostname": "your-db-host",
      "database_name": "analytics",
      "username": "readonly_user",
      "password": "secure_password"
    },
    "knowledge_base_entries": [
      "Churn is defined as customers who haven't made a purchase in 90+ days"
    ],
    "reference_queries": [
      {
        "title": "Active Customers",
        "query": "SELECT customer_id FROM customers WHERE last_purchase_date > CURRENT_DATE - INTERVAL '90 days'"
      }
    ]
  }'

The Deep Research Agent Advantage

Unlike traditional text-to-SQL tools that dump raw data tables, our API delivers what you actually need:

Iterative Query Refinement Our agent writes SQL queries behind the scenes, explores your data, and refines its approach based on results.

Interactive Visualizations Automatically generates SQL, Data results, and Python with written analysis explaining what the data actually means for your business.

Company Context Learning Reference queries and knowledge base entries ensure consistent definitions and metrics across your organization.

Enterprise-Ready from Day One

The CamelAI API supports the same enterprise features that power our web application:

  • 10+ Database Connectors: PostgreSQL, MySQL, ClickHouse, BigQuery, Snowflake, and more
  • Secure Connections: VPC and on-premises deployment options
  • Real-time Processing: Streaming responses for complex queries
  • Artifact Management: Save and reference visualizations programmatically

Real-World Use Cases

Embedded Analytics Integrate natural language analytics directly into your SaaS product, giving customers instant insights without building complex BI infrastructure.

Automated Reporting Schedule regular business reports that adapt to changing data patterns and automatically surface anomalies.

Slack/Teams Integrations Build bots that answer data questions in real-time, eliminating the bottleneck between business questions and data insights.

Customer-Facing Dashboards Power dynamic dashboards that respond to natural language filters and automatically generate relevant visualizations.

Getting Started

Ready to transform how your applications handle data? Here's what you need:

  1. Explore the Docs: Comprehensive API reference at camelai.com/docs/api-reference
  2. Get Your API Key: Set up your developer account at console.camelai.com
  3. Connect Your Data: Choose between stateful setup or stateless calls
  4. Start Querying: Ask questions in natural language, get insights in seconds

The Future of Self-Serve Analytics

We built CamelAI because we were tired of waiting for data insights. What started as an AI chat interface has evolved into the most powerful way to democratize analytics across entire organizations.

The API represents the next chapter: bringing AI-powered data analysis to every application, workflow, and team that needs it.

Stop writing SQL queries by hand. Start getting answers immediately.


Ready to integrate? Check out our API documentation or reach out at [email protected].

Questions about implementation or enterprise features? Our team reads every email and responds quickly.

Illiana Reed