{"openapi":"3.1.0","info":{"title":"Embedding Inference Server","version":"0.1.0"},"paths":{"/health":{"get":{"summary":"Health","description":"Readiness probe.\n\nReturns 200 when the model is loaded and the batch worker is alive, otherwise 503,\nplus live queue/in-flight numbers for quick operational visibility.","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/metrics":{"get":{"summary":"Metrics","description":"Same snapshot as /health, always 200 so scrapes are not treated as probe failures.","operationId":"metrics_metrics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/embed":{"post":{"summary":"Embed Endpoint","description":"Generate embeddings for input texts.\n\nttft_ms is enqueue -> encode start (queue wait + batch collection). ttfr_ms is\nenqueue -> embeddings ready. Input validation failures return 422 (handled by\nPydantic). Under load the batcher may reject with 503 (queue full) or 504 (timeout);\nunexpected inference errors return a sanitized 500 (the traceback is logged\nserver-side, not leaked to the client).","operationId":"embed_endpoint_embed_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbedRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"EmbedRequest":{"properties":{"texts":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Texts"}},"type":"object","required":["texts"],"title":"EmbedRequest","description":"Request body for the /embed endpoint.\n\nLimits are configurable in app/config.py; the validator reads them at call time so\nenv overrides take effect. FastAPI surfaces validation failures as 422 responses.\n- texts must be a non-empty list (at most settings.max_texts_per_request items)\n- each text must be non-empty and at most settings.max_chars_per_text characters"},"EmbedResponse":{"properties":{"embeddings":{"items":{"items":{"type":"number"},"type":"array"},"type":"array","title":"Embeddings"},"dim":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Dim"},"num_texts":{"type":"integer","title":"Num Texts"},"ttft_ms":{"type":"number","title":"Ttft Ms"},"ttfr_ms":{"type":"number","title":"Ttfr Ms"}},"type":"object","required":["embeddings","dim","num_texts","ttft_ms","ttfr_ms"],"title":"EmbedResponse","description":"Response body for the /embed endpoint."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}