> ## Documentation Index
> Fetch the complete documentation index at: https://developers.remeinium.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# /get_embedding

> Get the embedding vector for a Sinhala word.

<Tabs>
  <Tab title="Python">
    **Python example:**

    ```python theme={null}
    from gradio_client import Client

    client = Client("Remeinium/Embedding_Siyabasa")
    result = client.predict(
        word="අම්මා",
        api_name="/get_embedding"
    )
    print(json.dumps(result, indent=4))
    ```
  </Tab>

  <Tab title="Javascript">
    1. Install the javascript client ([<u>gradio docs</u>](https://www.gradio.app/guides/getting-started-with-the-js-client)) if you don't already have it installed.

    ```javascript theme={null}
    $ npm i -D @gradio/client
    ```

    2. Here's your first API call.

    ```javascript theme={null}
    import { Client } from "@gradio/client";
    	
    	const client = await Client.connect("Remeinium/Embedding_Siyabasa");
    	const result = await client.predict("/get_embedding", { 		
    			word: "අම්මා", 
    	});

    	console.log(result.data);
    ```
  </Tab>

  <Tab title="cURL">
    1. Confirm that you have cURL installed on your system.

    ```bash theme={null}
    $ curl --version
    ```

    2. Your first API call

    ```bash theme={null}
    curl -X POST https://remeinium-embedding-siyabasa.hf.space/gradio_api/call/get_embedding -s -H "Content-Type: application/json" -d '{
    	"data": ["අම්මා"]}' \
    	| awk -F'"' '{ print $4}'  \
    	| read EVENT_ID; curl -N https://remeinium-embedding-siyabasa.hf.space/gradio_api/call/get_embedding/$EVENT_ID
    ```
  </Tab>
</Tabs>

**Response format:**

```json theme={null}
{
    "text": "අම්මා",
    "embedding": [0.123, -0.456, 0.789, ...],
    "dimensions": 300,
    "model": "UgannA_SiyabasaV2",
    "language": "Sinhala"
}
```

#### **Accepts 1 parameter:**

* `word` : `string`  *<u>\*Required</u>*
* The input value that is provided in the "Sinhala Word" Textbox component.

#### **Returns 1 element**

* `str | float | bool | list | dict`
* The output value that appears in the "Embedding Vector" Json component.
