Developer Dashboard

Qwen3.8 Open-Weight and Qwen Image 3 Models Added ​

Date: 2026-08-15

Summary ​

AvalAI now provides three additional Alibaba models: the text-only, mandatory-thinking qwen3.8-2.4t-a95b open-weight model and the qwen-image-3.0-pro and qwen-image-3.0 image generation and editing models. The text model supports Chat Completions and Messages fully, with partial Responses support. Both image models support the Images generation and edit endpoints.

Details ​

Alibaba ​

qwen3.8-2.4t-a95b ​

qwen3.8-2.4t-a95b is the open-weight base underlying the managed qwen3.8-max service. Its mixture-of-experts architecture has 2.4 trillion total parameters and activates 95 billion parameters for each forward pass.

Unlike qwen3.8-max, the open-weight route is text-only and always operates in thinking mode. Thinking cannot be disabled. Use reasoning_effort with low, medium, or xhigh to tune the reasoning budget; xhigh is the default.

FeatureDetails
Model IDqwen3.8-2.4t-a95b
InputText
OutputText
Context window262,144 tokens
Architecture2.4T total parameters, 95B active
ThinkingMandatory
Endpointsv1/chat/completions (full), v1/messages (full), v1/responses (partial)

Pricing:

UsagePrice per 1M tokens
Input$2.00
Cache creation input$2.50
Cached input$0.25
Output$6.00

qwen-image-3.0-pro and qwen-image-3.0 ​

Both Qwen Image 3 models support new-image generation and source-image editing through the OpenAI-compatible Images API.

Model IDGeneration endpointEdit endpoint
qwen-image-3.0-prov1/images/generationsv1/images/edits
qwen-image-3.0v1/images/generationsv1/images/edits

Both models use the same pricing:

UsagePrice
Output accounting rate$40 / 1M output tokens
1K / approximately 1 MP output image$0.04 / image
2–4 MP output image$0.075 / image
Reference or input image$0.003 / image
Text input$0
Cached text input$0

API Request and Response Examples ​

Chat Completions ​

Example Request ​

bash
curl https://api.avalai.ir/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $AVALAI_API_KEY" \
  -d '{
    "model": "qwen3.8-2.4t-a95b",
    "messages": [
      {
        "role": "user",
        "content": "Identify the highest-risk assumption in this migration plan."
      }
    ],
    "reasoning_effort": "medium"
  }'

Example Response ​

The model's text can begin with a <think>...</think> reasoning block because thinking is mandatory.

json
{
  "id": "chatcmpl_qwen38_example",
  "object": "chat.completion",
  "model": "qwen3.8-2.4t-a95b",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "<think>Reviewing dependency and rollback assumptions...</think>\n\nThe highest-risk assumption is that every dependent service can migrate in the same maintenance window. Validate compatibility service by service and define a reversible cutover."
      },
      "finish_reason": "stop"
    }
  ]
}

Image Generation ​

Example Request ​

bash
curl https://api.avalai.ir/v1/images/generations \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $AVALAI_API_KEY" \
  -d '{
    "model": "qwen-image-3.0-pro",
    "prompt": "A clean editorial illustration of a renewable-energy city, with room for a headline",
    "size": "1024x1024",
    "n": 1
  }'

Example Response ​

json
{
  "created": 1786795200,
  "data": [
    {
      "url": "https://example.invalid/generated/qwen-image-3-output.png",

      "revised_prompt": "A clean editorial illustration of a renewable-energy city, with clear headline space"
    }
  ]
}

For editing, submit a source image and prompt to v1/images/edits. Each reference or input image adds $0.003 to the request cost.

SDK Usage Examples ​

bash
curl https://api.avalai.ir/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $AVALAI_API_KEY" \
  -d '{
    "model": "qwen3.8-2.4t-a95b",
    "messages": [{"role": "user", "content": "Review this deployment plan."}],
    "reasoning_effort": "medium"
  }'
python
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["AVALAI_API_KEY"],
    base_url="https://api.avalai.ir/v1",
)

response = client.chat.completions.create(
    model="qwen3.8-2.4t-a95b",
    messages=[{"role": "user", "content": "Review this deployment plan."}],
    extra_body={"reasoning_effort": "medium"},
)

print(response.choices[0].message.content)
javascript
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.AVALAI_API_KEY,
  baseURL: "https://api.avalai.ir/v1",
});

const response = await client.chat.completions.create({
  model: "qwen3.8-2.4t-a95b",
  messages: [
    { role: "user", content: "Review this deployment plan." },
  ],
  reasoning_effort: "medium",
});

console.log(response.choices[0].message.content);

Integration Notes ​

  • Do not send image or video input to qwen3.8-2.4t-a95b; use qwen3.8-max when multimodal understanding is required.
  • Do not attempt to disable thinking on qwen3.8-2.4t-a95b.
  • Use reasoning_effort rather than the managed Max model's enable_thinking control.
  • Treat v1/responses support for the text model as partial and verify required fields before migration.
  • Use the plural edit path, v1/images/edits, for both Qwen Image 3 models.
  • Account for the $0.003 fee for every reference/input image in editing workflows.