Embeddings with Meridian
Convert text into dense vector representations. One endpoint, sub‑10ms latency, dimensions from 256 to 3072.
POST
/v1/embeddings| Parameter | Type | Required |
|---|---|---|
| model | string | yes |
| input | string | string[] | yes |
| encoding_format | float | base64 | no |
| dimensions | integer | no |
Python
import requests
resp = requests.post(
"https://api.meridian.ai/v1/embeddings",
headers={"Authorization": "Bearer $MERIDIAN_KEY"},
json={
"model": "meridian-embed-v3",
"input": "The quick brown fox",
"encoding_format": "float",
"dimensions": 1536,
},
)
print(resp.json()["data"][0]["embedding"])cURL
curl https://api.meridian.ai/v1/embeddings \
-H "Authorization: Bearer $MERIDIAN_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "meridian-embed-v3",
"input": "The quick brown fox",
"encoding_format": "float",
"dimensions": 1536
}'Response
{
"object": "list",
"data": [
{
"object": "embedding",
"index": 0,
"embedding": [0.0023, -0.0091, ...]
}
],
"model": "meridian-embed-v3",
"usage": { "prompt_tokens": 4, "total_tokens": 4 }
}