wylon
POST https://api.wylon.cn/v1/embeddings

Embeddings

Convert text into fixed-length vector representations for semantic search, similarity, clustering, RAG, and other downstream tasks.

Authorization

Authorizationstring · headerrequired
Bearer token. Create one in the dashboard.

Request body

modelstringrequired
Embedding model ID, e.g. BAAI/bge-large-zh, Qwen/Qwen3-Embedding. Full list in the model catalog.
inputstring · string[]required
Text to embed. Pass a single string or an array (up to 64 per request). Each item must fit within the model's context length.
encoding_formatenum"float"
Output format: "float" returns JSON float arrays; "base64" returns a compact Base64 byte string, useful for reducing payload size.
userstringoptional
End-user identifier for abuse monitoring.

Response

objectstring
Always list.
modelstring
The embedding model ID that actually served this request.
dataarray
One entry per input item, in the same order as input.
objectstring
Always embedding.
indexinteger
Index in the input array.
embeddingnumber[] · string
The vector itself; with encoding_format=base64 this is a Base64 string that you decode to a float array.
usageobject
Only prompt_tokens and total_tokens are reported (no generation tokens).
Example response
{
  "object": "list",
  "model": "BAAI/bge-large-zh",
  "data": [
    {
      "object": "embedding",
      "index": 0,
      "embedding": [-0.012, 0.034, 0.281, "…"]
    }
  ],
  "usage": { "prompt_tokens": 12, "total_tokens": 12 }
}

Bad request, authentication failure, or an exceeded rate limit.

Example — 400 input too long
{
  "error": {
    "type": "invalid_request_error",
    "message": "Input text exceeds model context length (max 8192 tokens)."
  }
}
沪ICP备2026010432号-1 沪公网安备31010402336632号