> ## Documentation Index
> Fetch the complete documentation index at: https://docs.refuseless.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Embeddings

> POST /v1/embeddings — OpenAI-compatible vectors where the model offers them.

# POST /v1/embeddings

OpenAI-compatible embeddings with the same keys and billing as the rest of
the API.

```
POST https://api.refuseless.com/v1/embeddings
```

Where the model supports embeddings, vectors are returned and usage is
billed at the catalog rate. Models without
embedding support return `404` `model_not_found` — nothing is billed.

## Request

| Field | Type | Required | Notes |
| - | - | - | - |
| `model` | string | Yes | Catalog id |
| `input` | string / array | Yes | Text (or array of texts) to embed |
| `encoding_format` | string | No | `float` (default) or `base64`, where supported |
| `dimensions` | number | No | Requested dimensions, where supported |
| `user` | string | No | Passed through |

## Response

```json theme={null}
{
  "object": "list",
  "data": [{ "object": "embedding", "index": 0, "embedding": [0.012, -0.44] }],
  "model": "glm-5.3-abliterated",
  "usage": { "prompt_tokens": 12, "total_tokens": 12 }
}
```

## Example

```bash theme={null}
curl https://api.refuseless.com/v1/embeddings \
  -H "Authorization: Bearer $REFUSELESS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "glm-5.3-abliterated",
    "input": "Write a tight system prompt."
  }'
```

## Errors

`400` missing `model`/`input` · `401` bad key · `402` out of credits ·
`404` unknown model or no embedding support on this model · `429`
busy/warming · `503` model unavailable.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.