API console
POST/v1/embeddings
Bash
curl https://spro.hridaai.com/v1/embeddings \ -H "Content-Type: application/json" \ -H "Authorization: Bearer spro-xxxxxxxxxxxxxxxx" \ -d '{ "model": "text-embedding-3-small", "input": "The quick brown fox jumps over the lazy dog" }'JSON
{ "object": "list", "data": [ { "object": "embedding", "index": 0, "embedding": [0.0023064255, -0.009327292, 0.015797942, "..."] } ], "model": "text-embedding-3-small", "usage": { "prompt_tokens": 9, "total_tokens": 9 }}POST https://spro.hridaai.com/v1/embeddings
Creates an embedding vector representing the input text. OpenAI-compatible — use the OpenAI SDK with the Spro base URL. Non-streaming only.
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Required | Embedding model ID, provider-prefixed — e.g. text-embedding-3-small, google/text-embedding-004. |
input | string, array of strings, or token array | Required | Text to embed. A single string, a list of strings (batch), or encoded token arrays. Token arrays hold no text and are not scanned by guardrails. |
dimensions | integer | Optional | The number of dimensions the resulting output embeddings should have (supported models only). |
encoding_format | string | Optional | The format of the embeddings — float (default) or base64. |
user | string | Optional | A unique identifier representing your end user. |
Sampling parameters (temperature, top_p, penalties) are meaningless for embeddings and are stripped before the upstream call.
Guardrails
Input guardrails scan the string inputs before the upstream call; the returned vectors are not text, so the output pass logs usage only. A blocked input returns 403 Forbidden:
{ "error": { "message": "Request blocked by guardrail: sensitive_information_disclosure", "type": "guardrail_block", "code": "GUARDRAIL_BLOCKED" }}