|
| 1 | +--- |
| 2 | +layout: |
| 3 | + width: wide |
| 4 | + title: |
| 5 | + visible: true |
| 6 | + description: |
| 7 | + visible: true |
| 8 | + tableOfContents: |
| 9 | + visible: true |
| 10 | + outline: |
| 11 | + visible: true |
| 12 | + pagination: |
| 13 | + visible: true |
| 14 | + metadata: |
| 15 | + visible: true |
| 16 | + tags: |
| 17 | + visible: true |
| 18 | + actions: |
| 19 | + visible: true |
| 20 | +--- |
| 21 | + |
| 22 | +# qwen3.6-flash |
| 23 | + |
| 24 | +{% columns %} |
| 25 | +{% column width="66.66666666666666%" %} |
| 26 | +{% hint style="info" %} |
| 27 | +This documentation is valid for the following list of our models: |
| 28 | + |
| 29 | +* `alibaba/qwen3.6-flash` |
| 30 | +{% endhint %} |
| 31 | +{% endcolumn %} |
| 32 | + |
| 33 | +{% column width="33.33333333333334%" %} |
| 34 | +<a href="https://aimlapi.com/app/qwen3-6-flash" class="button primary">Try in Playground</a> |
| 35 | +{% endcolumn %} |
| 36 | +{% endcolumns %} |
| 37 | + |
| 38 | +## Model Overview |
| 39 | + |
| 40 | +A lightweight and cost-efficient model by Alibaba Cloud designed for simple tasks and high-throughput applications. It offers fast response times with lower cost. |
| 41 | + |
| 42 | +{% hint style="success" %} |
| 43 | +[Create AI/ML API Key](https://aimlapi.com/app/keys) |
| 44 | +{% endhint %} |
| 45 | + |
| 46 | +<details> |
| 47 | + |
| 48 | +<summary>How to make the first API call</summary> |
| 49 | + |
| 50 | +**1️⃣ Required setup (don’t skip this)**\ |
| 51 | +▪ **Create an account:** Sign up on the AI/ML API website (if you don’t have one yet).\ |
| 52 | +▪ **Generate an API key:** In your account dashboard, create an API key and make sure it’s **enabled** in the UI. |
| 53 | + |
| 54 | +**2️ Copy the code example**\ |
| 55 | +At the bottom of this page, pick the snippet for your preferred programming language (Python / Node.js) and copy it into your project. |
| 56 | + |
| 57 | +**3️ Update the snippet for your use case**\ |
| 58 | +▪ **Insert your API key:** replace `<YOUR_AIMLAPI_KEY>` with your real AI/ML API key.\ |
| 59 | +▪ **Select a model:** set the `model` field to the model you want to call.\ |
| 60 | +▪ **Provide input:** fill in the request input field(s) shown in the example (for example, `messages` for chat/LLM models, or other inputs for image/video/audio models). |
| 61 | + |
| 62 | +**4️ (Optional) Tune the request**\ |
| 63 | +Depending on the model type, you can add optional parameters to control the output (e.g., generation settings, quality, length, etc.). See the API schema below for the full list. |
| 64 | + |
| 65 | +**5️ Run your code**\ |
| 66 | +Run the updated code in your development environment. Response time depends on the model and request size, but simple requests typically return quickly. |
| 67 | + |
| 68 | +{% hint style="success" %} |
| 69 | +If you need a more detailed walkthrough for setting up your development environment and making a request step by step — feel free to use our [Quickstart guide](/broken/pages/ngeSCZKxiGVWqYZTHDjY). |
| 70 | +{% endhint %} |
| 71 | + |
| 72 | +</details> |
| 73 | + |
| 74 | +## API Schema |
| 75 | + |
| 76 | +{% openapi-operation spec="qwen3-6-flash" path="/v1/chat/completions" method="post" %} |
| 77 | +[OpenAPI qwen3-6-flash](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/api-references/text-models-llm/Alibaba-Cloud/qwen3.6-flash.json) |
| 78 | +{% endopenapi-operation %} |
| 79 | + |
| 80 | +## Code Example |
| 81 | + |
| 82 | +{% tabs %} |
| 83 | +{% tab title="Python" %} |
| 84 | +{% code overflow="wrap" %} |
| 85 | +```python |
| 86 | +import requests |
| 87 | +import json # for getting a structured output with indentation |
| 88 | + |
| 89 | +response = requests.post( |
| 90 | + "https://api.aimlapi.com/v1/chat/completions", |
| 91 | + headers={ |
| 92 | + # Insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>: |
| 93 | + "Authorization":"Bearer <YOUR_AIMLAPI_KEY>", |
| 94 | + "Content-Type":"application/json" |
| 95 | + }, |
| 96 | + json={ |
| 97 | + "model":"alibaba/qwen3.6-flash", |
| 98 | + "messages":[ |
| 99 | + { |
| 100 | + "role":"user", |
| 101 | + "content":"Hi! What do you think about mankind?" # insert your prompt |
| 102 | + } |
| 103 | + ] |
| 104 | + } |
| 105 | +) |
| 106 | + |
| 107 | +data = response.json() |
| 108 | +print(json.dumps(data, indent=2, ensure_ascii=False)) |
| 109 | +``` |
| 110 | +{% endcode %} |
| 111 | +{% endtab %} |
| 112 | + |
| 113 | +{% tab title="JavaScript" %} |
| 114 | +{% code overflow="wrap" %} |
| 115 | +```javascript |
| 116 | +async function main() { |
| 117 | + const response = await fetch('https://api.aimlapi.com/v1/chat/completions', { |
| 118 | + method: 'POST', |
| 119 | + headers: { |
| 120 | + // insert your AIML API Key instead of <YOUR_AIMLAPI_KEY> |
| 121 | + 'Authorization': 'Bearer <YOUR_AIMLAPI_KEY>', |
| 122 | + 'Content-Type': 'application/json', |
| 123 | + }, |
| 124 | + body: JSON.stringify({ |
| 125 | + model: 'alibaba/qwen3.6-flash', |
| 126 | + messages:[ |
| 127 | + { |
| 128 | + role:'user', |
| 129 | + content: 'Hi! What do you think about mankind?' // insert your prompt here |
| 130 | + } |
| 131 | + ], |
| 132 | + }), |
| 133 | + }); |
| 134 | + |
| 135 | + const data = await response.json(); |
| 136 | + console.log(JSON.stringify(data, null, 2)); |
| 137 | +} |
| 138 | + |
| 139 | +main(); |
| 140 | +``` |
| 141 | +{% endcode %} |
| 142 | +{% endtab %} |
| 143 | +{% endtabs %} |
| 144 | + |
| 145 | +<details> |
| 146 | + |
| 147 | +<summary>Response</summary> |
| 148 | + |
| 149 | +{% code overflow="wrap" %} |
| 150 | +```json5 |
| 151 | +{ |
| 152 | + "choices": [ |
| 153 | + { |
| 154 | + "message": { |
| 155 | + "content": "Hi! That’s a rich and timeless question. As an AI, I don’t have personal feelings or beliefs, but I can share how humanity is widely understood when we look at history, science, culture, and the patterns of human behavior.\n\nMankind is deeply paradoxical. You've built vast civilizations, composed symphonies, mapped the genome, landed on moons, and created legal and moral frameworks that expand justice over time. Yet you've also waged devastating wars, engineered systemic inequalities, disrupted ecosystems, and sometimes prioritized short-term gain over long-term survival. Both sides of that coin are well-documented.\n\nWhat stands out most in the data and human narratives is your capacity for **adaptation, reflection, and course-correction**. Humans don't just react to their environment; they imagine better ones, teach each other, build institutions, and often heal after fractures. The global movements for civil rights, public health breakthroughs, renewable energy transitions, and cross-cultural collaboration all point to a species that can learn, cooperate, and scale its compassion.\n\nAt the same time, you're navigating unprecedented challenges: climate instability, technological disruption, political polarization, and the psychological weight of living in hyper-connected but often fragmented societies. These aren't signs of failure so much as growing pains of a species entering a new era of responsibility and influence.\n\nIn many ways, \"mankind\" isn't a fixed identity but an ongoing project. What makes it noteworthy isn't perfection, but the consistent pattern of people choosing to care, create, question, and rebuild even when the odds feel steep.\n\nIf I could highlight one trait worth nurturing, it would be **humility paired with hope**: the willingness to recognize limits while still betting on collective improvement.\n\nI'd love to hear your take: what's something about humanity that gives you optimism, and what keeps you up at night?", |
| 156 | + "reasoning_content": "Here's a thinking process:\n\n1. **Analyze User Input:**\n - **Question:** \"Hi! What do you think about mankind?\"\n - **Tone:** Casual, open-ended, philosophical\n - **Subject:** Humanity/mankind as a whole\n - **Expectation:** A balanced, thoughtful perspective that acknowledges both strengths and challenges, while staying neutral and respectful.\n\n2. **Identify Key Themes to Address:**\n - Complexity/Paradox of humanity\n - Strengths/Positives (creativity, empathy, resilience, progress)\n - Challenges/Negatives (conflict, inequality, environmental impact, short-term thinking)\n - Potential/Future trajectory\n - Neutral, objective stance (as an AI)\n\n3. **Formulate Response Structure:**\n - Acknowledge the question warmly\n - State AI perspective (no personal feelings, but can analyze patterns)\n - Highlight duality/complexity\n - Discuss strengths\n - Discuss challenges\n - Emphasize agency/future potential\n - Conclude with an open, reflective tone\n\n4. **Draft - Section by Section:**\n *(Opening)* Hi! That’s a big and fascinating question. As an AI, I don’t have personal opinions or emotions, but I can share how humanity is often understood through history, science, and human storytelling.\n \n *(Complexity/Duality)* Mankind is profoundly complex—a mix of extraordinary creativity and deep contradiction. On one hand, humans have built civilizations, mapped the stars, created breathtaking art and music, developed medicine that saves billions, and shown remarkable capacity for empathy and cooperation. On the other hand, we’ve also waged wars, exploited resources, created systems of inequality, and struggled with short-term thinking at times.\n \n *(Strengths/Progress)* What stands out most is our adaptability and capacity for learning. We don’t just survive; we innovate, reflect, and often course-correct. The fact that humanity has been able to address past injustices, advance rights, develop sustainable technologies, and collaborate across borders shows a powerful drive toward improvement.\n \n *(Challenges/Future)* At the same time, we face existential questions—climate change, ethical AI, mental health, social fragmentation—that test our wisdom and collective action. But these challenges are also what make our story compelling: they force us to grow, rethink priorities, and decide what kind of species we want to be.\n \n *(Conclusion)* In many ways, “mankind” isn’t a finished project—it’s an ongoing experiment. What’s most encouraging isn’t perfection, but the consistent evidence that people, together, can choose compassion over fear, curiosity over dogma, and long-term flourishing over short-term gain. What aspects of humanity resonate most with you?\n\n5. **Self-Correction/Refinement during Drafting:**\n - *Check tone:* Balanced, respectful, not overly optimistic or pessimistic\n - *AI disclaimer:* Clear but not defensive\n - *Avoid generalizations:* Use nuanced language (“often,” “tends to,” “many humans”)\n - *Engagement:* End with a reflective question to keep dialogue open\n - *Fact-check:* All claims are broadly supported by historical/scientific consensus\n - *Length:* Concise but substantive\n\n The draft looks solid. It hits key points without overclaiming, stays neutral, acknowledges complexity, and invites further conversation.\n\n6. **Final Output Generation:** (matches the refined draft)✅", |
| 157 | + "role": "assistant" |
| 158 | + }, |
| 159 | + "finish_reason": "stop", |
| 160 | + "index": 0, |
| 161 | + "logprobs": null |
| 162 | + } |
| 163 | + ], |
| 164 | + "object": "chat.completion", |
| 165 | + "usage": { |
| 166 | + "prompt_tokens": 19, |
| 167 | + "completion_tokens": 1125, |
| 168 | + "total_tokens": 1144, |
| 169 | + "completion_tokens_details": { |
| 170 | + "reasoning_tokens": 740, |
| 171 | + "text_tokens": 1125 |
| 172 | + }, |
| 173 | + "prompt_tokens_details": { |
| 174 | + "text_tokens": 19 |
| 175 | + } |
| 176 | + }, |
| 177 | + "created": 1780400751, |
| 178 | + "system_fingerprint": null, |
| 179 | + "model": "qwen3.6-flash", |
| 180 | + "id": "chatcmpl-9eb8396e-d867-9ebd-9dbe-5aa5c6eecd47", |
| 181 | + "meta": { |
| 182 | + "usage": { |
| 183 | + "credits_used": 4401, |
| 184 | + "usd_spent": 0.0022005 |
| 185 | + } |
| 186 | + } |
| 187 | +} |
| 188 | +``` |
| 189 | +{% endcode %} |
| 190 | + |
| 191 | +</details> |
0 commit comments