{"openapi":"3.1.0","info":{"title":"Tenzro Labs model API","version":"1.0.0","description":"Call Tenzro Labs models with a Platform API key. Each model kind has its own endpoint; the Platform routes each call to a machine on the Tenzro Network that serves the model. Chat and embeddings are OpenAI-compatible."},"servers":[{"url":"https://api.tenzro.xyz/v1"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"A Platform API key (tzl_…) with the inference permission."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string"},"code":{"type":"string"}}}}}}},"paths":{"/models":{"get":{"summary":"Models serving now","description":"Each model with its kind, endpoint and the machines it runs on. No key needed.","operationId":"listModels","security":[],"responses":{"200":{"description":"OK"}}}},"/chat/completions":{"post":{"summary":"Chat with a language model","operationId":"createChatCompletion","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","messages"],"properties":{"model":{"type":"string","examples":["qwen3.5-4b"]},"messages":{"type":"array","items":{"type":"object","required":["role","content"],"properties":{"role":{"type":"string"},"content":{}}}},"stream":{"type":"boolean"},"max_tokens":{"type":"integer","minimum":1},"temperature":{"type":"number"},"tools":{"type":"array","items":{"type":"object"}},"enable_thinking":{"type":"boolean","description":"Reasoning models: think before answering. Off by default."},"machine":{"type":"string","description":"Where to run the model. Default: tenzro-partner-cluster."}}}}}},"responses":{"200":{"description":"An OpenAI chat completion, or an event stream when stream is true."},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/embeddings":{"post":{"summary":"Embed texts","operationId":"createEmbedding","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","input"],"properties":{"model":{"type":"string","examples":["qwen3-embedding-0.6b"]},"input":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"},"maxItems":256}]},"dimensions":{"type":"integer","minimum":1},"input_type":{"type":"string","enum":["document","query"]},"machine":{"type":"string","description":"Where to run the model. Default: tenzro-partner-cluster."}}}}}},"responses":{"200":{"description":"An OpenAI embeddings list; vectors are unit length."},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/forecasts":{"post":{"summary":"Forecast a time series","operationId":"createForecast","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","history","horizon"],"properties":{"model":{"type":"string","examples":["timesfm-2.5-200m"]},"history":{"type":"array","items":{"type":"number"},"minItems":2},"horizon":{"type":"integer","minimum":1},"quantiles":{"type":"array","items":{"type":"number","exclusiveMinimum":0,"exclusiveMaximum":1}},"frequency_seconds":{"type":"integer","minimum":1},"machine":{"type":"string","description":"Where to run the model. Default: tenzro-partner-cluster."}}}}}},"responses":{"200":{"description":"The forecast","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"forecast"},"model":{"type":"string"},"history_used":{"type":"integer"},"point":{"type":"array","items":{"type":"number"}},"quantile_levels":{"type":"array","items":{"type":"number"}},"quantiles":{"type":"array","items":{"type":"array","items":{"type":"number"}}},"generation_time_ms":{"type":["integer","null"]}}}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/images/generations":{"post":{"summary":"Generate an image","description":"Answers 503 no_capacity while no image model is serving.","operationId":"createImage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","prompt"],"properties":{"model":{"type":"string"},"prompt":{"type":"string"},"machine":{"type":"string","description":"Where to run the model. Default: tenzro-partner-cluster."}}}}}},"responses":{"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}