apixly.ai

Embedding — Vectors and ranking

Use a primary API key bound to the Embedding / Rerank group. GET /v1/models is authoritative for models available to this key; do not reuse an Audio or chat group key. Use bge-m3 for text embeddings when it is returned by your key.

2026-10-08 · GET /v1/models · Embedding / Rerank

GET /v1/models · Embedding / Rerank

  • Qwen3-VL-Embedding-8B
  • jina-embeddings-v4
  • Qwen3-Embedding-8B
  • Qwen3-Embedding-4B
  • Qwen3-Embedding-0.6B
  • all-mpnet-base-v2
  • bce-embedding-base_v1
  • bge-m3
  • bge-small-zh-v1.5
  • bge-large-zh-v1.5
bash
curl "https://apixly.ai/v1/models" -H "Authorization: Bearer YOUR_API_KEY"

Availability depends on the key and current route. jina-clip-v1 and jina-clip-v2 are compatibility entries, not currently advertised reachable routes; use them only if GET /v1/models explicitly returns them. A public price alone does not grant access.

Requests and counting

Embedding: a string or flat token-ID array is one input; a string array, nested token-ID arrays or multimodal object array counts outer entries. Each object counts once, including text plus image together. Rerank counts documents, not query or top_n. Sentence similarity counts inputs.sentences, not source_sentence. Nonempty inputs are required; embedding accepts up to 1000 entries and rerank/similarity up to 200 candidates. There is no 25-input request cap.

json
{
  "examples": [
    {
      "model": "Qwen3-Embedding-0.6B",
      "input": [
        1,
        2,
        3
      ]
    },
    {
      "model": "Qwen3-Embedding-0.6B",
      "input": [
        [
          1,
          2
        ],
        [
          3,
          4
        ]
      ]
    }
  ]
}

Parameters

Names may include a namespace, for example Qwen/Qwen3-Embedding-0.6B. Token IDs must be nonnegative integers. Only the four image models listed below accept image entries; URL/data URI support depends on the selected model. Qwen3 embedding dimensions are positive integers within each model's bound; omit dimensions for other models unless supported. Float is the default encoding; base64 contains little-endian IEEE 754 float32 values, not image data. Rerank results are sorted by relevance_score; index refers to the original documents array. top_n changes returned results, not billable candidate count; Qwen rerank instruction is optional.

Modeldimensions / image
Qwen3-Embedding-0.6B32–1024
Qwen3-Embedding-4B32–2560
Qwen3-Embedding-8B32–4096
all-mpnet-base-v2 · bce-embedding-base_v1768 (fixed)
bge-m31024 (fixed) · text only
bge-small-zh-v1.5 · bge-large-zh-v1.5512 / 1024 (fixed)
Qwen3-VL-Embedding-8B · jina-embeddings-v4 · jina-clip-v1 · jina-clip-v2text / image · 1024 / 2048 / 768 / 1024 (default dimensions)
bash
curl --max-time 120 "https://apixly.ai/v1/embeddings" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "Qwen3-VL-Embedding-8B",
  "input": [
    {
      "text": "A red apple"
    },
    {
      "image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR4nO3NsQ0AAAzCMP5/un0CNkuZ41wybXsHAAAAAAAAAAAAxR4yw/wuPL6QkAAAAABJRU5ErkJggg=="
    }
  ],
  "encoding_format": "float"
}'
python
import base64
import struct
import os
from openai import OpenAI

client = OpenAI(api_key=os.environ["API_KEY"], base_url="https://apixly.ai/v1", timeout=120, max_retries=0)
response = client.embeddings.create(
    model="Qwen3-Embedding-0.6B", input="Apples",
    dimensions=32, encoding_format="base64",
)
raw = base64.b64decode(response.data[0].embedding, validate=True)
vector = [value[0] for value in struct.iter_unpack("<f", raw)]
print(vector)

USD pricing

A request with 1–25 inputs costs $0.000036 per input for every model. With 26 or more, native token-metered models use actual reported tokens at the rates below; ONLY the six input-billed models use $0.00004 per input for 26+ requests. The gateway splits those calls into groups of at most 25 and combines results. These are different units, not a universal 10% increase. Group multipliers and customer discounts apply; the current model catalog is authoritative. Usage preserves original tokens: zero tokens does not mean a free customer request. X-Billable-Inputs and X-Billing-Unit show the count and billing unit.

all-mpnet-base-v2 /v1/sentence-similarity uses the default per-input price in both count ranges (currently $0.000036/input); its /v1/embeddings still uses actual tokens from 26 inputs. BGE/BCE similarity costs $0.00004/input from 26. Response headers X-Billable-Inputs and X-Billing-Unit identify this request's count and unit.

Model · 26+USD
Qwen3-Reranker-4B$0.08 / 1M tokens
Qwen3-Reranker-8B$0.17 / 1M tokens
Qwen3-VL-Embedding-8B$0.21 / 1M tokens
Qwen3-Embedding-0.6B / 4B / 8B · Qwen3-Reranker-0.6B · other token models$0.04 / 1M tokens
jina-clip-v1 · jina-clip-v2 · jina-embeddings-v4 · bge-reranker-large · bce-reranker-base_v1 · bge-reranker-v2-m3$0.00004 / input (26+)

Examples

Discover models first, then use a returned model identifier. Python embeddings uses the OpenAI SDK; rerank and sentence similarity use ordinary HTTP. The response vectors below are illustrative, not full model output.

bash
curl --max-time 120 "https://apixly.ai/v1/embeddings" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "Qwen3-Embedding-0.6B",
  "input": [
    "A document about fruit",
    "Apples and pears"
  ],
  "dimensions": 32,
  "encoding_format": "float"
}'
python
from openai import OpenAI
import os

client = OpenAI(api_key=os.environ["API_KEY"], base_url="https://apixly.ai/v1", timeout=120, max_retries=0)
response = client.embeddings.create(
    model="Qwen3-Embedding-0.6B", input=["Apples and pears"],
    dimensions=32, encoding_format="float",
)
print(response.data[0].index, response.data[0].embedding)

Responses

These are illustrative values, not real model vectors or scores. Rerank defaults top_n to 3; scores are finite numbers and are not guaranteed to be within 0–1. index refers to the original input/document. Additional fields such as metadata and return_documents are not uniformly supported; do not rely on them across models. Raw usage may use promptTokens/totalTokens; some adapted responses omit usage. Do not assume unified token fields. Use X-Billable-Inputs and X-Billing-Unit for the count and billing unit; similarity scores follow the input order.

json
{
  "object": "list",
  "model": "Qwen3-Embedding-0.6B",
  "data": [
    {
      "object": "embedding",
      "index": 0,
      "embedding": [
        0.1,
        -0.2,
        0.3
      ]
    }
  ],
  "usage": {
    "prompt_tokens": 7,
    "total_tokens": 7
  }
}

Errors and lifecycle

All three endpoints return nonstreaming JSON. Set a client timeout and cancel the HTTP request when no longer needed; cancellation cannot guarantee upstream work or costs stop. 400: invalid input/unsupported parameters; 401: invalid key; 403: wrong group or policy; 429: rate limit, respect Retry-After; 502: invalid/missing upstream output or paid token usage; 503: no account or missing pricing. Retry transient errors with bounded backoff; avoid duplicate retries after an uncertain response.