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 Fanout)
Python 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 Fanout)

Fire one prompt at several models and stream their replies in parallel.

1from meshapi import CompareParams, ChatMessage
2
3stream = client.compare.stream(
4 CompareParams(
5 models=[
6 "openai/gpt-4o-mini",
7 "anthropic/claude-sonnet-4.5",
8 "google/gemini-2.5-flash",
9 ],
10 messages=[ChatMessage(role="user", content="Summarize this paragraph in one sentence: ...")],
11 stream=True,
12 )
13)
14
15for event in stream:
16 if event.event == "delta":
17 print(event.data)

Use client.compare.create(params) for a non-streaming side-by-side response with an optional judge-model comparison via comparison_model.