# Embeddings

> Vector embeddings for text, OpenAI-compatible shape.

Source: http://localhost:3000/docs/endpoints/embeddings

## Embeddings: `POST /v1/embeddings/`

Dense vectors for one or many inputs; one credit per input. Cost: 1 credit / input.

```bash
curl -X POST https://api.hushsearch.io/v1/embeddings/ \
  -H "X-API-Key: hs_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": [
    "reciprocal rank fusion",
    "hybrid search"
  ]
}'
```

Returns one embedding per input, in the same response shape as OpenAI's embeddings API, so existing clients work with a base-URL change.

## Parameters

| Field | Type | Notes |
|---|---|---|
| `input` | string or string[] | **Required.** Text to embed. |
| `model` | string | Optional model name; the server default is used when omitted. |

## Response

```json
{
  "object": "list",
  "model": "…",
  "data": [{ "object": "embedding", "index": 0, "embedding": [0.0123, -0.0441, …] }],
  "usage": { "prompt_tokens": 12, "total_tokens": 12 },
  "credits_used": 1,
  "credits_remaining": 499,
  "response_time_ms": 85
}
```

Costs 1 credit per input string.
