For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
PlaygroundChangelogSign In
OverviewAPI ReferencePre-recorded STTStreaming STTVoice AgentsSpeech UnderstandingGuardrailsLLM GatewayFAQ
OverviewAPI ReferencePre-recorded STTStreaming STTVoice AgentsSpeech UnderstandingGuardrailsLLM GatewayFAQ
  • Getting started
    • Overview
    • Build with AI coding agents
    • Models
    • Evaluate model accuracy
    • Manage your account
    • Introducing Universal-3 Pro
    • End-to-end examples
      • Meeting notetaker
      • Sales call intelligence
      • Medical scribe
      • Content repurposing
      • Real-time meeting assistant
      • Real-time live captioner
  • Use cases & integrations
    • Use case guides
    • Integrations
  • Trust & security
    • Trust center
    • Security overview
    • Data retention and model training
LogoLogo
PlaygroundChangelogSign In
Getting startedEnd-to-end examples

Content repurposing

Was this page helpful?
Previous

Real-time meeting assistant

Next
Built with

Transcribe a podcast or webinar, extract key phrases, then use LLM Gateway to generate a blog post draft with highlights.

Products used: Pre-recorded STT + key phrases + LLM Gateway

Model selection: Uses universal-3-pro with universal-2 fallback for multilingual content. If your content is English-only, universal-3-pro alone gives the best results.

Python
JavaScript
1import requests
2import time
3
4# ── Config ────────────────────────────────────────────────────
5base_url = "https://api.assemblyai.com"
6headers = {"authorization": "YOUR_API_KEY"}
7
8audio_url = "https://assembly.ai/wildfires.mp3"
9
10# ── Step 1: Transcribe with key phrases enabled ──
11data = {
12 "audio_url": audio_url,
13 "speech_models": ["universal-3-pro", "universal-2"],
14 "language_detection": True,
15 "auto_highlights": True,
16}
17
18response = requests.post(base_url + "/v2/transcript", headers=headers, json=data)
19response.raise_for_status()
20transcript_id = response.json()["id"]
21
22while True:
23 result = requests.get(f"{base_url}/v2/transcript/{transcript_id}", headers=headers).json()
24 if result["status"] == "completed":
25 break
26 elif result["status"] == "error":
27 raise RuntimeError(f"Transcription failed: {result['error']}")
28 time.sleep(3)
29
30# ── Step 2: Extract top key phrases ──
31highlights = result.get("auto_highlights_result", {}).get("results", [])
32top_phrases = sorted(highlights, key=lambda x: x["rank"], reverse=True)[:10]
33phrases_list = ", ".join(p["text"] for p in top_phrases)
34
35# ── Step 3: Generate blog post via LLM Gateway ──
36llm_response = requests.post(
37 "https://llm-gateway.assemblyai.com/v1/chat/completions",
38 headers=headers,
39 json={
40 "model": "claude-sonnet-4-5-20250929",
41 "messages": [
42 {
43 "role": "user",
44 "content": (
45 "You are a content writer. Transform this transcript into an engaging "
46 "blog post.\n\n"
47 "Requirements:\n"
48 "- Write a compelling title and subtitle\n"
49 "- Break the content into 3-5 sections with headers\n"
50 "- Weave in the key phrases naturally\n"
51 "- Add a TL;DR at the top\n"
52 "- End with a call-to-action\n\n"
53 f"Key phrases: {phrases_list}\n\n"
54 "Transcript:\n{{ transcript }}"
55 ),
56 }
57 ],
58 "transcript_id": transcript_id,
59 "max_tokens": 3000,
60 },
61)
62llm_response.raise_for_status()
63
64print("=== Blog Post Draft ===\n")
65print(llm_response.json()["choices"][0]["message"]["content"])
Example output
=== Blog Post Draft ===
# When the Sky Turns Orange: Understanding Wildfire Smoke and Air Quality
**How Canadian wildfires are reshaping air quality across the United States**
**TL;DR:** Wildfire smoke from Canada is triggering widespread air quality alerts
in the US, with particulate matter levels reaching 10x normal in some cities.
Here's what you need to know about the health risks and how to protect yourself.
## The smoke crosses borders
Hundreds of wildfires burning across Canada have sent massive plumes of smoke
southward into the United States, creating hazy skies and triggering air quality
alerts from the Midwest to the Eastern Seaboard...
## Understanding particulate matter
The real danger lies in fine particulate matter — microscopic particles that
can penetrate deep into your lungs and even enter your bloodstream...
## Protecting your health
Health experts recommend staying indoors, using air purifiers, and wearing
N95 masks when outdoor exposure is unavoidable...
## Looking ahead
As climate change intensifies wildfire seasons, these cross-border smoke events
are likely to become more frequent...
---
*Want to transcribe your own podcast or webinar? Get started with AssemblyAI's
API at [assemblyai.com](https://assemblyai.com).*

See the End-to-end examples overview for all available pipelines.