# Embeddings

## Generates embeddings (vector representations) for the provided text input.

> Converts the provided text into numerical vector representations (embeddings) for semantic analysis, similarity search, and machine learning applications.

```json
{"openapi":"3.0.4","info":{"title":"Inference API","version":"v1"},"servers":[{"url":"https://api.{tenant}.{region}.jylo.ai","variables":{"tenant":{"default":"example","description":"Tenant name"},"region":{"default":"uk","description":"Region","enum":["uk","us","eu","au","jp"]}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Bearer authentication with JWT","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Jylo.Toolkit.Entities.ChatCompletion.Embeddings.EmbeddingsRequest":{"required":["input"],"type":"object","properties":{"input":{"type":"string","nullable":true},"dimensions":{"type":"integer","format":"int32","nullable":true}},"additionalProperties":false},"Jylo.Toolkit.Entities.ChatCompletion.Embeddings.Embeddings":{"type":"object","properties":{"object":{"type":"string","nullable":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.Entities.ChatCompletion.Embeddings.EmbeddingsResult"},"nullable":true},"model":{"type":"string","nullable":true},"usage":{"$ref":"#/components/schemas/Jylo.Toolkit.Entities.ChatCompletion.Embeddings.EmbeddingsUsage"}},"additionalProperties":false},"Jylo.Toolkit.Entities.ChatCompletion.Embeddings.EmbeddingsResult":{"type":"object","properties":{"object":{"type":"string","nullable":true},"index":{"type":"integer","format":"int32"},"embedding":{"type":"array","items":{"type":"number","format":"float"},"nullable":true}},"additionalProperties":false},"Jylo.Toolkit.Entities.ChatCompletion.Embeddings.EmbeddingsUsage":{"type":"object","properties":{"prompt_tokens":{"type":"integer","format":"int32"},"total_tokens":{"type":"integer","format":"int32"}},"additionalProperties":false},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/inference/embeddings":{"post":{"tags":["Embeddings"],"summary":"Generates embeddings (vector representations) for the provided text input.","description":"Converts the provided text into numerical vector representations (embeddings) for semantic analysis, similarity search, and machine learning applications.","requestBody":{"description":"The embeddings request containing the text to be vectorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.Entities.ChatCompletion.Embeddings.EmbeddingsRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.Entities.ChatCompletion.Embeddings.EmbeddingsRequest"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.Entities.ChatCompletion.Embeddings.EmbeddingsRequest"}}}},"responses":{"200":{"description":"Successfully generated embeddings for the input text","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.Entities.ChatCompletion.Embeddings.Embeddings"}}}},"400":{"description":"Invalid request - missing input text, token limit exceeded, or balance update failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"402":{"description":"Insufficient credits to process the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"404":{"description":"Configured embeddings model not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"500":{"description":"Internal server error during embeddings generation"}}}}}}
```
