Embeddings
POST /v1/embeddings: the OpenAI embeddings shape, served by
Qwen3 Embedding as
qwen3-embed. 1024-dimension vectors, €0.008 / 1M tokens.
Request & response
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"}'
$body = @{ model = 'qwen3-embed'; input = 'The invoice is due on Friday' } | ConvertTo-Json
$r = Invoke-RestMethod https://api.axforge.ai/v1/embeddings -Method Post `
-Headers @{ Authorization = "Bearer $env:AXFORGE_API_KEY" } `
-ContentType 'application/json' -Body $body
$r.data[0].embedding.Count # 1024
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.
import os
from openai import OpenAI
client = OpenAI(base_url="https://api.axforge.ai/v1", api_key=os.environ["AXFORGE_API_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",
],
)
for item in r.data:
print(item.index, len(item.embedding)) # 0 1024 · 1 1024 · 2 1024
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.axforge.ai/v1", apiKey: process.env.AXFORGE_API_KEY });
const r = await client.embeddings.create({
model: "qwen3-embed",
input: [
"The invoice is due on Friday",
"Payment terms are net 30",
"The meeting moved to Tuesday",
],
});
for (const item of r.data) console.log(item.index, item.embedding.length); // 0 1024 · 1 1024 · 2 1024
Specs
| Model | qwen3-embed |
|---|---|
| Dimensions | 1024 |
| Context | 32,768 tokens |
| Price | €0.008 / 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.