Fireworks AI exposes Qwen2-7B through model ID qwen2-7b. Use the setup steps, sourced pricing, capabilities, and official provider links below to validate this route before deployment.
Last refreshed 2026-05-19. Next refresh: weekly.
Quick Start
- 1
- 2
- 3
Code Examples
Install
pip install openaiAPI key
FIREWORKS_API_KEYModel ID
qwen2-7bFireworks model IDs use "accounts/fireworks/models/{model-name}" format, e.g. "accounts/fireworks/models/llama4-scout-instruct-basic" or "accounts/fireworks/models/deepseek-r1".
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["FIREWORKS_API_KEY"],
base_url="https://api.fireworks.ai/inference/v1"
)
response = client.chat.completions.create(
model="qwen2-7b",
messages=[{"role": "user", "content": "Hello"}]
)
print(response.choices[0].message.content)Pricing on Fireworks AI
| Type | Price (per 1M) |
|---|---|
| Input tokens | $0.20 |
| Output tokens | $0.20 |
Capabilities
Structured Outputs
About Qwen2-7B
Qwen2-7B is Alibaba's Qwen2 model. It offers a 128K-token context window and scores 55.4 on GPQA.
Model Specs
Released2024-06-05
Parameters7.07B
Context128k
ArchitectureDecoder Only