---
title: "Toggle the caller's vote for a ROSTER model. 404 if the key is unknown."
method: POST
path: "/api/v1/model-votes/{key}/toggle"
tags: ["Model Votes"]
---

# Toggle the caller's vote for a ROSTER model. 404 if the key is unknown.

`POST /api/v1/model-votes/{key}/toggle`

## Request

- Base URL: `https://api.avatarfactory.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.avatarfactory.io/api/v1/model-votes/{key}/toggle`
- Auth: one of:
  - API key in cookie `session`
  - HTTP bearer

## Path parameters

- `key` string, required

## Response `200`

OK

- ToggleResponse
  - `key` string, required
  - `voted` boolean, required
  - `votes` integer, required

## Other responses

- `404`: Not Found
- `422`: Unprocessable Entity

---

[API](https://skmtc.dev/avatarfactory/apis/avatarfactory-api.md) · [All operations](https://skmtc.dev/avatarfactory/apis/avatarfactory-api/llms.txt) · [OpenAPI document](https://skmtc.dev/avatarfactory/apis/avatarfactory-api/revisions/66fc7aa3f296?raw)
