LLM
Self-consistency vote API
Self-consistency / majority vote over N candidate answers (case- and whitespace-normalized): picks the modal answer, reports vote share as confidence, flags full agreement, and returns the full tally — implements the self-consistency sampling technique. Answers 'which answer do most of my samples agree on?', 'how confident is the majority vote?'.
Price$0.03per request
MethodPOST
Route/v1/llm/self-consistency
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
llmself-consistencyvotemajorityensemblesamplingconfidenceagent
API URL
Integration docshttps://x402.hexl.dev/v1/llm/self-consistencyExample request
{
"candidates": [
"42",
"42",
"41",
"42"
]
}Example response
{
"winner": "42",
"votes": 3,
"total": 4,
"confidence": 0.75,
"agreement": false,
"tally": [
{
"answer": "42",
"count": 3
},
{
"answer": "41",
"count": 1
}
]
}Input schema
{
"type": "object",
"required": [
"candidates"
],
"properties": {
"candidates": {
"type": "array",
"items": {
"type": "string"
},
"examples": [
[
"42",
"42",
"41",
"42"
]
]
},
"normalize": {
"type": "boolean",
"default": true
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}