AI Resolution API

Request AI-powered resolution for prediction markets using multi-model consensus from OpenAI, Anthropic, Google, and xAI.

Request Resolution

POST/ai/resolve

Submit a market for AI resolution. The AI will analyze the market question and outcomes, gather relevant information, and provide a consensus resolution.

Request Body

FieldTypeRequiredDescription
questionstringYesThe question to resolve
outcomesstring[]YesPossible outcomes (e.g., ["Yes", "No"])
contextstringNoAdditional context for resolution
callbackUrlstringYesURL to receive result webhook
confidenceThresholdnumberNoMinimum confidence (0-1, default: 0.75)

Request

cURL
curl -X POST "https://api.predikt.fun/api/v1/ai/resolve" \
-H "Authorization: Bearer pk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"question": "Will SOL reach $200 by January 31, 2026?",
"outcomes": ["Yes", "No"],
"context": "SOL is currently trading at $185",
"callbackUrl": "https://your-server.com/webhook"
}'

Response

FieldTypeDescription
requestIdstringUnique request identifier
statusstring"processing" (async operation)
costUsdstringCost of request
remainingBalanceUsdstringRemaining account balance
Response (200)
{
"requestId": "req_abc123def456",
"status": "processing",
"costUsd": "0.25",
"remainingBalanceUsd": "49.75"
}

Get Resolution Result

GET/ai/request/:requestId

Poll for the resolution result using the request ID.

Request

cURL
curl -X GET "https://api.predikt.fun/api/v1/ai/request/req_abc123def456" \
-H "Authorization: Bearer pk_live_your_api_key"

Response (Completed)

Response (200)
{
"requestId": "req_abc123def456",
"status": "COMPLETED",
"createdAt": "2026-01-17T12:00:00.000Z",
"completedAt": "2026-01-17T12:00:30.000Z",
"result": {
"requestId": "req_abc123def456",
"question": "Will SOL reach $200 by January 31, 2026?",
"winningOutcomeIndex": 0,
"winningOutcomeLabel": "Yes",
"confidence": 0.95,
"agreement": 0.75,
"reasoning": "Based on current market trends and price momentum...",
"modelsUsed": ["openai/gpt-4", "anthropic/claude-3", "google/gemini-pro", "xai/grok"],
"canDetermine": true,
"costUsd": "0.25",
"remainingBalanceUsd": "49.75"
}
}

How AI Resolution Works

1

Multi-Model Query

Your request is sent to 4 AI models: GPT-4, Claude, Gemini, and Grok.

2

Source Gathering

Each model searches for relevant sources and evidence.

3

Consensus Building

Results are aggregated. A minimum of 3/4 model agreement is required.

4

Result Delivery

The consensus result is returned with confidence score and reasoning.

Callback Webhook

If you provide a callbackUrl, we'll POST the result to your server when resolution completes.

Webhook Payload
POST https://your-server.com/webhook
Content-Type: application/json
X-Predikt-Signature: <hmac-sha256-signature>
{
"requestId": "req_abc123def456",
"type": "ai",
"status": "completed",
"data": {
"requestId": "req_abc123def456",
"question": "Will SOL reach $200 by January 31, 2026?",
"winningOutcomeIndex": 0,
"winningOutcomeLabel": "Yes",
"confidence": 0.95,
"agreement": 0.75,
"reasoning": "Based on official sources...",
"modelsUsed": ["openai/gpt-4", "anthropic/claude-3", "google/gemini-pro", "xai/grok"],
"canDetermine": true,
"costUsd": "0.25",
"remainingBalanceUsd": "49.75"
},
"timestamp": "2026-01-17T12:00:30.000Z",
"signature": "<hmac-sha256-signature>"
}

Related