> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dualmindlab.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# API Reference

> Programmatic access to DualMind Arena — integrate blind model comparisons into your own tools.

# DualMind Arena API

The DualMind Arena API allows you to programmatically:

* Submit prompts to the arena
* Retrieve anonymized model responses
* Vote on comparisons
* Access the public leaderboard data

## Authentication

All API requests require an authentication token. You can obtain a personal access token from your account settings.

```bash theme={null}
Authorization: Bearer <your_api_token>
```

## Base URL

All requests should be made to:

```
https://api.dualmind.ai/v1
```

## Comparisons

### Submit a Prompt

Run a blind comparison between two models.

```bash theme={null}
POST /arena/compare
```

**Parameters:**

| Name     | Type   | Description                                        |
| :------- | :----- | :------------------------------------------------- |
| `prompt` | string | The input prompt for the models                    |
| `mode`   | string | `random`, `topper`, or `manual`                    |
| `models` | array  | (Optional) Specific model IDs if using manual mode |

**Response:**

```json theme={null}
{
  "comparisonId": "cmp_12345",
  "responses": [
    {
      "modelId": "hidden",
      "content": "Response from Model A..."
    },
    {
      "modelId": "hidden",
      "content": "Response from Model B..."
    }
  ]
}
```

## Voting

### Submit a Vote

Cast your vote for the better response. This reveals the model identities.

```bash theme={null}
POST /arena/vote
```

**Body:**

```json theme={null}
{
  "comparisonId": "cmp_12345",
  "winner": "left" // "left", "right", "tie", or "both_bad"
}
```

**Response:**

```json theme={null}
{
  "success": true,
  "revealedModels": {
    "left": {
      "id": "gpt-4o",
      "name": "GPT-4o"
    },
    "right": {
      "id": "claude-3-5-sonnet",
      "name": "Claude 3.5 Sonnet"
    }
  }
}
```

## Models & Stats

### List Models

Get the current list of available models and their ELO ratings.

```bash theme={null}
GET /models
```

### Get Leaderboard

Retrieve the current global leaderboard.

```bash theme={null}
GET /leaderboard
```
