Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
Suggestions
Video Generation endpoints
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 } }
ctx
request
opts
package main import( "context" "os" openrouter "github.com/OpenRouterTeam/go-sdk" "log" ) func main() { ctx := context.Background() s := openrouter.New( openrouter.WithSecurity(os.Getenv("OPENROUTER_API_KEY")), ) res, err := s.VideoGeneration.GetGeneration(ctx, "job-abc123") if err != nil { log.Fatal(err) } if res != nil { // handle response } }
jobID
string
package main import( "context" "os" openrouter "github.com/OpenRouterTeam/go-sdk" "github.com/OpenRouterTeam/go-sdk/optionalnullable" "log" ) func main() { ctx := context.Background() s := openrouter.New( openrouter.WithSecurity(os.Getenv("OPENROUTER_API_KEY")), ) res, err := s.VideoGeneration.GetVideoContent(ctx, "job-abc123", optionalnullable.From(openrouter.Pointer[int64](0))) if err != nil { log.Fatal(err) } if res != nil { // handle response } }
index
int64
package main import( "context" "os" openrouter "github.com/OpenRouterTeam/go-sdk" "log" ) func main() { ctx := context.Background() s := openrouter.New( openrouter.WithSecurity(os.Getenv("OPENROUTER_API_KEY")), ) res, err := s.VideoGeneration.ListVideosModels(ctx) if err != nil { log.Fatal(err) } if res != nil { // handle response } }
Was this page helpful?