{"openapi":"3.0.3","info":{"title":"llm-gateway API","version":"0.2.0","description":"Serverless LLM routing gateway for Vercel that unifies VPS Codex Proxy, Vercel AI Gateway, and NVIDIA Proxy behind one OpenAI Responses-compatible surface."},"servers":[{"url":"/"}],"tags":[{"name":"Gateway","description":"Provider-neutral LLM inference endpoints"},{"name":"Documentation","description":"OpenAPI contract and interactive documentation endpoints"},{"name":"Operations","description":"Operational health endpoints"},{"name":"Discovery","description":"Search and AI crawler discovery endpoints"}],"components":{"schemas":{},"parameters":{}},"paths":{"/livez":{"get":{"tags":["Operations"],"summary":"Liveness probe","responses":{"200":{"description":"Process is alive","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]}}}}}}},"/readyz":{"get":{"tags":["Operations"],"summary":"Readiness probe","responses":{"200":{"description":"Service is ready","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]}}}},"503":{"description":"Service is not ready","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]}},"required":["ok"]}}}}}}},"/v1/models":{"get":{"tags":["Gateway"],"summary":"List public model aliases","responses":{"200":{"description":"OpenAI-compatible model list using gateway aliases","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"object":{"type":"string","enum":["model"]},"created":{"type":"integer","minimum":0},"owned_by":{"type":"string","minLength":1}},"required":["id","object","created","owned_by"]}}},"required":["object","data"]}}}}}}},"/v1/capabilities":{"get":{"tags":["Gateway"],"summary":"Describe routing defaults, providers, and model availability","responses":{"200":{"description":"Gateway capabilities","content":{"application/json":{"schema":{"type":"object","properties":{"routePolicies":{"type":"array","items":{"type":"string","enum":["vps-only","vercel-only","nvidia-only"]}},"auth":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]},"providers":{"type":"object","properties":{"vps":{"type":"object","properties":{"enabled":{"type":"boolean"},"baseUrl":{"type":"string","minLength":1}},"required":["enabled","baseUrl"]},"vercel":{"type":"object","properties":{"enabled":{"type":"boolean"},"baseUrl":{"type":"string","minLength":1}},"required":["enabled","baseUrl"]},"nvidia":{"type":"object","properties":{"enabled":{"type":"boolean"},"baseUrl":{"type":"string","minLength":1}},"required":["enabled","baseUrl"]}},"required":["vps","vercel","nvidia"]},"models":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"wireApi":{"type":"string","enum":["openai-responses","anthropic-messages"]},"description":{"type":"string","minLength":1},"upstreams":{"type":"object","additionalProperties":{"type":"object","properties":{"enabled":{"type":"boolean"},"upstreamModel":{"type":"string","minLength":1},"features":{"type":"array","items":{"type":"string","minLength":1}}},"required":["enabled","upstreamModel","features"]}}},"required":["id","wireApi","description","upstreams"]}}},"required":["routePolicies","auth","providers","models"]}}}}}}},"/v1/responses":{"post":{"tags":["Gateway"],"summary":"OpenAI Responses-compatible inference endpoint","description":"Use x-gateway-route-policy header (required) to select a provider: vps-only, vercel-only, or nvidia-only. With nvidia-only, model may be either a configured alias or a raw NVIDIA upstream model name.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string","minLength":1},"input":{"nullable":true},"prompt":{"type":"string","minLength":1},"instructions":{"type":"string","minLength":1},"text":{"type":"object","properties":{"format":{"type":"object","properties":{"type":{"type":"string","minLength":1}}}}},"tools":{"type":"array","items":{"nullable":true}},"tool_choice":{"nullable":true},"parallel_tool_calls":{"type":"boolean"},"max_output_tokens":{"type":"number"},"include":{"nullable":true},"prompt_cache_key":{"type":"string","minLength":1},"store":{"type":"boolean"},"stream":{"type":"boolean"},"temperature":{"type":"number"},"max_tokens":{"type":"number"},"top_p":{"type":"number"},"reasoning":{"type":"object","properties":{"effort":{"type":"string","minLength":1},"summary":{"type":"string","minLength":1}}},"providerOptions":{"type":"object","additionalProperties":{"nullable":true}}},"required":["model"]}}}},"responses":{"200":{"description":"Successful OpenAI Responses-style payload","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"object":{"type":"string","minLength":1},"created":{"type":"integer","minimum":0},"model":{"type":"string","minLength":1},"output":{"type":"array","items":{"nullable":true}},"output_text":{"type":"string"}},"required":["id","object","created","model","output","output_text"]}},"text/event-stream":{"schema":{"type":"string"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"details":{"nullable":true}},"required":["type","message"]}},"required":["error"]}}}},"401":{"description":"Authentication failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"details":{"nullable":true}},"required":["type","message"]}},"required":["error"]}}}},"403":{"description":"Permission failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"details":{"nullable":true}},"required":["type","message"]}},"required":["error"]}}}},"502":{"description":"Upstream connection failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"details":{"nullable":true}},"required":["type","message"]}},"required":["error"]}}}},"503":{"description":"No upstream available","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"details":{"nullable":true}},"required":["type","message"]}},"required":["error"]}}}}}}},"/v1/openapi.json":{"get":{"tags":["Documentation"],"summary":"OpenAPI specification document","responses":{"200":{"description":"OpenAPI specification","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"nullable":true}}}}}}}},"/v1/docs":{"get":{"tags":["Documentation"],"summary":"Swagger UI documentation","responses":{"301":{"description":"Redirects to the Swagger UI page at /v1/docs/"}}}},"/robots.txt":{"get":{"tags":["Discovery"],"summary":"Robots directives for crawlers","responses":{"200":{"description":"robots.txt directives","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/sitemap.xml":{"get":{"tags":["Discovery"],"summary":"Sitemap for search and AI discovery","responses":{"200":{"description":"XML sitemap","content":{"application/xml":{"schema":{"type":"string"}}}}}}},"/llms.txt":{"get":{"tags":["Discovery"],"summary":"LLM-oriented summary and canonical links","responses":{"200":{"description":"LLM discovery document","content":{"text/plain":{"schema":{"type":"string"}}}}}}}}}