Skip to main content

Welcome to DualMind

DualMind is an AI arena platform for comparing language models side-by-side. Send prompts to multiple models simultaneously, view responses in real-time, and collect votes on model quality.

Quick Start

Get up and running in 5 minutes with our integration guide.

Core Capabilities

Single Chat

Get responses from one AI model with streaming support

Dual Chat Arena

Compare two models side-by-side with voting

Thread Management

Persistent conversations with visibility control

Model Voting

Collect user preferences on model quality

What You Can Build

Model Benchmarks

Compare AI model performance across different prompts and collect user votes to determine quality.

Chat Interfaces

Build conversational UIs with thread persistence and both single and dual-model modes.

Quality Analysis

Track response times, token usage, and win rates across model pairs for research.

Arena Platforms

Create competitive AI testing environments where users vote on model responses.

API Features

HTTP-Only Architecture
  • RESTful JSON API with SSE streaming
  • No WebSocket complexity
  • 45-second timeout per request
JWT Authentication
  • Supabase Auth integration
  • Automatic user synchronization
  • Public and private endpoints
AI Provider Abstraction
  • Groq (primary) and Bytez (fallback)
  • Automatic provider failover
  • Parallel dual-chat execution
The API uses Server-Sent Events (SSE) for streaming, not WebSocket. All communication is HTTP-based.

Getting Started

1

Get Credentials

Set up Supabase project and obtain API credentials.
2

Authenticate

Implement Supabase Auth to get JWT tokens.
3

Make Requests

Call DualMind API endpoints with Bearer token authentication.
4

Handle Responses

Process JSON responses with AI output, usage stats, and timing.

Developer Resources

Response Format

All API responses use a standard envelope:
Success
{
  "success": true,
  "data": { /* payload */ }
}
Error
{
  "success": false,
  "error": "Human-readable message",
  "code": "ERROR_CODE"
}

System Architecture

DualMind consists of:
  • .NET 8.0 Backend API with JWT authentication
  • PostgreSQL Database via Supabase
  • AI Providers: Groq (primary), Bytez (fallback)
  • Supabase Auth for user management

Example: Single Chat

const response = await fetch('http://localhost:5079/api/arena/chat', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${jwt}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    prompt: 'Explain quantum computing',
    temperature: 0.7
  })
});

const result = await response.json();
console.log(result.message); // AI response text

Example: Dual Chat Arena

const response = await fetch('http://localhost:5079/api/arena/dualchat', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${jwt}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    prompt: 'Write a haiku about programming',
    selectionMode: 'random'
  })
});

const arena = await response.json();
console.log('Model 1:', arena.agent1.message);
console.log('Model 2:', arena.agent2.message);
console.log('Comparison:', arena.arena.verdict);

Need Help?

View Complete API

Explore all endpoints and parameters

Check Examples

See implementation patterns and code samples