{"service": "SBT Pythia", "version": "0.1.0", "what_it_does": "Answers a natural-language prompt using Six Birds Theory (SBT) as context. Three knowledge bases \u2014 KB1 (core grammar), KB2 (structural laws & meta-theory), KB3 (instantiation atlas) \u2014 are pinned as a fixed prefix on every request and your prompt is appended last. Inference runs on DeepInfra (DeepSeek), with the KB prefix served from prompt cache (see usage.cached_tokens).", "endpoints": {"preferred": {"url": "https://joc7tepi6a7xcfxog2mvmojlni0grpsl.lambda-url.us-east-1.on.aws/", "use_when": "Default choice. Prefer this URL \u2014 it is the direct Lambda Function URL with a ~300s timeout, so slow requests don't get cut off."}, "fallback": {"url": "https://six-birds.stakebaby.com/pythia", "use_when": "Use ONLY if the preferred URL cannot be reached (some agents/networks can't resolve *.lambda-url.on.aws hosts). This is a CloudFront custom domain with a 60s timeout, so very long requests may fail here \u2014 prefer the URL above whenever it is accessible."}}, "how_to_call": {"GET_no_params": "GET a base URL with no query params \u2192 returns this manual.", "GET_with_params": "GET <url>?prompt=...&model=flash&reasoning=low&max_tokens=400&key=YOUR_KEY \u2192 runs the prompt and returns the answer JSON. Use this if your client can only make GET requests (e.g. some AI tools).", "POST_json": "POST a JSON body {prompt, model, reasoning, max_tokens, temperature} with header 'content-type: application/json' and 'x-api-key: YOUR_KEY'. Use this when your client can POST."}, "auth": {"required": true, "how": "Send the shared secret either as the 'x-api-key' header (POST or GET) or as a 'key' query param (handy for GET). Ask the operator for the key."}, "parameters": {"prompt": {"type": "string", "required": true, "description": "The question to answer using the SBT knowledge bases."}, "model": {"type": "string", "required": false, "default": "flash", "accepts": ["flash", "pro", "<any DeepInfra model id>"], "description": "'flash' = fast/cheap (default). 'pro'/'normal' = higher quality, slower."}, "reasoning": {"type": "boolean or string", "required": false, "default": false, "accepts": [false, true, "low", "medium", "high", "off"], "description": "Enable model reasoning. true \u2192 'medium'; or set 'low'/'medium'/'high'."}, "reasoning_effort": {"type": "string", "required": false, "accepts": ["low", "medium", "high"], "description": "Explicit alternative to 'reasoning'."}, "max_tokens": {"type": "integer", "required": false, "default": 1024, "description": "Max tokens to generate (clamped to a server cap)."}, "temperature": {"type": "number", "required": false, "default": 0.4, "description": "Sampling temperature. Lower = more deterministic."}}, "response_body": {"answer": "string \u2014 the model's answer.", "model": "string \u2014 the resolved DeepInfra model id used.", "reasoning_effort": "string|null \u2014 the effort applied, if any.", "reasoning": "string \u2014 present only if the model returned reasoning content.", "usage": {"prompt_tokens": "int", "completion_tokens": "int", "total_tokens": "int", "cached_tokens": "int \u2014 how much of the KB prefix was served from cache."}}, "examples": [{"title": "GET (preferred URL) \u2014 for GET-only clients", "url": "https://joc7tepi6a7xcfxog2mvmojlni0grpsl.lambda-url.us-east-1.on.aws/?prompt=In+SBT%2C+what+distinguishes+a+lens+from+a+carrier%3F&model=flash&key=YOUR_KEY"}, {"title": "GET (fallback URL) \u2014 if the preferred URL is blocked", "url": "https://six-birds.stakebaby.com/pythia?prompt=In+SBT%2C+what+distinguishes+a+lens+from+a+carrier%3F&model=flash&key=YOUR_KEY"}, {"title": "POST (preferred URL)", "curl": "curl -X POST 'https://joc7tepi6a7xcfxog2mvmojlni0grpsl.lambda-url.us-east-1.on.aws/' \\\n  -H 'content-type: application/json' \\\n  -H 'x-api-key: YOUR_KEY' \\\n  -d '{\"prompt\": \"In SBT, what distinguishes a lens from a carrier?\", \"model\": \"flash\"}'"}], "errors": {"400": "Bad request (missing/invalid prompt or fields, or prompt+context too long).", "401": "Missing or invalid key (x-api-key header or key query param).", "405": "Wrong method \u2014 use GET or POST.", "429": "Upstream rate limited; retry after a moment.", "502": "Upstream (DeepInfra) error.", "504": "Timeout \u2014 the request took too long; retry the preferred URL (longer timeout)."}}