Skip to content

Embeddings

POST /<lane>/v1/embeddings — the OpenAI Embeddings shape. On /oss//hf this routes to the Hugging Face feature-extraction task under the hood (the HF OpenAI-compatible /v1 surface is chat-only), normalized back to the OpenAI response shape.

Terminal window
curl "https://api.opengateway.one/oss/v1/embeddings" \
-H "Authorization: Bearer $OPENGATEWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "Qwen/Qwen3-Embedding-0.6B",
"input": ["hello world", "edge ai gateway"]
}'
{
"object": "list",
"data": [
{ "object": "embedding", "index": 0, "embedding": [0.0123, -0.0456, "..."] },
{ "object": "embedding", "index": 1, "embedding": [0.0789, -0.0011, "..."] }
],
"model": "Qwen/Qwen3-Embedding-0.6B",
"usage": { "prompt_tokens": 6, "total_tokens": 6 }
}

Requesting a non-embedding model here returns 422 model_task_mismatch. Pick an embedding-capable model (see GET /<lane>/v1/models).