{"openapi":"3.1.0","info":{"title":"Lite API","version":"0.2.0","description":"OpenAI-compatible inference API for lite.id. Authenticate with sk-lite- API keys or Lite-issued JWTs. Optional BYOK routes upstream through your provider key with a reduced platform fee."},"servers":[{"url":"https://api.lite.id"}],"paths":{"/v1/models":{"get":{"summary":"List models","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OpenAI-shaped model list","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Model"}}}}}}}}}},"/v1/chat/completions":{"post":{"summary":"Create chat completion","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionRequest"}}}},"responses":{"200":{"description":"JSON completion when stream=false, or text/event-stream SSE when stream=true"},"401":{"description":"Unauthorized"},"402":{"description":"Insufficient credits"},"403":{"description":"Model not allowed for this API key"},"429":{"description":"Rate limited"}}}},"/v1/chat":{"post":{"summary":"Legacy plain-text chat stream","deprecated":true,"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"UTF-8 text stream"}}}},"/health":{"get":{"summary":"Liveness","responses":{"200":{"description":"OK"}}}},"/ready":{"get":{"summary":"Readiness","responses":{"200":{"description":"Ready"},"503":{"description":"Not ready"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"sk-lite-… API key or Lite access token"}},"schemas":{"Model":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["model"]},"owned_by":{"type":"string"}}},"ChatMessage":{"type":"object","required":["role","content"],"properties":{"role":{"type":"string","enum":["system","user","assistant","tool"]},"content":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url"]},"text":{"type":"string"},"image_url":{"type":"object","properties":{"url":{"type":"string"}}}}}}]}}},"ChatCompletionRequest":{"type":"object","required":["messages"],"properties":{"model":{"type":"string","default":"lite-auto","description":"Catalog id or OpenRouter slug. Omit to use the Admin platform default (falls back to lite-auto / openrouter/free)."},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ChatMessage"}},"stream":{"type":"boolean","default":true},"temperature":{"type":"number"},"max_tokens":{"type":"integer"},"tools":{"type":"array","items":{"type":"object"},"description":"OpenAI-compatible tool definitions"},"tool_choice":{"description":"auto | none | required | specific function"}}},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string"},"code":{"type":"string"}}}}}}}}