# Embeddings
Source: https://docs.simpleserve.ai/docs/text/embeddings
Summary: OpenAI-compatible embeddings from Qwen3 Embedding. Float or base64 output.
Availability: available
Last reviewed: 2026-08-25

## Create embeddings

**Python**

```python
from openai import OpenAI

client = OpenAI(base_url="https://api.simpleserve.ai/openai/v1", api_key="ss_live_your_key")

r = client.embeddings.create(model="qwen3-embedding-0.6b", input=["Every model.", "One API."])
print(len(r.data[0].embedding), r.usage.total_tokens)
```

**JavaScript**

```ts
const r = await client.embeddings.create({ model: "qwen3-embedding-0.6b", input: ["Every model.", "One API."] });
console.log(r.data[0].embedding.length, r.usage.total_tokens);
```

**cURL**

```bash
curl https://api.simpleserve.ai/openai/v1/embeddings \
  -H "Authorization: Bearer $SIMPLESERVE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "qwen3-embedding-0.6b", "input": ["Every model.", "One API."]}'
```

| Prop | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `model` | `string` | yes |  | qwen3-embedding-0.6b. |
| `input` | `string | string[]` | yes |  | One text or a list. |
| `encoding_format` | `"float" | "base64"` | no | `"float"` | Both supported. The SDKs default to base64. |
| `dimensions` | `integer` | no |  | Output dimensions, when the model supports truncation. |
| `user` | `string` | no |  | Your end-user id, for your own tracking. |

Batches accept `endpoint: "/openai/v1/embeddings"` as well. See [Batch](/docs/batch).

## Pricing

| Model | Model id | Price per 1M tokens |
| --- | --- | --- |
| Qwen3 Embedding 0.6B | `qwen3-embedding-0.6b` | $0.010 |
