# Embeddings

*Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.*

#### *Create embeddings*

*Creates an embedding vector representing the input text.*

{% code title="Example request" lineNumbers="true" %}

```
curl https://api.eye-ai.com/v1/embeddings \
  -X POST \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input": "The food was delicious and the waiter...",
       "model": "text-similarity-babbage-001"}'

```

{% endcode %}

{% code title="Parameters" lineNumbers="true" %}

```
{
  "model": "text-similarity-babbage-001",
  "input": "The food was delicious and the waiter..."
}

```

{% endcode %}

{% code title="Response" lineNumbers="true" %}

```
{
  "object": "list",
  "data": [
    {
      "object": "embedding",
      "embedding": [
        0.018990106880664825,
        -0.0073809814639389515,
        .... (1024 floats total for ada)
        0.021276434883475304,
      ],
      "index": 0
    }
  ],
  "usage": {
    "prompt_tokens": 8,
    "total_tokens": 8
  }
}

```

{% endcode %}

\ <br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://eye-ai.gitbook.io/eye-ai/overview/introduction-of-the-eye-ai-api/embeddings.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
