Skip to main content
POST
/
summaries
curl -X POST https://api.bota.dev/v1/summaries \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "transcription_id": "txn_abc123",
    "template_id": "tmpl_sales_call",
    "provider": "gemini"
  }'
{
  "id": "sum_abc123",
  "project_id": "proj_xyz",
  "transcription_id": "txn_abc123",
  "status": "pending",
  "template_id": "tmpl_sales_call",
  "provider": "gemini",
  "custom_prompt": null,
  "output": null,
  "error_message": null,
  "started_at": null,
  "completed_at": null,
  "created_at": "2025-01-15T10:10:00Z",
  "updated_at": "2025-01-15T10:10:00Z"
}
Generate a structured summary from a completed transcription. The transcription must be in completed status. You can create multiple summaries for the same transcription using different templates. Use webhooks to receive real-time notifications when the summary completes, or poll the Get Summary endpoint.

Authentication

Requires an API key with summaries:write scope.
curl -X POST https://api.bota.dev/v1/summaries \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "transcription_id": "txn_abc123",
    "template_id": "tmpl_sales_call",
    "provider": "gemini"
  }'

Request Body

transcription_id
string
required
The transcription’s unique identifier (e.g., txn_abc123). Must be in completed status.
template_id
string
System template ID to use. One of: tmpl_general_notes, tmpl_sales_call, tmpl_clinical_soap, tmpl_legal_memo.Either template_id or prompt is required, but not both.
prompt
string
Custom prompt for one-off summaries. Use this instead of template_id for custom summarization.Must be 10-10,000 characters. Either template_id or prompt is required, but not both.
provider
string
LLM provider to use for summarization. If not specified, uses the system default.
ProviderDescription
geminiGoogle Gemini 2.0 Flash (default) - JSON output
openaiOpenAI GPT-4o - JSON mode
claudeAnthropic Claude Sonnet 4 - Structured output

Response

Returns the newly created summary object with pending status.
{
  "id": "sum_abc123",
  "project_id": "proj_xyz",
  "transcription_id": "txn_abc123",
  "status": "pending",
  "template_id": "tmpl_sales_call",
  "provider": "gemini",
  "custom_prompt": null,
  "output": null,
  "error_message": null,
  "started_at": null,
  "completed_at": null,
  "created_at": "2025-01-15T10:10:00Z",
  "updated_at": "2025-01-15T10:10:00Z"
}

Response Fields

FieldTypeDescription
idstringThe summary’s unique identifier (e.g., sum_abc123)
project_idstringThe project this summary belongs to
transcription_idstringThe transcription this summary was generated from
statusstringCurrent status: pending, processing, completed, or failed
template_idstring | nullThe template used, if any
providerstringLLM provider used (e.g., gemini, openai, claude)
custom_promptstring | nullThe custom prompt used, if any
outputobject | nullStructured summary output (populated on completion)
error_messagestring | nullError message if the summary failed
started_atstring | nullISO 8601 timestamp when processing started
completed_atstring | nullISO 8601 timestamp when the summary completed or failed
created_atstringISO 8601 timestamp when the summary was created
updated_atstringISO 8601 timestamp when the summary was last updated

Templates

Bota provides four built-in system templates optimized for different use cases:
Template IDTarget IndustryOutput Format
tmpl_general_notesGeneral meetingsKey points, action items, participants, decisions, overview
tmpl_sales_callSales callsPain points, budget, timeline, next steps, sentiment, deal probability
tmpl_clinical_soapHealthcareSOAP notes (Subjective, Objective, Assessment, Plan)
tmpl_legal_memoLegal consultationsFacts, issues, analysis, conclusion, parties involved
See Summary Templates for detailed output schemas.

Custom Prompts

For custom summarization, use the prompt parameter instead of template_id:
curl -X POST https://api.bota.dev/v1/summaries \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "transcription_id": "txn_abc123",
    "prompt": "Extract all technical requirements and action items from this conversation. Format as a bulleted list."
  }'

Summary Status

StatusDescription
pendingJob queued, waiting to start
processingSummary generation in progress
completedSummary generated successfully
failedSummary generation failed (check error_message field)

Auto-Summary

Instead of calling this endpoint manually, you can enable auto-summary to automatically generate a summary whenever a transcription completes. Configure via the hierarchical config system:
curl -X PUT https://api.bota.dev/v1/projects/proj_xxx/config/processing \
  -H "Authorization: Bearer sk_live_..." \
  -d '{
    "auto_summary": {
      "enabled": true,
      "provider": "gemini",
      "template": "general_notes"
    }
  }'
Auto-summary works with auto-transcription for a fully automated pipeline: upload → transcribe → summarize. See the Auto-Processing Guide for full details. For production use, subscribe to webhook events instead of polling: See Webhooks Overview for setup instructions.
Summary generation typically takes 5-15 seconds, depending on transcript length and template complexity.