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)
Node.js 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.

1const stream = client.compare.create({
2 models: [
3 "openai/gpt-4o-mini",
4 "anthropic/claude-sonnet-4.5",
5 "google/gemini-2.5-flash",
6 ],
7 messages: [{ role: "user", content: "Summarize this paragraph in one sentence: ..." }],
8 stream: true,
9});
10
11for await (const event of stream) {
12 if (event.event === "delta") {
13 console.log(event.data);
14 }
15}

Use non-streaming compare with an optional judge-model comparison via comparison_model.