Docs
Assets API

Assets API

Fetching auto-saved asset outputs from agent tool calls.

GET /api/assets

Fetch assets for the current team. All outputs from agent tool calls (images, posts, scripts, receipts, legal analyses) are automatically saved here.

Auth: Required

Query parameters (all optional):

ParamTypeDescription
conversationIdstringFilter to a specific conversation
typestringFilter by asset type (see types below)
fromISO date stringFilter assets created after this date
toISO date stringFilter assets created before this date
limitnumberMax results, default 60, max 100
offsetnumberPagination offset, default 0

Response: Array of asset objects ordered by createdAt descending.


Asset Schema

{
  id: number,
  teamId: string,
  conversationId: string | null,
  runId: number | null,          // set for workflow-generated assets
  type: string,
  title: string,                 // max 100 chars
  content: string,               // URL for images, Markdown for everything else
  metadata: Record<string, unknown>,
  createdAt: string,
}

Asset Types

typeProduced Bycontent FormatKey metadata Fields
social_postformat_postThe post text + hashtagsplatform
post_outlinegenerate_outlineMarkdown outlineplatform, outline (original JSON)
imagegenerate_imageSupabase Storage public URLprompt
reel_scriptformat_reelCaption + hashtagsplatform, sceneCount
scriptformat_scriptFull script in Markdownformat, estimatedRuntime
thumbnailgenerate_thumbnail_concept3 concepts in Markdownplatform, conceptCount
receiptextract_receipt_dataItemized receipt in Markdowntotal, currency, itemCount
legal_analysisanalyze_legal_documentFull analysis in MarkdowndocumentType, riskCount, highRisks

Filtering Examples

# All images from a specific conversation
GET /api/assets?conversationId=abc123&type=image
 
# All receipts from the last 7 days
GET /api/assets?type=receipt&from=2025-05-03
 
# Paginate: second page of 20 results
GET /api/assets?limit=20&offset=20
 
# All assets from a workflow run
GET /api/assets?runId=42

Assets are team-scoped. The endpoint automatically filters by team.id from the current session — users in multiple teams only see assets for their active team.