POST https://51kik.com/v1/embeddings
Generate embedding vectors for text. Shape follows the OpenAI Embeddings API.
Authentication
Authorization: Bearer YOUR_API_KEY
Request body
| Field | Required | Description |
|---|---|---|
model | yes | Catalog id for an embedding-capable model |
input | yes | String or array of strings |
encoding_format | no | float (default) or base64 |
dimensions | no | Reduced dimensions when upstream supports |
user | no | Optional end-user id |
extra_body | no | Gateway extension: JSON merged into upstream extra_body (OpenAI-compatible routes) |
Limit: JSON body up to 32 MB.
Other top-level fields may pass through when allowed.
Example
curl -sS "https://51kik.com/v1/embeddings" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "YOUR_EMBEDDING_MODEL_ID",
"input": ["hello world", "routerbrain"]
}'
Response
OpenAI-shaped: data[] with embedding and index, plus model and usage.
Errors
| Status | Typical cause |
|---|---|
| 400 | Model does not support embeddings, invalid body |
| 401 | Invalid key |
| 403 | Model denied or balance |
| 429 | Rate limit |
See Errors.
SDK
embeddings.* on @routerbrain/sdk is not implemented — use this HTTP endpoint.