For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
DocsAPI ReferenceSDKs
DocsAPI ReferenceSDKs
      • Overview
      • Chat Completions
      • Prompt Templates
      • Files & Batches
      • Embeddings
      • Image Generation
      • Responses (Reasoning)
      • Compare (Multi-model)
      • Models
      • Error Handling
LogoLogo
On this page
  • Compare (Multi-model)
Go SDK

Compare (Multi-model)

||View as Markdown|
Was this page helpful?
Edit this page
Previous

Responses API (Reasoning)

Next

Models

Built with

Compare (Multi-model)

Compare multiple models side-by-side with a single call.

1chunkCh, errCh := client.Compare.Stream(ctx, meshapi.CompareParams{
2 Models: []string{
3 "openai/gpt-4o-mini",
4 "anthropic/claude-3-haiku",
5 "google/gemini-1.5-flash",
6 },
7 Messages: []meshapi.ChatMessage{{Role: "user", Content: "Write a poem about Go."}},
8})
9
10for event := range chunkCh {
11 if event.Event == "delta" {
12 fmt.Printf("[%s]: %s\n", event.ModelID, event.Data)
13 }
14}