Skip to main content

GET /api/admin/votes

List all votes with pagination.

Query parameters

ParameterTypeDefaultDescription
pageinteger1Page number
limitinteger50Items per page (max 500)

Response

{
  "success": true,
  "data": [
    {
      "vote_id": "v1-uuid",
      "user_id": "u1-uuid",
      "comparison_id": "c1-uuid",
      "winner_model_id": "m1-uuid",
      "created_at": "2025-01-15T10:00:00Z"
    }
  ],
  "count": 50,
  "total": 8765,
  "page": 1,
  "limit": 50
}

GET /api/admin/votes/

Get a single vote by UUID.

GET /api/admin/votes/user/

Get all votes cast by a specific user.

GET /api/admin/votes/model/

Get all votes where a specific model was the winner.

GET /api/admin/votes/comparison/

Get all votes for a specific comparison.

POST /api/admin/votes

Create a new vote (admin override).

Request body

{
  "user_id": "u1-uuid",
  "comparison_id": "c1-uuid",
  "winner_model_id": "m1-uuid"
}

DELETE /api/admin/votes/

Delete a vote by UUID.

DELETE /api/admin/votes/user/

Delete all votes for a specific user.

GET /api/admin/votes/stats

Get voting statistics per model — win counts for each model.

Response

{
  "success": true,
  "data": {
    "Llama 3.3 70B": {
      "model_id": "m1-uuid",
      "model_name": "llama-3.3-70b-versatile",
      "wins": 245
    },
    "Mixtral 8x7B": {
      "model_id": "m2-uuid",
      "model_name": "mixtral-8x7b-32768",
      "wins": 189
    }
  },
  "total_votes": 8765
}