# Embeddings


# Embeddings

`POST /v1/embeddings` — the OpenAI embeddings shape, served by
    Qwen3 Embedding as
    `qwen3-embed`. 1024-dimension vectors, €0.015 / 1M tokens.

## Request & response

    curl

```
$ curl https://api.axforge.ai/v1/embeddings \
  -H "Authorization: Bearer $AXFORGE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "qwen3-embed", "input": "The invoice is due on Friday"}'
```

```
PS> $body = @{ model = 'qwen3-embed'; input = 'The invoice is due on Friday' } | ConvertTo-Json
PS> $r = Invoke-RestMethod https://api.axforge.ai/v1/embeddings -Method Post `
    -Headers @{ Authorization = "Bearer $env:AXFORGE_API_KEY" } `
    -ContentType 'application/json' -Body $body
PS> $r.data[0].embedding.Count     # 1024
```

```
C:\> curl -s https://api.axforge.ai/v1/embeddings -H "Authorization: Bearer %AXFORGE_API_KEY%" -H "Content-Type: application/json" -d "{\"model\":\"qwen3-embed\",\"input\":\"The invoice is due on Friday\"}"
```

```
{
  "object": "list",
  "model": "qwen3-embed",
  "data": [{
    "object": "embedding",
    "index": 0,
    "embedding": [0.0132, -0.0417, ...]   // 1024 floats
  }],
  "usage": {"prompt_tokens": 7, "total_tokens": 7}
}
```

## Batching

Pass `input` as an array of strings to embed many texts in one
    request. You get one vector per item; `index` matches the input
    position.

    Python

```
from openai import OpenAI

client = OpenAI(
    base_url="https://api.axforge.ai/v1",
    api_key="YOUR_AXFORGE_KEY",
)
r = client.embeddings.create(
    model="qwen3-embed",
    input=[
        "The invoice is due on Friday",
        "Payment terms are net 30",
        "The meeting moved to Tuesday",
    ],
)
vectors = [d.embedding for d in r.data]   # three lists of 1024 floats
```

## Specs

        | Model | qwen3-embed |  |

        | Dimensions | 1024 |  |

        | Context | 32,768 tokens |  |

        Price | €0.015 / 1M tokens |  |

Store the vectors in any vector database; cosine similarity is the usual
    distance. All input is processed with
    zero retention, like every endpoint here.

      &larr; Chat completions
      Image generation & editing &rarr;



Source: https://axforge.ai/docs/embeddings/
