Documentation Index
Fetch the complete documentation index at: https://docs.case.dev/llms.txt
Use this file to discover all available pages before exploring further.
curl -X POST https://api.case.dev/llm/v1/embeddings \
-H "Authorization: Bearer sk_case_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/text-embedding-3-small",
"input": "Plaintiff alleges negligence in post-operative care"
}'
{
"object": "list",
"data": [
{
"object": "embedding",
"index": 0,
"embedding": [-0.016, 0.022, -0.011, ...]
}
],
"model": "openai/text-embedding-3-small",
"usage": {
"prompt_tokens": 12,
"total_tokens": 12
}
}
Parameters
| Parameter | Type | Required | Description |
|---|
model | string | Yes | Embedding model ID |
input | string or array | Yes | Text(s) to embed |
Embedding models
| Model | Dimensions | Best for | $/1K tokens |
|---|
openai/text-embedding-3-small | 1536 | General purpose | $0.00002 |
openai/text-embedding-3-large | 3072 | Higher quality | $0.00013 |
voyage/voyage-law-2 | 1024 | Legal documents | $0.00012 |
voyage/voyage-3.5 | 1536 | General purpose | $0.00006 |
For legal documents, use voyage/voyage-law-2. It’s specifically trained on legal text.
Batch embeddings
Embed multiple texts in one request:
casedev llm:v1 create-embedding \
--model openai/text-embedding-3-small \
--input "Plaintiff alleges negligence in post-operative care"
Use cases
Semantic search
# 1. Embed your query
casedev llm:v1 create-embedding \
--model voyage/voyage-law-2 \
--input "negligence in surgical procedure"
# 2. Compare to document embeddings (cosine similarity)
# 3. Return most similar documents
Document similarity
# Compare two documents (embed each separately, then compute similarity)
casedev llm:v1 create-embedding \
--model voyage/voyage-law-2 \
--input "Plaintiff expert testimony on standard of care"
casedev llm:v1 create-embedding \
--model voyage/voyage-law-2 \
--input "Defense expert rebuttal on treatment protocols"
Tip: Use the same model for indexing and querying. Mixing models produces poor results.