Overview
Store outputs
֍
Opt-in to storing outputs on Substrate

Substrate is stateless by default. When using nodes that output media like GenerateImage, you can opt-in to hosting their output using the store parameter.


# Returns image data
GenerateImage(prompt="your prompt")
# Returns an image URL
GenerateImage(
prompt="your prompt",
store="hosted",
)

Learn more
  • Use store: "hosted" to host the image on Substrate.
  • Use store: "s3://..." to host on your own storage. See External files to learn more.

Without the store parameter:

  • Nodes with image output return base 64-encoded JPEG data

"image_uri": "data:image/jpeg;base64,/9j/4kZJRBAQYABAAD/4QYRXhpZgAA0AKAA1IBEAAAPEAAAAASg..."

  • Nodes with audio output return base 64-encoded WAV data

"audio_uri": "data:audio/wav;base64,/9j/4QSkZJRgABAQEAYAAAD/BYRXhpZgAATU0A1ABIBAAAFAAAASg..."

Substrate also comes with fast built-in vector storage, which you can use to minimize data roundtrips to other providers.