Claude Code Guide
Set up Flaq AI Claude models and explore Claude Code skills
Free to try Qwen 3.8 Max API for web search by Alibaba with answers, grounded research, source-aware analysis, and production web-enabled LLM workflows on Flaq AI.
const response = await fetch('https://api.flaq.ai/api/v1/chat/completions', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
Accept: 'text/event-stream',
'Content-Type': 'application/json'
},
body: JSON.stringify({
model: 'qwen-3.8-max-web-search',
messages: [
{
role: 'user',
content: 'What are the latest developments in quantum computing this year?'
}
],
stream: true,
max_tokens: 2048,
top_p: 0.9,
top_k: 50
})
});
const reader = response.body.getReader();
const decoder = new TextDecoder();
let buffer = '';
let assistantText = '';
while (true) {
const { done, value } = await reader.read();
if (done) break;
buffer += decoder.decode(value, { stream: true });
const frames = buffer.split('\n\n');
buffer = frames.pop() || '';
for (const frame of frames) {
const lines = frame.split('\n').filter(Boolean);
let eventName = 'message';
const dataLines = [];
for (const line of lines) {
if (line.startsWith('event:')) {
eventName = line.slice(6).trim();
} else if (line.startsWith('data:')) {
dataLines.push(line.replace(/^data:\s*/, ''));
}
}
const raw = dataLines.join('\n').trim();
if (raw === '[DONE]') {
console.log('\nFinal text:', assistantText);
continue;
}
let payload;
try {
payload = JSON.parse(raw);
} catch {
continue;
}
if (eventName === 'error' || payload.error) {
const msg = payload.error?.message ?? payload.message ?? 'Chat request failed';
throw new Error(msg);
}
const delta = payload.choices?.[0]?.delta;
if (delta?.content) {
assistantText += delta.content;
console.log(assistantText);
}
}
}
import json
import requests
response = requests.post(
'https://api.flaq.ai/api/v1/chat/completions',
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Accept': 'text/event-stream',
'Content-Type': 'application/json',
},
json={
'model': 'qwen-3.8-max-web-search',
'messages': [
{
'role': 'user',
'content': 'What are the latest developments in quantum computing this year?',
}
],
'stream': True,
'max_tokens': 2048,
'top_p': 0.9,
'top_k': 50,
},
stream=True,
)
response.raise_for_status()
event_name = 'message'
assistant_text = ''
for raw_line in response.iter_lines(decode_unicode=True):
if not raw_line:
event_name = 'message'
continue
if raw_line.startswith('event:'):
event_name = raw_line.replace('event:', '', 1).strip()
continue
if raw_line.startswith('data:'):
raw_data = raw_line.replace('data:', '', 1).strip()
if raw_data == '[DONE]':
print('\nFinal text:', assistant_text)
continue
payload = json.loads(raw_data)
if event_name == 'error' or payload.get('error'):
error = payload.get('error') or payload
raise RuntimeError(error.get('message', 'Chat request failed'))
choices = payload.get('choices') or []
if choices:
delta = choices[0].get('delta') or {}
content = delta.get('content')
if content:
assistant_text += content
print(content, end='', flush=True)
curl -N -X POST "https://api.flaq.ai/api/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: text/event-stream" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen-3.8-max-web-search",
"messages": [
{
"role": "user",
"content": "What are the latest developments in quantum computing this year?"
}
],
"stream": true,
"max_tokens": 2048,
"top_p": 0.9,
"top_k": 50
}'
| Parameters | Price | Original Price | Discount |
|---|
Qwen 3.8 Max Web Search API combines language generation with a web-search workflow for questions that benefit from current or externally sourced information. It helps applications turn a user query into a structured search-and-answer experience through an Alibaba-oriented chat integration on Flaq AI.
Search-Augmented Responses: Use web search as part of a language workflow when the answer depends on information beyond the conversation context.
Natural-Language Querying: Accept user questions and research instructions in ordinary language without requiring a separate search syntax.
Result Synthesis: Organize retrieved information into summaries, comparisons, explanations, or next-step recommendations.
Context-Aware Follow-Up: Continue a search-oriented conversation with additional questions and focused refinement.
Structured Response Controls: Use available message, sampling, and response-length controls to fit the output to the application.
API-Friendly Research Flow: Add web-assisted answers to assistants, support tools, and information products through a chat-oriented endpoint.
Input: A natural-language question or research instruction with any relevant context and output requirements.
Search Direction: Clarify the topic, time range, comparison criteria, and level of detail expected in the response.
Output: A synthesized language response returned through the Flaq AI chat workflow for display or automation.
Follow-Up: Ask focused questions to refine the search scope, compare findings, or request a different output structure.
Application Handling: Review search-based answers, handle provider errors, and communicate uncertainty where the information may change.
Current Information Research: Help users investigate changing topics, products, organizations, and public information.
Market and Competitor Monitoring: Organize external findings into repeatable summaries and comparison workflows.
Knowledge Assistants: Give support and internal tools a search-enabled response path for questions outside stored knowledge.
Content Preparation: Gather background information, references, and topic context before drafting articles or campaigns.
Decision Support: Combine search-oriented retrieval with structured explanations for research and operational planning.
Note Search-based answers should be reviewed for source quality, freshness, completeness, and uncertainty before being used in high-impact decisions or published content.
Qwen 3.8 Max vs. Perplexity Sonar: Perplexity Sonar is designed around answer-focused web research. Qwen 3.8 Max Web Search provides a Qwen-oriented API path for integrating search-assisted answers into broader application workflows.
Qwen 3.8 Max vs. Gemini with Grounding: Gemini can combine language generation with Google's search ecosystem. Qwen 3.8 Max is suited to teams building search-assisted conversations around Alibaba services.
Qwen 3.8 Max vs. Claude with Web Search: Claude with web search offers careful language synthesis and research interaction. Qwen 3.8 Max provides an alternative for products already standardized on Qwen message workflows.
Qwen 3.8 Max vs. OpenAI Web Search: OpenAI web search integrates with OpenAI language products and APIs. Qwen 3.8 Max supports a comparable search-assisted application pattern within the Qwen family.
Qwen 3.8 Max vs. Tavily: Tavily focuses on search retrieval for AI applications. Qwen 3.8 Max Web Search combines the search-oriented workflow with language response generation in a single model integration.
Set up Flaq AI Claude models and explore Claude Code skills

Set up Flaq AI GPT models and explore Codex skills
Use Flaq AI LLM models in Hermes Agent
Use GLM 5.2, Kimi K3, and DeepSeek v4 in ZCode
Run DeepSeek Harness with Flaq AI DeepSeek models
Connect AI agents to Flaq image and video generation tools
Use GPT 6 Astra and Claude Fable 5.1 in WorkBuddy