Embeddings — API Reference
Package: dodil.ignite.v1 · Service: ModelService
Turn text (or images) into vectors. The HTTP surface is OpenAI-compatible: the path is the top-level /v1/embeddings (not under /v1/ignite/), and the JSON body matches the OpenAI Embeddings request exactly — encoding_format, dimensions, and the rest stay snake_case on both HTTP and gRPC. Use the OpenAI SDK directly: see Using OpenAI & Cohere SDKs and the Model Catalog.
Two fields go beyond the OpenAI shape: dimensions truncates the vector for Matryoshka -trained models, and task_type lets the model specialize the embedding for retrieval, similarity, classification, and similar workloads.
| RPC | HTTP | streaming |
|---|---|---|
Embed | POST /v1/embeddings | unary |
gRPC reaches the method at dodil.ignite.v1.ModelService/Embed on $IGNITE_GRPC. See Conventions → Using gRPC for grpcurl setup. Both transports use the same OpenAI-native snake_case JSON body.
Embed
Request
input accepts a single string, an array of strings, or an array of content objects (each may carry an image_url) for multimodal models.
HTTP
curl -sS -X POST "https://api.dev.dodil.io/v1/embeddings" \
-H "Authorization: Bearer $DODIL_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"model": "jina-embeddings-v4",
"input": ["how do vector databases work?", "ANN index trade-offs"],
"encoding_format": "float",
"normalized": true,
"dimensions": 512,
"task_type": "RETRIEVAL_QUERY"
}'Response
HTTP
{
"object": "list",
"model": "jina-embeddings-v4",
"data": [
{ "object": "embedding", "index": 0, "embedding": [0.0123, -0.0456, 0.0789] },
{ "object": "embedding", "index": 1, "embedding": [0.0234, -0.0567, 0.0890] }
],
"usage": { "prompt_tokens": 14, "total_tokens": 14 }
}When encoding_format is "base64", each embedding is returned as a base64-encoded byte string of packed little-endian float32 instead of a JSON array.
See also
- Using OpenAI & Cohere SDKs — point an OpenAI client at this endpoint
- Model Catalog — embedding models, dimensions, and modalities
- Conventions — transport, auth, wire format