models/Alibaba Qwen/Qwen1.5-7b-Chat-Awq

Qwen1.5-7b-Chat-Awq

text

Qwen1.5 is the improved version of Qwen, the large language model series developed by Alibaba Cloud. AWQ is an efficient, accurate and blazing-fast low-bit weight quantization method, currently supporting 4-bit quantization.

slug · qwen/qwen1.5-7b-chat-awqprovider · Alibaba Qwenfamily · Qwenreleased · 2024-02-05

Quickstart

curl https://api.aigateway.sh/v1/chat/completions \
  -H "Authorization: Bearer $AIGATEWAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen/qwen1.5-7b-chat-awq",
    "messages": [{"role":"user","content":"hello"}],
    "stream": true
  }'

Capabilities

Streaming
CONTEXT
4,096 tok
MAX OUTPUT
4,096 tok

Strengths

  • General-purpose chat
  • Long context
  • Tool use

Use cases

ChatbotsContent generationAgentic workflows

Pricing

Input$0.060 / 1M tokens
Output$0.120 / 1M tokens
You pay pass-through · 5% applied at credit top-up, not per-call.
Try in playground →CompareAPI referenceSee usage ranking →

Collections

More text models →More from Alibaba QwenFrontier models →Free-tier models →
API schema

Call Qwen1.5-7b-Chat-Awq from any OpenAI SDK

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

Request body

json
{
  "model": "qwen/qwen1.5-7b-chat-awq",
  "messages": [
    { "role": "system", "content": "You are a helpful assistant." },
    { "role": "user",   "content": "Hello!" }
  ],
  "temperature": 0.7,
  "top_p": 0.95,
  "max_tokens": 1024,
  "stream": false

}

Response

json
{
  "id": "chatcmpl-abc123",
  "object": "chat.completion",
  "created": 1776947082,
  "model": "qwen/qwen1.5-7b-chat-awq",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Hello! How can I help you today?"
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 24,
    "completion_tokens": 12,
    "total_tokens": 36
  }
}

Streaming (SSE) — set "stream": true

// 1. Role announcement (first chunk):
data: {"choices":[{"index":0,"delta":{"role":"assistant"},"finish_reason":null}]}

// 2. Content chunks (final answer):
data: {"choices":[{"index":0,"delta":{"content":"Hello"},"finish_reason":null}]}
data: {"choices":[{"index":0,"delta":{"content":"!"},"finish_reason":null}]}

// Finish chunk:
data: {"choices":[{"index":0,"delta":{},"finish_reason":"stop"}]}

// Terminator:
data: [DONE]

Quickstart

# pip install aigateway-py openai
# aigateway-py adds sub-accounts, evals, replays, jobs, webhook verify.
# openai SDK covers chat — drop-in per our SDK's own guidance.
from openai import OpenAI

client = OpenAI(
    base_url="https://api.aigateway.sh/v1",
    api_key="sk-aig-...",
)

stream = client.chat.completions.create(
    model="qwen/qwen1.5-7b-chat-awq",
    messages=[{"role": "user", "content": "Hello!"}],
    stream=True,
)
for chunk in stream:
    print(chunk.choices[0].delta.content or "", end="", flush=True)

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 →