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
Go SDK for building AI features against 400+ models through OpenRouter.
go get github.com/OpenRouterTeam/go-sdk
package main import ( "context" "log" "os" openrouter "github.com/OpenRouterTeam/go-sdk" "github.com/OpenRouterTeam/go-sdk/models/components" ) func main() { ctx := context.Background() s := openrouter.New( openrouter.WithSecurity(os.Getenv("OPENROUTER_API_KEY")), ) res, err := s.Chat.Send(ctx, components.ChatRequest{ Messages: []components.ChatMessages{ components.CreateChatMessagesUser( components.ChatUserMessage{ Content: components.CreateChatUserMessageContentStr( "What is the capital of France?", ), Role: components.ChatUserMessageRoleUser, }, ), }, }, nil) if err != nil { log.Fatal(err) } if res != nil { // handle response } }
Was this page helpful?