{"openapi":"3.1.0","info":{"title":"Strix API","version":"1.0.0","description":"User-facing model routing API. All core endpoints require a Strix API key."},"servers":[{"url":"https://api.strixgate.dev"}],"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"paths":{"/v1/models":{"get":{"summary":"List virtual models","responses":{"200":{"description":"OpenAI-compatible authenticated model list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelList"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/v1/chat/completions":{"post":{"summary":"Create an OpenAI-compatible chat completion","description":"Set stream=true for an SSE response. Routing headers are available when the browser is allowed to expose them; streaming consumers must parse complete SSE events rather than individual network chunks.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequest"}}}},"responses":{"200":{"description":"Chat completion or text/event-stream when streaming","headers":{"x-strix-lane":{"schema":{"type":"string"}},"x-strix-reason":{"schema":{"type":"string"}},"x-strix-request-id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object"}},"text/event-stream":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/messages":{"post":{"summary":"Create an Anthropic-compatible message","description":"Set stream=true for translated Anthropic SSE events. max_tokens must be positive.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicRequest"}}}},"responses":{"200":{"description":"Anthropic message or text/event-stream when streaming","content":{"application/json":{"schema":{"type":"object"}},"text/event-stream":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/v1/me":{"get":{"summary":"Get authenticated identity","responses":{"200":{"description":"Current identity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Identity"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/v1/usage":{"get":{"summary":"Get account usage","responses":{"200":{"description":"Current account usage report","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"Strix API key"},"apiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"}},"responses":{"BadRequest":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limit exceeded","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Message":{"type":"object","required":["role","content"],"properties":{"role":{"type":"string","enum":["system","user","assistant","tool"]},"content":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object","additionalProperties":true}}]}}},"ChatRequest":{"type":"object","required":["model","messages"],"properties":{"model":{"type":"string","example":"strix-auto"},"messages":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/Message"}},"max_tokens":{"type":"integer","minimum":1},"temperature":{"type":"number"},"stream":{"type":"boolean","default":false}},"additionalProperties":true},"AnthropicRequest":{"type":"object","required":["model","messages","max_tokens"],"properties":{"model":{"type":"string","example":"strix-coding"},"messages":{"type":"array","minItems":1,"items":{"type":"object","required":["role","content"],"properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object","additionalProperties":true}}]}}}},"max_tokens":{"type":"integer","minimum":1},"system":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"temperature":{"type":"number"},"stream":{"type":"boolean","default":false}},"additionalProperties":true},"ModelList":{"type":"object","required":["object","data"],"properties":{"object":{"const":"list"},"data":{"type":"array","items":{"type":"object","additionalProperties":true}}}},"Identity":{"type":"object","required":["user_id","name","connected"],"properties":{"user_id":{"type":"string"},"name":{"type":"string"},"email":{"type":["string","null"]},"username":{"type":["string","null"]},"key_id":{"type":["string","null"]},"key_scope":{"type":"string"},"team_id":{"type":["string","null"]},"connected":{"type":"boolean"},"created_at":{"type":"string"}}},"Error":{"type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string"},"code":{"type":["string","null"]}}}}}}}}