POST
javascript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 const axios = require('axios'); const api_key = "YOUR API-KEY"; const url = "https://api.segmind.com/v1/qwen3-coder-plus"; const data = { "messages": [ { "role": "user", "content" : "tell me a joke on cats" }, { "role": "assistant", "content" : "here is a joke about cats..." }, { "role": "user", "content" : "now a joke on dogs" }, ] }; (async function() { try { const response = await axios.post(url, data, { headers: { 'x-api-key': api_key } }); console.log(response.data); } catch (error) { console.error('Error:', error.response.data); } })();
RESPONSE
application/json
HTTP Response Codes
200 - OKImage Generated
401 - UnauthorizedUser authentication failed
404 - Not FoundThe requested URL does not exist
405 - Method Not AllowedThe requested HTTP method is not allowed
406 - Not AcceptableNot enough credits
500 - Server ErrorServer had some issue with processing

Attributes


messagesArray

An array of objects containing the role and content


rolestr

Could be "user", "assistant" or "system".


contentstr

A string containing the user's query or the assistant's response.

To keep track of your credit usage, you can inspect the response headers of each API call. The x-remaining-credits property will indicate the number of remaining credits in your account. Ensure you monitor this value to avoid any disruptions in your API usage.

Qwen 3 Coder Plus — Agentic Code Generation Model

What is Qwen 3 Coder Plus?

Qwen 3 Coder Plus is Alibaba Cloud's premium code generation model, purpose-built for software engineering at scale. It is the proprietary, production-optimized API version of the Qwen3-Coder-480B-A35B architecture — a 480-billion-parameter Mixture-of-Experts model with 35 billion active parameters per inference call.

What sets Qwen 3 Coder Plus apart is its 1,000,000-token context window, enabling it to process entire codebases, large pull requests, multi-file projects, and long conversation histories without losing context. It is trained on 7.5 trillion tokens with a 70% code ratio, making it one of the most heavily code-trained models available via API.

Performance benchmarks position it as state-of-the-art among open models on Agentic Coding, Agentic Browser-Use, and Agentic Tool-Use — comparable to Claude Sonnet 4, with a 70.6% score on SWE-Bench Verified.

Key Features

  • 1M Token Context: Process full repositories, large codebases, and extended multi-turn agentic sessions without truncation.
  • Agentic Coding: Trained with long-horizon reinforcement learning across 20,000 parallel environments for real-world multi-step task completion.
  • Mixture-of-Experts Architecture: 480B total parameters, 35B active — delivering top-tier quality at efficient inference cost.
  • Tool Use & Function Calling: Native support for tool calls, enabling integration into agentic development pipelines.
  • SWE-Bench Leader: Achieves 70.6% on SWE-Bench Verified — top among open models at launch.
  • OpenAI-Compatible API: Drop-in compatible with OpenAI SDK clients via Segmind's endpoint.

Best Use Cases

Qwen 3 Coder Plus excels wherever code quality and context depth matter:

  • Repository-Scale Code Tasks: Analyze, refactor, or extend large codebases that span hundreds of files — the 1M context window handles it all in one pass.
  • Agentic Development: Build autonomous coding agents that write, test, debug, and deploy code through multi-turn tool interactions.
  • Code Review & Debugging: Paste complete stack traces, test failures, and source files to get precise, root-cause analysis.
  • API & SDK Generation: Generate production-ready SDK wrappers, API clients, and integration code with detailed type annotations.
  • Technical Documentation: Generate inline comments, docstrings, README files, and architecture docs from existing code.

Prompt Tips and Output Quality

For code generation, specify the language, framework, target environment, and expected input/output behavior. Including example data or failing test cases dramatically improves output accuracy. When working on agentic tasks, provide a clear objective, the available tools, and any relevant context from your codebase.

Qwen 3 Coder Plus supports function calling natively — define your tools in OpenAI format and the model will invoke them correctly. For long-context tasks (full repos, large PRs), the model handles up to 1M tokens but responses may take longer — set generous timeout and max-token limits.

FAQs

How does Qwen 3 Coder Plus compare to GPT-4o for coding? On agentic coding benchmarks like SWE-Bench Verified (70.6%), it is competitive with or exceeds leading proprietary models including Claude Sonnet 4.

What languages does it support? All major programming languages including Python, JavaScript, TypeScript, Java, Go, Rust, C/C++, SQL, and dozens more.

Can it handle full repository context? Yes — the 1M token context window supports ingesting entire codebases in a single API call.

Does it support function calling and tool use? Yes. Qwen 3 Coder Plus natively supports OpenAI-format function calling for agentic workflows.

What is the maximum output length? Up to 65,536 tokens per response — sufficient for generating large files, complete modules, or detailed documentation.

Is this model open source? The base Qwen3-Coder-480B-A35B weights are open on Hugging Face under a permissive license. Qwen 3 Coder Plus is the production-optimized API version hosted by Alibaba Cloud via Segmind.