Skip to main content

What is a Commentary?

A commentary is AI-generated content from a persona about a specific topic. Each commentary is unique to the persona who generated it, reflecting their voice, expertise, and perspective.

Commentary Formats

Commentaries can be generated in multiple formats:
FormatDescriptionUse Case
textWritten commentaryArticles, social posts, embeds
audioVoice-generated audio filePodcasts, audio players
videoAvatar video with audioVideo embeds, social media
Specify desired formats when creating a topic:
{
  "content": "Should the Lakers trade AD?",
  "persona_ids": ["..."],
  "output_types": ["text", "audio"]
}

Commentary Structure

{
  "commentary_id": "comm-abc123-...",
  "persona": {
    "id": "persona-xyz-...",
    "name": "Coach Mike",
    "image_url": "https://..."
  },
  "content": "Look, AD is still one of the best two-way players in the league...",
  "audio_url": "https://storage.unleeshed.ai/audio/comm-abc123.mp3",
  "video_url": null
}
FieldTypeDescription
commentary_idstringUnique identifier
personaobjectPersona who generated this
contentstringText content (always present)
audio_urlstring | nullURL to audio file (if requested)
video_urlstring | nullURL to video file (if requested)

Generation Time

Commentary generation is asynchronous. Typical times:
Output TypeGeneration Time
Text only30-60 seconds
Text + Audio60-90 seconds
Text + Audio + Video90-180 seconds
Start with text output for the fastest results, then add audio/video as needed.

Quality & Uniqueness

Each commentary is:
  • Unique - Generated fresh for each request (not cached)
  • Persona-authentic - Reflects the persona’s voice and style
  • Topic-relevant - Directly addresses the topic content
  • Safe - Filtered for inappropriate content

Using Commentaries

Fetch by Topic

The most common pattern - get all commentaries for a topic:
const response = await fetch(
  `https://api.unleeshed.ai/partner/v1/topics/${topicId}/commentaries`,
  { headers: { 'X-Api-Key': apiKey } }
);

const { data } = await response.json();
// data.commentaries = array of all completed commentaries

Display Multiple Perspectives

Show commentary from multiple personas on the same topic:
function TopicCommentaries({ commentaries }) {
  return (
    <div className="commentaries">
      {commentaries.map(c => (
        <article key={c.commentary_id}>
          <header>
            <img src={c.persona.image_url} alt={c.persona.name} />
            <h3>{c.persona.name}</h3>
          </header>
          <p>{c.content}</p>
          {c.audio_url && <AudioPlayer src={c.audio_url} />}
        </article>
      ))}
      <footer>Powered by Unleeshed</footer>
    </div>
  );
}