Skip to content

Generated Assets

When the AI generates non-text output during a conversation (like an image or a data file), GhostMind captures it as a generated asset. Assets are stored securely and are downloadable from the conversation.

Asset Types

TypeExamples
ImageDiagrams, charts, generated images
Sandbox fileCode output, data files from code execution
External linkReferenced URLs (recorded but not stored)

Asset Lifecycle

discovered → downloading → validating → uploading → ready
↘ failed
  1. Discovered — GhostMind detects an asset reference in the AI response
  2. Downloading — The asset is downloaded from the provider
  3. Validating — File type and size are validated (magic bytes, MIME allowlist)
  4. Uploading — The asset is stored securely
  5. Ready — The asset is available for download

Downloading Assets

  1. Open the conversation in the Chat playground
  2. Generated assets appear in the conversation flow
  3. Click the download button to save the file

Assets can also be downloaded via the API:

Terminal window
curl https://ghostmind.optdmsa.com/v1/conversations/{id}/assets/{asset_id}/download \
-H "Authorization: Bearer sk-gm-..."

Security

  • Assets are tenant-isolated — cross-tenant access returns 404
  • Download URLs are private — they are not permanent public links
  • Path traversal prevention is enforced
  • Only assets with is_downloadable: true can be downloaded

Attachments vs Generated Assets

FeatureAttachmentsGenerated Assets
SourceUploaded by userGenerated by AI
DirectionUser → AIAI → User
StorageProcessed for retrievalStored as private files

Next Steps