When rendering Lens posts on a social feed, we can show the user whether or not it's a Smart Media post. For now, all posts made on Bonsai are Smart Media posts. This can change in the future, as we support regular posts, or other Lens apps support the creation of Smart Media.
Checking metadata attributes
If you only want to show whether a post is Smart Media with the category or template name, you can do so by inspecting the post metadata attributes.
The above information is enough to render the screenshot shown in the beginning of this doc.
Resolving the full Smart Media object
If you want to render more information, like shown in the GIF above, you can easily get the full Smart Media object using our API. This would provide information such as
the description of the smart media template (its behavior as defined by the developer)
the last time the smart media object was updated / generated
whether the smart media object is currently updating
the full configuration of the smart media object (useful for more bespoke integrations)
API ENDPOINT: https://app.onbons.ai/api/media/{postSlug}
METHOD: GET
{
"category": "evolving_post",
"template": "adventure_time",
"agentId": "11dec834-6fb0-0e6c-a702-2da0fb4df111",
"creator": "0x94734e11b78680a35b0a86ba3ce634d334d6d2a7",
"templateData": {
"context": "Snowboard trip to the Mountains of Japan. Filled with snowboard action and tricks. and beautiful views. Take the challenge",
"writingStyle": "Motivationa, Casual tone",
"modelId": "flux-dev",
"stylePreset": "Long Exposure",
"decisions": [
"Head back to the lodge for some well-deserved rest and hot chocolate.",
"Continue exploring the mountain for more thrills."
],
"chapterName": "Frozen Sanctuary",
"aspectRatio": "1:1",
"previousPages": [
"First Descent; Take the safe route, a well-groomed path with gentle slopes ideal for warming up.",
"The Backcountry Call; Strike out into the backcountry for a more challenging and exhilarating run.",
"Untouched Powder; Conquer the steep incline, pushing your skills to the limit for an unforgettable ride.",
"The Hidden Cave; Explore the cave further, unravelling its mysteries and potential hidden treasures."
]
},
"postId": "3bkqx29zpdv30r8b7ms",
"uri": "lens://4abbe5d2e326dba189de39e7ab53fb609b2fbd9b8b75e50bdbd10b04376c4d8e",
"maxStaleTime": 1800,
"createdAt": 1746660711,
"updatedAt": 1746727482,
"versionCount": 4,
"isProcessing": false,
"versions": [
"https://link.storjshare.io/raw/jw3iog3dy7frukpkum5xo6tklyxq/publication-history-metadata/f0781eae-4884-4cc8-93c9-8363ac71d3ff-version-0.json",
"https://link.storjshare.io/raw/jw3iog3dy7frukpkum5xo6tklyxq/publication-history-metadata/aad4c3d8-cbfb-42ea-ad68-79a8712c5be5-version-1.json",
"https://link.storjshare.io/raw/jw3iog3dy7frukpkum5xo6tklyxq/publication-history-metadata/d2fee46b-6ee3-42a0-b283-213eb031e812-version-2.json",
"https://link.storjshare.io/raw/jw3iog3dy7frukpkum5xo6tklyxq/publication-history-metadata/eef4f170-b569-48f9-be17-b82754549f49-version-3.json"
],
"protocolFeeRecipient": "0x21aF1185734D213D45C6236146fb81E2b0E8b821",
"description": "The creator sets the stage for an evolving choose-your-own-adventure. Collectors & token holders decide the direction of the story.",
"estimatedCost": 1.082,
"status": "active",
"featured": true
}
Property
Description
category
the top-level smart media category
template
the template name, as defined by the template developer
description
the template description, as defined by the template developer. describes the behavior of this smart media object
agentId
unique UUID on the ElizaOS server
templateData
custom config data necessary to continue generations for this smart media object
postId
associated Lens post slug
uri
associated Lens post uri
isProcessing
whether the smart media object is currently updating / re-generating
versions
array of URLs that resolve to Post metadata of past versions of this post
protocolFeeRecipient
developer defined recipient of any protocol fee splits
estimatedCost
the estimated cost (in credits) to re-generate this post