POST
/
v1
/
embeddings
curl -X POST https://api.example.com/v1/embeddings \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-embedding",
    "input": "Hello world"
  }'
{
  "object": "list",
  "data": [
    {
      "object": "embedding",
      "embedding": [0.1, 0.2, 0.3],
      "index": 0
    }
  ],
  "model": "claude-embedding",
  "usage": {
    "prompt_tokens": 2,
    "total_tokens": 2
  }
}
Create vector embedding representations of text using Claude models.

Request Parameters

model
string
required
The embedding model to use.
input
string | array
required
The input text to embed.

Response

object
string
The object type.
data
array
List of embedding data.
model
string
The model used.
usage
object
Usage statistics.
curl -X POST https://api.example.com/v1/embeddings \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-embedding",
    "input": "Hello world"
  }'
{
  "object": "list",
  "data": [
    {
      "object": "embedding",
      "embedding": [0.1, 0.2, 0.3],
      "index": 0
    }
  ],
  "model": "claude-embedding",
  "usage": {
    "prompt_tokens": 2,
    "total_tokens": 2
  }
}