Chat Compare

View as Markdown

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
modelslist of stringsRequired
messageslist of objectsRequired
model_overrideslist of objects or nullOptional
comparison_modelstring or nullOptional
comparison_instructionsstring or nullOptional
temperaturedouble or nullOptional0-2
max_tokensinteger or nullOptional>=1
streambooleanOptionalDefaults to false
templatestring or nullOptional
variablesmap from strings to strings or nullOptional
skip_comparisonbooleanOptionalDefaults to false
cacheboolean or nullOptional

Response

Per-model results plus an optional synthesized comparison (JSON), or an SSE stream when stream=true

comparison_idstring

Unique ID for this comparison (cmp_...).

createdinteger

Unix timestamp (seconds) when the response was produced.

modelslist of strings

Models that were compared, in request order (deduped).

resultslist of objects

Per-model results, in models order.

total_latency_msinteger

End-to-end latency for the whole compare request, in milliseconds.

object"compare.completion"
comparisonstring or null

Synthesized evaluation of all responses from the comparison LLM. Null when skip_comparison is true or fewer than two models succeeded.

comparison_modelstring or null

Model that produced comparison. Null when no synthesis ran.

comparison_usageobject or null
Token usage for the comparison LLM call.
comparison_fallback_usedbooleanDefaults to false
True if the primary comparison model failed and a fallback produced the synthesis.
partialbooleanDefaults to false

True if at least one model in results returned an error.

skip_comparisonbooleanDefaults to false
Echoes whether the comparison LLM step was skipped.

Errors

401
Unauthorized Error
402
Payment Required Error
403
Forbidden Error
422
Unprocessable Entity Error
429
Too Many Requests Error
500
Internal Server Error
502
Bad Gateway Error
503
Service Unavailable Error