CreateImagesResponse - Go SDK

CreateImagesResponse type definition

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

Supported Types

ImageGenerationResponse

1createImagesResponse := operations.CreateCreateImagesResponseImageGenerationResponse(components.ImageGenerationResponse{/* values here */})

1createImagesResponse := operations.CreateCreateImagesResponseEventStream(*stream.EventStream[components.ImageStreamingResponse]{/* values here */})

Union Discrimination

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

1switch createImagesResponse.Type {
2 case operations.CreateImagesResponseTypeImageGenerationResponse:
3 // createImagesResponse.ImageGenerationResponse is populated
4 case operations.CreateImagesResponseTypeEventStream:
5 // createImagesResponse.EventStream is populated
6}