API Reference
Minttu provides a REST API for integrating with external applications and building custom workflows.
Note: The Minttu API is currently in beta. Endpoints and responses may change.
Authentication
All API requests require authentication using an API key.
Getting Your API Key
- Log in to your Minttu Dashboard
- Navigate to Settings → API Keys
- Click Generate New Key
- Copy and securely store your key
Using Your API Key
Include your API key in the Authorization header:
curl -X GET "https://api.minttu.ai/v1/analysis" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
Base URL
https://api.minttu.ai/v1
Endpoints
Analyze Data
Analyze spreadsheet data and get insights.
POST /v1/analyze
Request Body:
{
"data": [
["Date", "Revenue", "Expenses"],
["2024-01-01", 10000, 7500],
["2024-02-01", 12000, 8000],
["2024-03-01", 11500, 7800]
],
"query": "What is the average profit margin?"
}
Response:
{
"status": "success",
"result": {
"answer": "The average profit margin is 30.2%",
"formula": "=AVERAGE((B2:B4-C2:C4)/B2:B4)",
"confidence": 0.95
}
}
Generate Formula
Generate Excel formulas from natural language descriptions.
POST /v1/formula
Request Body:
{
"description": "Sum of column B where column A contains 'Sales'",
"context": {
"columns": ["Category", "Amount", "Date"],
"sample_data": [
["Sales", 500, "2024-01-15"],
["Marketing", 200, "2024-01-16"]
]
}
}
Response:
{
"status": "success",
"formula": "=SUMIF(A:A,\"Sales\",B:B)",
"explanation": "This formula sums all values in column B where the corresponding cell in column A contains 'Sales'."
}
Rate Limits
| Plan | Requests/Hour | Requests/Day |
|---|---|---|
| Free | 100 | 500 |
| Pro | 1,000 | 10,000 |
| Enterprise | Unlimited | Unlimited |
Error Codes
| Code | Description |
|---|---|
400 |
Bad Request — Invalid parameters |
401 |
Unauthorized — Invalid or missing API key |
403 |
Forbidden — Insufficient permissions |
429 |
Too Many Requests — Rate limit exceeded |
500 |
Internal Server Error — Try again later |
SDKs
Official SDKs are available for popular languages:
- Python:
pip install minttu - JavaScript/Node.js:
npm install @minttu/sdk - R:
install.packages("minttu")
Python Example
from minttu import MinttuClient
client = MinttuClient(api_key="YOUR_API_KEY")
result = client.analyze(
data=[
["Month", "Revenue"],
["Jan", 10000],
["Feb", 12000],
["Mar", 11500]
],
query="What is the total revenue?"
)
print(result.answer) # "The total revenue is $33,500"
Webhooks
Configure webhooks to receive notifications when specific events occur.
Supported Events
analysis.complete— Analysis job finishedformula.generated— Formula generation completeerror.occurred— An error was encountered
Webhook Payload
{
"event": "analysis.complete",
"timestamp": "2024-01-15T10:30:00Z",
"data": {
"job_id": "abc123",
"status": "success",
"result": { }
}
}
Need help with the API? Contact our developer support at team@minttu.ai