{
  "info": {
    "name": "AI Crucible API",
    "description": "OpenAI-compatible REST API for running AI Crucible ensemble strategies (multiple LLMs orchestrated through a strategy and judged or synthesized by an arbiter model), evaluating model responses with AI judges, and reading usage.\n\n**API access is Pro-only.** API keys can only be created, listed and rotated by users on the Pro subscription tier (`requireProTier` in the key-management functions). Keys are managed in the dashboard under Settings > API Keys; they are not created through this API.\n\nAuthentication: send the key as `Authorization: Bearer <key>`. Keys have the form `sk-aicruc_<random>`.\n\nErrors from authenticated endpoints are JSON of the form `{\"error\": {\"message\": string, \"type\": string}}`. There is no `code` field.\n\nLong-running multi-model strategies can take several minutes; the server timeout is 540 seconds.",
    "version": "1.0.0",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{apiKey}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://ai-crucible.com"
    },
    {
      "key": "apiKey",
      "value": ""
    }
  ],
  "item": [
    {
      "name": "Create a chat completion using an ensemble strategy",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/v1/chat/completions",
          "host": ["{{baseUrl}}"],
          "path": ["v1", "chat", "completions"]
        },
        "description": "Runs the selected ensemble strategy. The root `model` is the arbiter/judge; `ai_crucible.models` are the participants. The last message is the prompt; earlier non-system messages become conversation history; the first system message is used as the arbiter system prompt unless `ai_crucible.systemPrompt` is set. With `stream: true` the response is Server-Sent Events.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"model\": \"claude-sonnet-5\",\n  \"messages\": [\n    {\n      \"role\": \"system\",\n      \"content\": \"You are a precise technical editor. Pick the most accurate answer.\"\n    },\n    {\n      \"role\": \"user\",\n      \"content\": \"Explain the difference between optimistic and pessimistic locking in two paragraphs.\"\n    }\n  ],\n  \"temperature\": 0.7,\n  \"stream\": false,\n  \"ai_crucible\": {\n    \"strategy\": \"competitive_refinement\",\n    \"rounds\": 2,\n    \"models\": [\n      \"gemini-3.8-flash\",\n      \"gpt-5.4-mini\"\n    ],\n    \"includeCandidates\": true,\n    \"includeReasoning\": true\n  }\n}"
        }
      }
    },
    {
      "name": "Create a response from a single input string",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/v1/responses",
          "host": ["{{baseUrl}}"],
          "path": ["v1", "responses"]
        },
        "description": "Responses-style endpoint. `input` must be a string. Pass a previous `id` as `previous_response_id` to continue a conversation. If `ai_crucible.strategy` is omitted, the strategy is taken from `model` when it contains \"ensemble\" or \"panel\", otherwise a single-model run is requested. With `stream: true` the response is SSE using the same chat.completion.chunk format as /v1/chat/completions.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"model\": \"gemini-3.8-flash\",\n  \"input\": \"Summarize the trade-offs between SQLite and PostgreSQL for a small SaaS app.\",\n  \"stream\": false,\n  \"ai_crucible\": {\n    \"strategy\": \"collaborative_synthesis\"\n  }\n}"
        }
      }
    },
    {
      "name": "Evaluate model responses with AI judges",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/v1/evaluations",
          "host": ["{{baseUrl}}"],
          "path": ["v1", "evaluations"]
        },
        "description": "Scores each response on accuracy, creativity, clarity, completeness and usefulness using one or more judge models. Multiple judges produce consensus scores.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"prompt\": \"What is the capital of France?\",\n  \"responses\": [\n    {\n      \"modelId\": \"gemini-3.8-flash\",\n      \"modelName\": \"Gemini 3.8 Flash\",\n      \"response\": \"The capital of France is Paris, home of the Eiffel Tower.\"\n    },\n    {\n      \"modelId\": \"gpt-5.4-mini\",\n      \"modelName\": \"GPT-5.4 Mini\",\n      \"response\": \"Paris is the capital of France.\"\n    }\n  ],\n  \"judge_models\": [\n    {\n      \"id\": \"claude-sonnet-5\",\n      \"name\": \"Claude Sonnet 5\"\n    }\n  ],\n  \"evaluation_mode\": \"standard\",\n  \"weighted\": false\n}"
        }
      }
    },
    {
      "name": "Get usage statistics",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{baseUrl}}/v1/usage",
          "host": ["{{baseUrl}}"],
          "path": ["v1", "usage"]
        },
        "description": "Aggregates monthly usage documents covering the requested date range (at most 24 months). Defaults to the start of the current month through now."
      }
    }
  ]
}
