qwen2.5-1.5b-instruct
Qwen2.5 1.5B Instruct · Chat · Apache License 2.0 (commercial use allowed)
Sign in to see whether this model is running right now.
Call it
curl
curl
curl https://app.pymlabs.ai/v1/chat/completions \
-H "Authorization: Bearer $PYM_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "qwen2.5-1.5b-instruct",
"messages": [{"role": "user", "content": "Say hello in five words."}],
"max_tokens": 64}'
Python
Python · openai SDK
import os
from openai import OpenAI
client = OpenAI(
base_url="https://app.pymlabs.ai/v1",
api_key=os.environ["PYM_API_KEY"],
)
response = client.chat.completions.create(
model="qwen2.5-1.5b-instruct",
messages=[{"role": "user", "content": "Say hello in five words."}],
max_tokens=64,
)
print(response.choices[0].message.content)
print(response.usage) # the tokens you were charged for
No key yet? Create an account to get an API key. Create account
Price
- Input
- $0.005 per 1M tokens (text and images; images count as input tokens)
- Output
- $0.01 per 1M tokens
- Hold
- $0.00004352 held for a request at the default max_tokens (512) · How billing works
| 35 input tokens × $0.005 / 1M | $0.00000018 |
|---|---|
| 10 output tokens × $0.01 / 1M | $0.0000001 |
| Charge | $0.00000028 |
Price history
| In effect from (UTC) | Input Tokens | Output Tokens | Version |
|---|---|---|---|
| current price (added) Current | $0.005 | $0.01 | 1 |
A new price applies to requests that start after it takes effect. A request that's already running keeps the price it was held at.
What it supports
- ✓ Chat completions, streaming and non-streaming
- ✓ Tools (tool calling), including
tool_choice: "required"while streaming - ✓ Structured output:
response_formatjson_objectandjson_schema
Not supported on this model: image input.
"Supported" means the API accepts these on this model and bills them under a measured bound. It isn't a quality rating.
Limits
- Context
- 8,192 tokens (prompt + output)
- Max output
- 2,048 tokens per request
- Request time
- up to 120 s for a non-streamed request
Licence
Apache License 2.0 · Read the Apache License 2.0 text (on www.apache.org)
Commercial use: allowed. Your use must follow the licence's terms.