{"openapi":"3.1.0","info":{"title":"satgate","description":"Lightning-paid AI inference (OpenAI-compatible)","version":"1.17.5"},"paths":{"/v1/chat/completions":{"post":{"summary":"Chat completions","description":"OpenAI-compatible chat completions endpoint","security":[{"l402":[]},{"payment":[]},{"lnurlcash":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionRequest"}}}},"responses":{"200":{"description":"Successful completion"},"402":{"description":"Payment required"},"503":{"description":"Service at capacity"}}}},"/v1/completions":{"post":{"summary":"Text completions (legacy)","security":[{"l402":[]},{"payment":[]},{"lnurlcash":[]}],"responses":{"200":{"description":"Successful completion"},"402":{"description":"Payment required"}}}},"/v1/embeddings":{"post":{"summary":"Embeddings","security":[{"l402":[]},{"payment":[]},{"lnurlcash":[]}],"responses":{"200":{"description":"Successful embedding"},"402":{"description":"Payment required"}}}},"/v1/models":{"get":{"summary":"List available models","responses":{"200":{"description":"Available models","content":{"application/json":{"example":{"data":[{"id":"gemma3:4b","object":"model"},{"id":"qwen3:0.6b","object":"model"}]}}}}}}},"/create-invoice":{"post":{"summary":"Create a Lightning invoice for credits","responses":{"200":{"description":"Invoice created"},"429":{"description":"Rate limit exceeded"}}}}},"components":{"securitySchemes":{"l402":{"type":"http","scheme":"L402","description":"L402 macaroon:preimage credentials"},"payment":{"type":"http","scheme":"Payment","description":"IETF Payment authentication (draft-ryan-httpauth-payment-01), lightning method: Authorization: Payment <base64url credential>"},"lnurlcash":{"type":"apiKey","in":"header","name":"X-LNURLcash","description":"LUD-25 bearer note URL"}},"schemas":{"ChatCompletionRequest":{"type":"object","required":["model","messages"],"properties":{"model":{"type":"string","enum":["gemma3:4b","qwen3:0.6b"]},"messages":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","user","assistant"]},"content":{"type":"string"}}}},"stream":{"type":"boolean","default":false}}}}}}