Documentation

Compare LLM Search Behavior Through One API.

Use the HTTP reference to build an integration, connect the MCP server to Claude Code, Cursor, or any MCP client, or give the ready-made Agent Skill to your coding assistant.

HTTP API

API Reference

Endpoints, request fields, response shapes, providers, credit costs, and errors.

Quick Start

The production API base is https://llmsleuth.com. Use API keys from your dashboard. Local and preview domains should not be used in documentation or customer integrations.

curl https://llmsleuth.com/api/v1/query \
  -H "Authorization: Bearer asc_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "What is the best lead scraping tool?",
    "runs": [
      { "provider": "openai", "model": "gpt-5.6-terra" },
      { "provider": "anthropic", "model": "claude-sonnet-5" },
      { "provider": "gemini", "model": "gemini-3.5-flash" },
      { "provider": "perplexity", "model": "sonar-pro" }
    ]
  }'

Authentication

Send your key as a bearer token. Keys start with asc_. The x-api-key header is also accepted. Provider API keys stay on the LLM Sleuth server.

Authorization: Bearer asc_your_api_key

Run Query

POST/api/v1/query
FieldTypeDescription
querystringThe question or research prompt to run. Keep it at or below 4,000 characters.
runsarrayOne to 16 { provider, model } targets using IDs from GET /api/v1/models.
providersarrayLegacy shorthand that runs each selected provider's current default model.

Send either runs or providers, not both. Invalid or unavailable model IDs return a 400; they are never replaced silently.

List Available Models

GET/api/v1/models

Use this endpoint as the source of truth for selectable model IDs, display names, default models, and credit costs.

curl https://llmsleuth.com/api/v1/models \
  -H "Authorization: Bearer asc_your_api_key"
{
  "object": "list",
  "models": [
    {
      "id": "gpt-5.6-terra",
      "provider": "openai",
      "name": "GPT-5.6 Terra",
      "credit_cost": 1,
      "is_default": true
    }
  ]
}

Saved Comparisons

Every comparison is saved to your account, whether it ran from the dashboard, the API, or MCP. Reading saved comparisons is free and never re-runs a model.

List saved comparisons

GET/api/v1/executions
FieldTypeDescription
limitinteger1 to 50. Default 10. Newest first.
offsetintegerRows to skip for paging. Default 0.
curl "https://llmsleuth.com/api/v1/executions?limit=10" \
  -H "Authorization: Bearer asc_your_api_key"
{
  "object": "list",
  "limit": 10,
  "offset": 0,
  "executions": [
    {
      "execution_id": "7f79c814-1112-4a94-9bb4-719d5ccf5e98",
      "query": "What is the best lead scraping tool?",
      "status": "completed",
      "providers": ["openai", "anthropic"],
      "runs": [
        { "provider": "openai", "model": "gpt-5.6-terra" },
        { "provider": "anthropic", "model": "claude-sonnet-5" }
      ],
      "credits_used": 2,
      "created_at": "2026-11-13T15:02:11.000Z",
      "completed_at": "2026-11-13T15:04:37.000Z"
    }
  ]
}

Get a saved comparison

GET/api/v1/executions/{execution_id}
FieldTypeDescription
page_text_charsintegerCharacters of extracted page text kept per source preview, 0 to 20,000. Default 1,500. Raw HTML samples are not returned.

Returns every model run with its status and full result, including runs still in progress. If a POST /api/v1/query request times out, find it here instead of running it again. An ID that does not exist or belongs to another account returns 404.

curl "https://llmsleuth.com/api/v1/executions/7f79c814-1112-4a94-9bb4-719d5ccf5e98" \
  -H "Authorization: Bearer asc_your_api_key"
{
  "execution_id": "7f79c814-1112-4a94-9bb4-719d5ccf5e98",
  "query": "What is the best lead scraping tool?",
  "status": "completed",
  "error": null,
  "credits_used": 2,
  "created_at": "2026-11-13T15:02:11.000Z",
  "completed_at": "2026-11-13T15:04:37.000Z",
  "history_url": "https://llmsleuth.com/history/7f79c814-1112-4a94-9bb4-719d5ccf5e98",
  "runs": [
    {
      "provider": "openai",
      "model": "gpt-5.6-terra",
      "status": "completed",
      "error": null,
      "completed_at": "2026-11-13T15:03:58.000Z",
      "result": {
        "provider": "openai",
        "ok": true,
        "generatedQueries": ["best lead scraping tools 2026"],
        "sources": [{ "url": "https://example.com/source" }],
        "sourcePreviews": [{ "url": "https://example.com/source", "fetchStatus": 200, "textSample": "Extracted page text..." }],
        "answer": "Markdown answer text..."
      }
    }
  ]
}

Providers

IDProviderSearch capture
openaiChatGPT / OpenAICaptures Responses API web search calls and source annotations.
anthropicClaude / AnthropicCaptures web_search tool inputs and citations when returned.
geminiGemini / GoogleCaptures grounding search queries and grounding chunks when returned.
perplexityPerplexity / SonarCaptures Sonar citations and search_results when returned.

Response Shape

The response includes an execution_id. Fetch that run again later with GET /api/v1/executions/{execution_id} or open it in dashboard history. Always inspect each results[].ok value because individual providers can fail independently.

{
  "execution_id": "7f79c814-1112-4a94-9bb4-719d5ccf5e98",
  "query": "What is the best lead scraping tool?",
  "runs": [
    { "provider": "openai", "model": "gpt-5.6-terra" },
    { "provider": "anthropic", "model": "claude-sonnet-5" },
    { "provider": "gemini", "model": "gemini-3.5-flash" },
    { "provider": "perplexity", "model": "sonar-pro" }
  ],
  "providers": ["openai", "anthropic", "gemini", "perplexity"],
  "credits_used": 4,
  "results": [
    {
      "provider": "openai",
      "label": "ChatGPT / OpenAI",
      "ok": true,
      "model": "gpt-5.6-terra",
      "generatedQueries": ["best lead scraping tools 2026"],
      "sources": [{ "url": "https://example.com/source" }],
      "sourcePreviews": [
        {
          "url": "https://example.com/source",
          "fetchStatus": 200,
          "headings": [{ "level": 1, "text": "Best Lead Tools" }]
        }
      ],
      "answer": "Markdown answer text..."
    }
  ]
}

Errors

FieldTypeDescription
401authMissing or invalid API key.
402creditsNot enough credits for the selected models.
400inputInvalid JSON, missing query, unavailable model, invalid run selection, or an execution ID that is not a UUID.
404not foundExecution not found for this API key's account.
500serverProvider or persistence failure.

Each model declares its credit cost in the model catalog. A request is charged the sum of its selected model costs.