Request
from openai import OpenAI
client = OpenAI(
base_url="https://gateway.vlm.run/v1/openai",
api_key="<VLMRUN_API_KEY>",
)
response = client.embeddings.create(
model="qwen/qwen3-vl-embedding-2b",
input="Extract a vector representation for this text.",
)
print(len(response.data[0].embedding))
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://gateway.vlm.run/v1/openai",
apiKey: process.env.VLMRUN_API_KEY,
});
const response = await client.embeddings.create({
model: "qwen/qwen3-vl-embedding-2b",
input: "Extract a vector representation for this text.",
});
console.log(response.data[0].embedding.length);
vlmrun gw embed -t "Extract a vector representation for this text." \
-m qwen/qwen3-vl-embedding-2b
curl https://gateway.vlm.run/v1/openai/embeddings \
-X POST \
-H "Authorization: Bearer $VLMRUN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen/qwen3-vl-embedding-2b",
"input": "Extract a vector representation for this text."
}'