{"openapi":"3.1.0","info":{"title":"nexie-models","description":"Sentence-embedding service for nexie-ce. Internal; not exposed to the public internet.","version":"3170ff400e9fb149611850abf00c33d7e84c7d66"},"paths":{"/api/v1/embeddings":{"post":{"tags":["Embeddings"],"summary":"Embed texts","description":"Encode the texts in one model call and return the mean of their vectors.","operationId":"embed_api_v1_embeddings_post","parameters":[{"name":"x-internal-key","in":"header","required":true,"schema":{"type":"string","title":"X-Internal-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbedRequest"}}}},"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","description":"Texts to embed, as given (no chunking). The response carries one vector: a lone text's embedding, or the mean of all the texts' embeddings."}},"type":"object","required":["texts"],"title":"EmbedRequest"},"EmbedResponse":{"properties":{"model":{"type":"string","title":"Model"},"revision":{"type":"string","title":"Revision","description":"Hub commit hash the vector was produced with (pinned in model.lock)."},"dimension":{"type":"integer","title":"Dimension"},"embeddings":{"items":{"type":"number"},"type":"array","title":"Embeddings","description":"One vector for the request: the element-wise mean of the input texts' embeddings."}},"type":"object","required":["model","revision","dimension","embeddings"],"title":"EmbedResponse"},"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"}}}}