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
    • API reference
  • Mesh API
      • POSTChat Completions
      • POSTChat Compare
LogoLogo
Mesh APIChat

Chat Compare

||View as Markdown|
POST
https://api.meshapi.ai/v1/chat/compare
POST
/v1/chat/compare
$curl -X POST https://api.meshapi.ai/v1/chat/compare \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "models": [
> "gpt-4o-mini",
> "gpt-3.5-turbo"
> ],
> "messages": [
> {
> "role": "system",
> "content": "You are a helpful assistant that compares responses from different AI models."
> },
> {
> "role": "user",
> "content": "Explain the benefits of renewable energy."
> }
> ],
> "comparison_model": "gpt-4o",
> "comparison_instructions": "Compare the responses based on accuracy, clarity, and completeness.",
> "temperature": 0.7,
> "max_tokens": 500,
> "stream": false,
> "skip_comparison": false
>}'
1{}
Was this page helpful?
Previous

Chat Completions

Next

Generate Image

Built with

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

Response

Successful Response

Errors

422
Unprocessable Entity Error