Qwen3 8B

Alibaba Qwen chatcodereasoningtool_use

API ID: qwen/qwen3-8b-04-28

Input Price
$0.04
/1M tokens
Output Price
$0.14
/1M tokens

About Qwen3 8B

Qwen3-8B is a dense 8.2B parameter causal language model from the Qwen3 series, designed for both reasoning-heavy tasks and efficient dialogue. It supports seamless switching between "thinking" mode for math, coding, and logical inference, and "non-thinking" mode for general conversation. The model is fine-tuned for instruction-following, agent integration, creative writing, and multilingual use across 100+ languages and dialects. It natively supports a 32K token context window and can extend to 131K tokens with YaRN scaling.

๐Ÿ’ฐ
Price Ranking
#630 lowest price among 1240 Chat models

Model Specifications

Context Length
131k
Max Output
8k
Release Date
2025-04-28
Capabilities
chat code reasoning tool_use
Input Modalities
text
Output Modalities
text

Best For

  • Complex reasoning, math problems, multi-step logic
  • Code generation, debugging, code review, refactoring
  • Conversations, content writing, general assistance

Consider Alternatives For

  • Image understanding (needs vision capability)
  • Simple Q&A (cheaper models available)

๐Ÿ’ฐ Real-World Cost Examples

Estimated monthly costs for common use cases

Personal AI Assistant
$0.06
/month
50 conversations/day, ~500 tokens each
Code Copilot
$0.50
/month
200 completions/day, ~1k tokens each
Customer Service Bot
$1.77
/month
1000 tickets/day, ~800 tokens each
Data Analysis Pipeline
$2.44
/month
500 analyses/day, ~2k tokens each

Alibaba Qwen Model Lineup

Compare all models from Alibaba Qwen to find the best fit

Model Input Output Context Capabilities
Qwen3 8B Current Free Free 131k chat code reasoning tool_use
Qwen2.5-VL 7B Instruct Free Free 33k chat vision tool_use
Qwen3 Embedding 0.6B Free Free 8k chat code
Qwen3 Embedding 0.6B Free Free 8k chat code
Qwen2.5 VL 3B Instruct Free Free 64k chat vision code
Qwen2.5 VL 3B Instruct Free Free 64k chat vision code

Similar Models from Other Providers

Cross-brand alternatives with similar capabilities

Zhipu Ai GLM 4.1V 9B Thinking
Input: $0.04
Output: $0.14
Context: 66k
Amazon Nova Micro 1.0
Input: $0.04
Output: $0.14
Context: 128k
OpenAI gpt-oss-20b
Input: $0.03
Output: $0.14
Context: 131k
Google Gemma 3n 4B
Input: $0.06
Output: $0.12
Context: 33k

๐Ÿš€ Quick Start

Get started with Qwen3 8B API

OpenAI-compatible SDK
from openai import OpenAI

client = OpenAI(
    base_url="https://api.provider.com/v1",
    api_key="YOUR_API_KEY"
)

response = client.chat.completions.create(
    model="qwen/qwen3-8b-04-28",
    messages=[
        {"role": "user", "content": "Hello!"}
    ]
)
print(response.choices[0].message.content)