Carrot LabsCarrot Docs
API Reference

Embeddings

POST /v1/embeddings

POST /v1/embeddings

OpenAI-compatible embeddings endpoint.

Request

FieldTypeRequiredDescription
modelstringYesYour Carrot model name
inputstring | string[]YesText to embed (single string or array)

Example

curl https://api.carrotlabs.ai/v1/embeddings \
  -H "Authorization: Bearer sk-..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "my-embedding-model",
    "input": "Hello world"
  }'

Batch embeddings

curl https://api.carrotlabs.ai/v1/embeddings \
  -H "Authorization: Bearer sk-..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "my-embedding-model",
    "input": ["Hello world", "Goodbye world"]
  }'

Errors

StatusMeaning
401Invalid or missing API key
404Model not found
502Inference provider temporarily unavailable

On this page