Docs

/

Getting Started

/

Getting Started

Getting Started

Quick Start

Get your first summary back from the API in under 5 minutes. This guide covers authentication, your first request, and reading the response.

8 min read

v2.4.1

Prerequisites

Before you start, you'll need a SummarAI account and an API key. If you don't have one, create a free account — no credit card required. Your API key is available from the Dashboard → Settings → API Keys.


Installation

Install the official SDK for your language. We provide first-party clients for Node.js, Python, and Go. All SDKs wrap the same underlying REST API — you can also call it directly.


Authentication

All API requests are authenticated using Bearer tokens. Pass your API key in the Authorization header of every request.


Request Parameters

The POST /v1/summaries endpoint accepts the following parameters in the request body as JSON.

Parameter

Type

Required

Description

input

string

Required

A URL (http/https), file path, or raw text string. Accepted types: PDF, DOCX, TXT, YouTube URL, Loom URL, MP3, M4A.

format

string

Optional

Output format. One of paragraph, bullets, tldr, structured, action_items. Defaults to paragraph.

language

string

Optional

BCP-47 language tag for the output. E.g. en, fr, es. Defaults to the detected input language.

length

string

Optional

Controls output verbosity. One of short, medium, long. Defaults to medium.

features

string[]

Optional

Array of additional features to run. Values: sentiment, key_quotes, topics, data_extraction. Pro plan required.

webhook_url

string

Optional

A URL to receive a POST callback when processing completes. Recommended for files over 50 pages or audio over 30 minutes.

metadata

object

Optional

Arbitrary key-value pairs attached to the summary object. Returned as-is on retrieval. Useful for your internal IDs or tags.

Async Processing

Large files and long audio recordings process asynchronously. When you submit a request, it returns immediately with status: "processing". Poll the summary's ID or use a webhook to know when it's done.


Supported Input Types

SummarAI automatically detects the content type from the URL or file extension. You can also force a specific type with the input_type parameter.

Type

Accepted Values

Max Size

Plan

Document

PDF, DOCX, TXT, HTML, MD

500 pages

Free (50p) · Pro+

Video URL

YouTube, Loom, Vimeo

4 hours

All plans

Audio file

MP3, M4A, WAV, FLAC

500 MB

Pro+

Web article

Any public HTTP/HTTPS URL

All plans

Raw text

Plain string in input field

100,000 chars

All plans

Error Handling

Errors return a non-200 status code with a JSON body containing a code, human-readable message, and optional details.


POST/v1/summaries422 Unprocessable


{
  "error": {
    "code":    "file_too_large",
    "message": "The uploaded file exceeds the 50-page limit for your plan.",
    "details": {
      "pages_detected": 127,
      "plan_limit":     50
    }
  }
}
{
  "error": {
    "code":    "file_too_large",
    "message": "The uploaded file exceeds the 50-page limit for your plan.",
    "details": {
      "pages_detected": 127,
      "plan_limit":     50
    }
  }
}
{
  "error": {
    "code":    "file_too_large",
    "message": "The uploaded file exceeds the 50-page limit for your plan.",
    "details": {
      "pages_detected": 127,
      "plan_limit":     50
    }
  }
}

Common error codes

Code

Status

Description

invalid_api_key

401

Key is missing, malformed, or revoked.

insufficient_plan

403

Feature requires a higher-tier plan.

rate_limit_exceeded

429

Too many requests. Retry after the Retry-After header value.

file_too_large

422

File exceeds the page or size limit for your plan.

unsupported_format

422

Input type or file format is not supported.

processing_failed

500

An internal error occurred. Retry once. Contact support if it persists.

Next Steps




Authenticate and make your first call

You've completed this step. Your API key is working and you can create summaries.


2


Explore output formats

Try format: "action_items" for meeting recordings or format: "structured" for research papers. Each format shapes the response differently.


3


Set up a webhook

For production workloads, use webhooks instead of polling. Pass a webhook_url and we'll push the completed result to your server.


4


Enable features

Add sentiment, key_quotes, or topics to the features array to enrich your summaries without making extra calls.

Create a free website with Framer, the website builder loved by startups, designers and agencies.