package main
import(
"context"
"os"
openrouter "github.com/OpenRouterTeam/go-sdk"
"github.com/OpenRouterTeam/go-sdk/models/components"
"log"
)
func main() {
ctx := context.Background()
s := openrouter.New(
openrouter.WithSecurity(os.Getenv("OPENROUTER_API_KEY")),
)
res, err := s.VideoGeneration.Generate(ctx, components.VideoGenerationRequest{
AspectRatio: components.VideoGenerationRequestAspectRatioOneHundredAndSixtyNine.ToPointer(),
Duration: openrouter.Pointer[int64](8),
Model: "google/veo-3.1",
Prompt: openrouter.Pointer("A serene mountain landscape at sunset"),
Resolution: components.VideoGenerationRequestResolutionSevenHundredAndTwentyp.ToPointer(),
})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}