We use cookies. Cookies and browser storage keep you signed in and remember your preferences. With your permission we also measure how the site is used. You can any time. See our cookie policy.
Qwen: Qwen2.5 7B Instruct
qwen/qwen-2.5-7b-instructTry Qwen: Qwen2.5 7B Instruct now
Runs on your balance at the prices above. New accounts start with free usage.
One API. Every model.
Session cost $0.00
Settings
Advanced parameters
Qwen: Qwen2.5 7B Instruct at a glance
- Input price is 78% lower than the median of 434 Text models.
- Context window of 32,768 tokens, enough for long documents and multi-turn conversations.
- Supports tool (function) calling for agents and integrations.
- Supports structured JSON output with a schema.
- A typical request (1,000 input / 500 output tokens) costs about $0.000700.
About Qwen: Qwen2.5 7B Instruct
Qwen2.5 7B Instruct is a text generation model from Qwen, the large language model series developed by Alibaba Cloud. It belongs to the Qwen2.5 family, which the provider describes as bringing significantly more knowledge than Qwen2 along with greatly improved capabilities in coding. The model was released by the provider on 16 October 2024, and its knowledge cutoff is 30 June 2024, so anything that happened after that date is outside what it learned during training.
The model works with text only, both on input and output. It accepts text prompts and returns text completions, with a context window of 32,768 tokens and a maximum output of 29,491 tokens. That combination means you can send fairly long documents, transcripts or code files in a single request and still leave room for a substantial response. It is an instruction-tuned model, so it is designed to follow directions given in the prompt rather than simply continue text.
Because of its coding improvements and its general knowledge, the model suits tasks such as code generation, code explanation and refactoring, question answering over long documents, summarization of lengthy text, and drafting or rewriting content. The instruction tuning makes it a reasonable fit for chat-style assistants and for extraction or classification jobs where you describe the task in the prompt. The 32,768 token context is useful when the material you need to reason over is long, for example a full source file or a multi-page report, since you can often avoid splitting it into chunks.
You call the model through api14's OpenAI-compatible API using the model id "qwen/qwen-2.5-7b-instruct". Requests follow the same shape as the OpenAI chat completions interface, so existing OpenAI client libraries and code can point at api14 with minimal changes. The model supports a broad set of request parameters: frequency_penalty, max_tokens, min_p, presence_penalty, repetition_penalty, response_format, seed, stop, structured_outputs, temperature, tool_choice, tools, top_k and top_p. Tool calling and structured outputs are both available, which means you can let the model call functions you define or constrain its output to a schema, and the seed parameter lets you make sampling more reproducible when you need consistent results across runs.
Keep the context limit in mind when designing requests: 32,768 tokens covers a lot, but very large codebases or book-length inputs will still need chunking or retrieval in front of the model. The model is text only, so if your application needs to process images or audio, it is not the right choice. If you need a larger context window or stronger reasoning on difficult problems, a bigger model in the Qwen2.5 line or another family may serve you better, while this 7B variant remains a practical option for everyday generation, coding assistance and text processing where a mid-sized model is enough.
How to call the Qwen: Qwen2.5 7B Instruct API
- Create an API key in your dashboard.
- Install the official openai SDK for your language.
- Set baseURL to https://api14.com/api/v1 and model to "qwen/qwen-2.5-7b-instruct".
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api14.com/api/v1",
apiKey: process.env.API14_API_KEY,
});
const result = await client.chat.completions.create({
"model": "qwen/qwen-2.5-7b-instruct",
"messages": [
{
"role": "user",
"content": "Explain vector databases in two sentences."
}
]
});
console.log(result.choices[0].message.content);
Supported parameters
frequency_penaltymax_tokensmin_ppresence_penaltyrepetition_penaltyresponse_formatseedstopstructured_outputstemperaturetool_choicetoolstop_ktop_pSpecifications
- Context length
- 32,768
- Max output
- 29,491
- Input
- text
- Output
- text
- Knowledge cutoff
- 2024-06-30
Requests on api14 · last 7 days
Qwen: Qwen2.5 7B Instruct: frequently asked questions
- How much does the Qwen: Qwen2.5 7B Instruct API cost?
- Qwen: Qwen2.5 7B Instruct costs Input $0.35 / 1M tokens. It is charged from your USD balance only for successful requests; failed requests are free.
- What is the context window of Qwen: Qwen2.5 7B Instruct?
- Qwen: Qwen2.5 7B Instruct reads up to 32,768 tokens per request: prompt, history and documents together. It writes up to 29,491 output tokens per response.
- What can Qwen: Qwen2.5 7B Instruct do?
- Qwen: Qwen2.5 7B Instruct accepts text and returns text. It supports tool calling, structured JSON output.
- How do I call Qwen: Qwen2.5 7B Instruct from my code?
- Point any OpenAI SDK at https://api14.com/api/v1 and set the model to "qwen/qwen-2.5-7b-instruct". No other code changes. Copy a ready example from the code panel on this page.
- What are alternatives to Qwen: Qwen2.5 7B Instruct?
- Comparable Text models at a similar price: inclusionAI: Ling 3.1 Flash, Meta: Muse Spark 1.3 Contributor, Meta: Muse Spark 1.2 Contributor. Each runs through the same API key, so switching is one string.
Qwen: Qwen2.5 7B Instruct community
New topicThis community has no topics yet. Open the first one about Qwen: Qwen2.5 7B Instruct.