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

# 4. Compute embeddings

> Turn text into a vector with an embedding-class model.

Embeddings turn text into a fixed-length numeric vector so you can do similarity search, clustering, or reranking outside the platform. If you want retrieval handled for you, skip ahead — [Knowledge Bases](/guides/api-walkthrough/knowledge-bases) manages embedding, indexing, and retrieval end-to-end.

## Send a request

OpenAI-compatible shape. Use one of the embedding model ids from the previous step.

```bash theme={null}
curl -X POST {BASE_URL}/v1/embeddings \
  -H "Authorization: Bearer $PAT" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "'$EMBED_MODEL'",
    "input": "co-mind.ai is a private AI platform"
  }'
```

```json theme={null}
{
  "object": "list",
  "data": [
    {
      "object": "embedding",
      "index": 0,
      "embedding": [0.012, -0.087, 0.034, "..."]
    }
  ],
  "model": "nomic-embed-text",
  "usage": { "prompt_tokens": 8, "total_tokens": 8 }
}
```

Vector length depends on the model — `nomic-embed-text` returns 768 floats, other models are different. The `data[0].embedding` array is what you feed into your vector store.

<Tip>
  Batch multiple inputs in one call by sending `"input": ["text one", "text two", "text three"]`. Each input gets its own entry in `data[]`, matched by `index`.
</Tip>

Next: [Chat completions →](/guides/api-walkthrough/chat-completions)
