API
Embeddings
POST /v1/embeddings
Generates vector embeddings for the given text input. The request and response formats are identical to the OpenAI embeddings API.
Request
curl https://janus.neboloop.com/v1/embeddings \
-H "Authorization: Bearer $NEBO_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"model": "neboloop/nebo-embed-small",
"input": "The quick brown fox jumps over the lazy dog"
}'
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model |
string | Yes | Embedding model ID. See Available Models. |
input |
string or array | Yes | Text to embed. Can be a single string or array of strings. |
encoding_format |
string | No | "float" (default) or "base64". |
Response
{
"object": "list",
"data": [
{
"object": "embedding",
"index": 0,
"embedding": [0.0023, -0.0091, 0.0152, ...]
}
],
"model": "text-embedding-3-small",
"usage": {
"prompt_tokens": 9,
"total_tokens": 9
}
}
Available Models
| Nebo Model | Underlying Model | Dimensions | Use Case |
|---|---|---|---|
neboloop/nebo-embed-small |
text-embedding-3-small | 1536 | General purpose, lower cost |
neboloop/nebo-embed-large |
text-embedding-3-large | 3072 | Higher accuracy, larger vectors |
Both models are served via OpenAI's embedding API. The Nebo model names are mapped transparently — you can use either the Nebo name or the underlying OpenAI name.
Using with the OpenAI SDK
from openai import OpenAI
client = OpenAI(
base_url="https://janus.neboloop.com/v1",
api_key="<your-jwt-token>"
)
response = client.embeddings.create(
model="neboloop/nebo-embed-small",
input="Search query text"
)
embedding = response.data[0].embedding
print(f"Dimensions: {len(embedding)}")
Batch Embedding
response = client.embeddings.create(
model="neboloop/nebo-embed-small",
input=[
"First document to embed",
"Second document to embed",
"Third document to embed"
]
)
for item in response.data:
print(f"Index {item.index}: {len(item.embedding)} dimensions")
Headers
| Header | Required | Description |
|---|---|---|
Authorization |
Yes | Bearer <jwt-token> |
Content-Type |
Yes | application/json |
X-Bot-ID |
No | Application identifier for usage tracking. Defaults to "default". |
Next Steps
- Chat Completions — generate text responses
- Models — see all available chat models
- Usage & Limits — understand your budget