API Documentation

Integrate AI-powered data summarization into your applications

Quick Start

Get up and running in minutes

Authentication

All API requests require authentication using your API key in the Authorization header.

Authorization: Bearer YOUR_API_KEY

Base URL

All API endpoints are relative to our base URL:

https://api.summize.app/v1

API Endpoints

Complete reference for all available endpoints

POST

/summarize

Generate AI-powered summaries from your data.

Request Body

{
  "data": [
    {"month": "Jan", "revenue": 125000},
    {"month": "Feb", "revenue": 138000}
  ],
  "format": "narrative",
  "style": "business",
  "max_length": 500
}

Response

{
  "summary": "Revenue increased from $125K...",
  "insights": ["40% growth", "Strong Q1"],
  "confidence": 0.95,
  "processing_time": 2.1
}
GET

/reports

Retrieve a list of your generated reports.

Query Parameters

?limit=10&offset=0&status=completed

Response

{
  "reports": [
    {
      "id": "rep_123",
      "title": "Q4 Sales Summary",
      "created_at": "2024-01-15T10:30:00Z",
      "status": "completed"
    }
  ],
  "total": 25,
  "has_more": true
}
GET

/templates

Get available report templates.

Query Parameters

?category=sales&format=narrative

Response

{
  "templates": [
    {
      "id": "tmpl_001",
      "name": "Sales Performance",
      "category": "sales",
      "description": "Monthly sales analysis"
    }
  ]
}

Code Examples

See how to use our API in your favorite language

JavaScript

const response = await fetch(
  'https://api.summize.app/v1/summarize',
  {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      data: salesData,
      format: 'narrative'
    })
  }
);

const result = await response.json();

Python

import requests

response = requests.post(
    'https://api.summize.app/v1/summarize',
    headers={
        'Authorization': 'Bearer YOUR_API_KEY',
        'Content-Type': 'application/json'
    },
    json={
        'data': sales_data,
        'format': 'narrative'
    }
)

result = response.json()

cURL

curl -X POST \
  https://api.summize.app/v1/summarize \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "data": [{"month": "Jan", "revenue": 125000}],
    "format": "narrative"
  }'

Official SDKs

Use our official SDKs for easier integration

JS

JavaScript SDK

Easy integration for web applications and Node.js projects.

View Documentation →
npm install @summize/sdk
🐍

Python SDK

Simple integration for Python applications and data science workflows.

View Documentation →
pip install summize-sdk

Java SDK

Enterprise-ready integration for Java applications and microservices.

View Documentation →
Maven Central

Error Handling

Understand and handle API errors gracefully

HTTP Status Codes

200 Success
400 Bad Request
401 Unauthorized
429 Rate Limited
500 Server Error

Error Response Format

{
  "error": {
    "code": "validation_error",
    "message": "Invalid data format",
    "details": {
      "field": "data",
      "issue": "Missing required field"
    }
  }
}

Rate Limiting

Understand our rate limits and best practices

Free Plan

100

requests per hour

Pro Plan

1,000

requests per hour

Enterprise

10,000+

requests per hour

Rate Limit Headers

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1640995200

Ready to integrate?

Start building with our API today. Get your API key and begin integrating AI-powered summarization.