---
title: "Embeddings"
method: POST
path: "/embeddings"
tags: ["embeddings"]
---

# Embeddings

`POST /embeddings`

Follows the exact same API spec as `OpenAI's Embeddings API https://platform.openai.com/docs/api-reference/embeddings`

```bash
curl -X POST http://localhost:4000/v1/embeddings 
-H "Content-Type: application/json" 
-H "Authorization: Bearer sk-1234" 
-d '{
    "model": "text-embedding-ada-002",
    "input": "The quick brown fox jumps over the lazy dog"
}'
```

## Request body

- object
  - `model` string, required
  - `input` string[]
  - `timeout` integer
  - `api_base` string, nullable
  - `api_version` string, nullable
  - `api_key` string, nullable
  - `api_type` string, nullable
  - `caching` boolean
  - `user` string, nullable
  - `custom_llm_provider` union
    - string
    - object
  - `litellm_call_id` string, nullable
  - `litellm_logging_obj` object, nullable
  - `logger_fn` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/flock/apis/litellm-api.md) · [All operations](https://skmtc.net/flock/apis/litellm-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/flock/litellm-api/revisions/8fbaab4fc7c5/schema)
