models/Alibaba/Qwen3-Rerank
Alibaba

Qwen3-Rerank

rerank
Compare
MODALITIES
embedding
INPUT
$0.100 /1M
OUTPUT
$0 /1M
RELEASED
2026-01-27

Qwen3-Rerank (alibaba/qwen3-rerank) is a rerank model from Alibaba, released 2026-01-27. Context window: — tokens; max output —. Pricing via AIgateway: input $0.100/M tokens, output $0/M tokens. Call it via https://api.aigateway.sh/v1/rerank — set model="alibaba/qwen3-rerank".

model · alibaba/qwen3-rerank

Use this model

model: alibaba/qwen3-rerank
curl https://api.aigateway.sh/v1/rerank \
  -H "Authorization: Bearer $AIGATEWAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"alibaba/qwen3-rerank","query":"weather","documents":["sun is bright","mars is red"]}'

Capabilities

Strengths

  • Relevance scoring
  • Two-stage retrieval

Pricing

Input$0.100 / 1M tokens
Output$0 / 1M tokens
You pay pass-through pricing.
See API example →CompareAPI referenceSee usage ranking →

Collections

More embedding models →More from Alibaba →Frontier models →Free-tier models →
API schema

Call Qwen3-Rerank from any OpenAI SDK

POST https://api.aigateway.sh/v1/rerank·Content-Type: application/json·Auth: Bearer sk-aig-...

Request body

json
{
  "model": "alibaba/qwen3-rerank",
  "query": "What is the capital of France?",
  "documents": [
    "Paris is the capital of France.",
    "Berlin is the capital of Germany.",
    "The Eiffel Tower is in Paris."
  ],
  "top_n": 3
}

Response

json
{
  "model": "alibaba/qwen3-rerank",
  "results": [
    { "index": 0, "document": "Paris is the capital of France.", "score": 0.98 },
    { "index": 2, "document": "The Eiffel Tower is in Paris.", "score": 0.71 },
    { "index": 1, "document": "Berlin is the capital of Germany.", "score": 0.04 }
  ]
}

Quickstart

import os, requests

r = requests.post(
    "https://api.aigateway.sh/v1/rerank",
    headers={"Authorization": f"Bearer {os.environ['AIGATEWAY_API_KEY']}"},
    json={
        "model": "alibaba/qwen3-rerank",
        "query": "What is the capital of France?",
        "documents": [
            "Paris is the capital of France.",
            "Berlin is the capital of Germany."
        ]
    },
)
print(r.json())

Errors

401authentication_errorInvalid or missing API key
402insufficient_creditsWallet empty (PAYG only)
404not_foundUnknown model or endpoint
429rate_limit_errorOver per-minute limit — see Retry-After header
500server_errorUpstream provider failed (retryable)
503service_unavailableUpstream saturated (retryable)
Full docs →API reference →OpenAPI spec →llms.txt →

Frequently asked questions

What is Qwen3-Rerank?
It is a rerank model from Alibaba, accessible via AIgateway's OpenAI-compatible API at slug alibaba/qwen3-rerank.
How much does Qwen3-Rerank cost via AIgateway?
Input costs $0.100 per 1M tokens; output costs $0.000 per 1M tokens, billed pass-through.
How do I call Qwen3-Rerank from my code?
Point the OpenAI SDK at https://api.aigateway.sh/v1 with your AIgateway key and set model to "alibaba/qwen3-rerank". The request and response shapes match OpenAI exactly.
Does Qwen3-Rerank support streaming, tool calling, vision, and JSON mode?
Streaming — no. Tool calling — no. Vision — no. JSON mode — no. Prompt caching — no.
What are the best use cases for Qwen3-Rerank?
Key strengths: Relevance scoring; Two-stage retrieval.
Can I bring my own Alibaba API key (BYOK)?
Yes. Attach a Alibaba key in your AIgateway dashboard and this model flips to pass-through — you pay Alibaba directly and AIgateway adds no platform fee on those calls.