InputReference - Go SDK

InputReference type definition

The Go SDK and docs are currently in beta. Report issues on GitHub.

A reference asset used to guide video generation. Image references are supported by all providers; audio and video references are only honored by providers that support them (currently BytePlus Seedance 2.0).

Supported Types

ContentPartAudio

1inputReference := components.CreateInputReferenceAudioURL(components.ContentPartAudio{/* values here */})

ContentPartImage

1inputReference := components.CreateInputReferenceImageURL(components.ContentPartImage{/* values here */})

ContentPartVideo

1inputReference := components.CreateInputReferenceVideoURL(components.ContentPartVideo{/* values here */})

Union Discrimination

Use the Type field to determine which variant is active, then access the corresponding field:

1switch inputReference.Type {
2 case components.InputReferenceTypeAudioURL:
3 // inputReference.ContentPartAudio is populated
4 case components.InputReferenceTypeImageURL:
5 // inputReference.ContentPartImage is populated
6 case components.InputReferenceTypeVideoURL:
7 // inputReference.ContentPartVideo is populated
8}