Viro API

Embeddings

POST https://api.viro.app/v1/embeddings — same shape as OpenAI's Embeddings API. Billed on input tokens only (no output tokens for embeddings). See Models for embedding model slugs and pricing.

Single input
curl https://api.viro.app/v1/embeddings \
  -H "Authorization: Bearer $VIRO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "viro/qwen3-embedding-8b",
    "input": "The quick brown fox jumps over the lazy dog."
  }'
from openai import OpenAI

client = OpenAI(api_key="viro_sk_live_...", base_url="https://api.viro.app/v1")

response = client.embeddings.create(
    model="viro/qwen3-embedding-8b",
    input="The quick brown fox jumps over the lazy dog.",
)
print(response.data[0].embedding)  # list[float]
print(response.usage.prompt_tokens)
Batching multiple inputs

Pass an array to embed multiple strings in a single request — one embedding is returned per input, in order.

response = client.embeddings.create(
    model="viro/qwen3-embedding-8b",
    input=["first document", "second document", "third document"],
)
for item in response.data:
    print(item.index, len(item.embedding))