{
 "openapi": "3.1.0",
 "info": {
  "title": "TuringCorp Models API",
  "version": "2026-09-13",
  "description": "Proprietary collaborative inference. Each model is an OpenAI-compatible API backed by a multi-model pipeline: independent reasoning paths cross-examine each other before an answer is delivered, instead of a single forward pass. OpenAI-compatible: chat completions plus a model list. Non-streaming only. Benchmark results and methods: https://api.turingcorp.net/index.md",
  "contact": {
   "email": "iAsk@turingcorp.net"
  }
 },
 "servers": [
  {
   "url": "https://api.turingcorp.net/v1"
  }
 ],
 "security": [
  {
   "bearerAuth": []
  }
 ],
 "components": {
  "securitySchemes": {
   "bearerAuth": {
    "type": "http",
    "scheme": "bearer",
    "description": "Preview key. Access is by invitation: iAsk@turingcorp.net"
   }
  },
  "schemas": {
   "ChatCompletionRequest": {
    "type": "object",
    "required": [
     "model",
     "messages"
    ],
    "properties": {
     "model": {
      "type": "string",
      "enum": [
       "turingcorp/decider-junior-v1",
       "turingcorp/decider-senior-v1",
       "turingcorp/team-junior-v1.1",
       "turingcorp/team-senior-v1",
       "turingcorp/team-principal-v1"
      ],
      "description": "turingcorp/decider-junior-v1: Reliable AI judge between two answers for everyday decisions, with a calibrated confidence signal.; turingcorp/decider-senior-v1: Rigorous AI judge of subtle differences for high-stakes decisions, with a calibrated confidence signal.; turingcorp/team-junior-v1.1: Cost-effective collaborative analysis for everyday tasks.; turingcorp/team-senior-v1: Deeper reasoning with enhanced quality for important decisions.; turingcorp/team-principal-v1: Maximum analytical depth for mission-critical evaluations."
     },
     "messages": {
      "type": "array",
      "items": {
       "type": "object",
       "required": [
        "role"
       ],
       "properties": {
        "role": {
         "type": "string",
         "enum": [
          "system",
          "user",
          "assistant"
         ]
        },
        "content": {
         "type": "string"
        }
       }
      }
     },
     "temperature": {
      "type": "number"
     }
    }
   },
   "ChatCompletionResponse": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string"
     },
     "object": {
      "type": "string"
     },
     "model": {
      "type": "string"
     },
     "choices": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "index": {
         "type": "integer"
        },
        "message": {
         "type": "object",
         "properties": {
          "role": {
           "type": "string"
          },
          "content": {
           "type": "string"
          }
         }
        },
        "finish_reason": {
         "type": "string"
        }
       }
      }
     },
     "usage": {
      "type": "object"
     }
    }
   }
  }
 },
 "paths": {
  "/models": {
   "get": {
    "operationId": "listModels",
    "summary": "List available model IDs",
    "description": "Returns every model ID this endpoint accepts. Use these values in the `model` field of /chat/completions.",
    "responses": {
     "200": {
      "description": "Model list (OpenAI format)",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  },
  "/chat/completions": {
   "post": {
    "operationId": "createChatCompletion",
    "summary": "Run inference (OpenAI-compatible chat completions)",
    "description": "Team models answer an open question and return the answer body together with the reasoning stated for it. Decider models answer a judging question: send `{\"task\": ..., \"option_A\": ..., \"option_B\": ...}` as the user message and the response content is `{\"betterOption\": \"option_A\"|\"option_B\", \"confidence\": \"<pct>\", \"reason\": ...}`. Streaming is not supported: `stream: true` returns HTTP 400.",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ChatCompletionRequest"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Completion",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ChatCompletionResponse"
        }
       }
      }
     },
     "401": {
      "description": "Missing or invalid key"
     },
     "429": {
      "description": "Quota exceeded"
     }
    }
   }
  }
 },
 "externalDocs": {
  "description": "Benchmark results, methods and model cards",
  "url": "https://github.com/TuringCorp-net/turingcorp-llm"
 }
}
