Developer Documentation

Prediction Market API for AI Agents

Mantis exposes a Streamable HTTP MCP server and a REST API for routing AI agent market intent across Polymarket, Kalshi, Limitless, Myriad, SX Bet, and PredictIt. Free to start — get a key at mantiss.store/pricing.

Quick start — 3 ways to connect

Claude Code (1 command)

claude mcp add mantis \
  --transport http \
  --url https://mantiss.store/mcp \
  --header "Authorization: Bearer YOUR_KEY"

Claude Desktop / Cursor / Windsurf

{
  "mcpServers": {
    "mantis": {
      "transport": {
        "type": "http",
        "url": "https://mantiss.store/mcp"
      },
      "headers": {
        "Authorization": "Bearer YOUR_KEY"
      }
    }
  }
}

Get a free API key

curl -X POST https://mantiss.store/api/v1?endpoint=keys&action=issue \
  -H "content-type: application/json" \
  -d '{"email":"you@example.com","channel":"docs"}'

Key returned once — store it securely. See all tiers →

MCP Tools (5 total)

route_market

Natural-language query → best venue + probability + arbitrage signal. The primary discovery tool.

route_market(q="Will France win the 2026 World Cup?")

get_quote

Live yes/no prices, liquidity, 24h volume, and optional L2 order book depth for a specific market.

get_quote(canonical_id="will-france-win-the-2026-fifa-world-cup", size=1000)

get_arbitrage

Scan live markets for cross-venue spreads. Optional fee normalization shows net-of-fees profitability.

get_arbitrage(min_spread_pct=3, include_fees=true, position_size=5000)

execute_url

Get a referral-attributed deep link to trade on the best venue. Tracks agent intent.

execute_url(canonical_id="will-france-win-...", side="yes", amount=500)

get_unmet_demand

Return queries users searched where no exact market exists — demand intelligence for market creation teams.

get_unmet_demand(limit=20)

OpenAI Responses API

import OpenAI from 'openai'

const client = new OpenAI({ apiKey: process.env.OPENAI_API_KEY })

const response = await client.responses.create({
  model: 'gpt-4o',
  tools: [{
    type: 'mcp',
    server_label: 'mantis',
    server_url: 'https://mantiss.store/mcp',
    headers: { Authorization: `Bearer ${process.env.MANTIS_API_KEY}` },
    require_approval: 'never',
  }],
  input: 'Find the best World Cup 2026 winner market and return the execute_url for France.',
})

console.log(response.output_text)

REST API endpoints

GET /api/v1?endpoint=markets

Cross-venue market catalog

GET /api/v1?endpoint=arbitrage

Live spreads ≥4¢ across venues

GET /api/v1?endpoint=quote&canonicalId=...

Single-market live snapshot

GET /api/v1?endpoint=route&q=...

Natural-language → best market

GET /api/v1?endpoint=usage

API key tier + daily usage

POST /api/v1?endpoint=webhooks

Subscribe to spread/move alerts

All endpoints require Authorization: Bearer YOUR_KEY header. Base URL: https://mantiss.store/api/v1

Frequently asked questions

How do I connect Claude to Mantis?

Run: claude mcp add mantis --transport http --url https://mantiss.store/mcp --header "Authorization: Bearer YOUR_KEY". Get a free key at mantiss.store/pricing. Once connected, Claude can call route_market, get_quote, get_arbitrage, execute_url, and get_unmet_demand.

Is the Mantis API free?

The free tier allows 100 API requests per day and includes all 5 MCP tools plus the REST search and route endpoints. Starter ($29/month) gives 10,000 requests/day and adds webhook alerts. Pro (unlimited) adds L2 order book depth.

What prediction market venues does the API cover?

Mantis aggregates live data from Polymarket, Kalshi, Limitless, Myriad, SX Bet, and PredictIt. The route_market tool returns the best venue for any natural-language query with cross-venue arbitrage detection.

Can OpenAI agents use Mantis?

Yes. Mantis uses Streamable HTTP transport (MCP spec-compliant) and can be registered as an MCP server in OpenAI's Responses API with type: "mcp". See the code example below. A free key is enough to start.

Ready to connect your agent?

Free tier gives 100 requests/day — enough to prototype. Upgrade to Starter for 10,000/day plus webhook alerts.

Get free API key →