# Create text embeddings POST /v1/a/adapters/llm/embeddings Select code sample ``` const url = 'https://example.com/v1/a/adapters/llm/embeddings'; const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: '{"engine":"open_ai","provider":"example","model":"example","input":["example"],"metadata":{"call_sid":"example","agent_sid":"example","automation_sid":"example","scenario_sid":"example","node_id":"example","account_sid":"example","target":"example","source":"example","is_test":true}}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ``` curl --request POST \ --url https://example.com/v1/a/adapters/llm/embeddings \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "engine": "open_ai", "provider": "example", "model": "example", "input": [ "example" ], "metadata": { "call_sid": "example", "agent_sid": "example", "automation_sid": "example", "scenario_sid": "example", "node_id": "example", "account_sid": "example", "target": "example", "source": "example", "is_test": true } }' ``` - /v1/a/adapters/llm/embeddings ## Permission This operation needs the permission [`llm:chat:manage`](https://docs.aiva.apifonica.com/concepts/roles-and-permissions/#llm-chat-manage). ## Authorizations - **[bearerAuth](https://docs.aiva.apifonica.com/api/account/#bearerauth)** ## Request Bodyrequired Media typeapplication/json object **engine** string Allowed values: open\_ai azure **provider** string **model** required string **input** required Array\ **metadata** object **call\_sid** string **agent\_sid** The agent the call runs under. string **automation\_sid** The automation that placed the call. Empty when no automation placed it. string **scenario\_sid** string **node\_id** string **account\_sid** string **target** Entity|intent|fallback|streaming string **source** Hermes|bff|ss|ids string **is\_test** boolean ## Responses ### 201 Created Media typeapplication/json object **embeddings** required Array\> ##### Examplegenerated ``` { "embeddings": [ [ 1 ] ] } ``` ### 400 Invalid request body or parameters Media typeapplication/json Canonical structured error emitted by the chat completion, chat stream and embeddings handlers (the shared `errorResponse` helper). `code` is an application error code (0 when unset); `status` mirrors the HTTP status. object **name** required string **message** required string **code** required integer **status** required integer ##### Examplegenerated ``` { "name": "example", "message": "example", "code": 1, "status": 1 } ``` ### 401 Unauthorized ### 403 Forbidden ### 502 Bad gateway (upstream adapter error)