Generate and image to images with Qwen 3 through RunAPI. Use when the user asks an agent to create, edit, or transform images with Qwen 3. Default to the RunAPI CLI for one-off generation; use SDKs only when the user is integrating RunAPI into an app or backend.
编程
qwen
试用Call the Qwen text API (qwen3-next-80b-a3b-instruct) through RunAPI using the official OpenAI SDK or compatible clients. Use when the user asks for Qwen text...
它能做什么
Call the Qwen text API (qwen3-next-80b-a3b-instruct) through RunAPI using the official OpenAI SDK or compatible clients. Use when the user asks for Qwen text chat, streaming completions, Anthropic or Gemini protocol compatibility, or when they want to point an existing OpenAI SDK setup at RunAPI as the base URL.
技能文档
Qwen Text on RunAPI
Use the official OpenAI SDK or any OpenAI-compatible HTTP client and switch
the base URL to https://runapi.ai/v1. This skill covers Qwen text models.
For Qwen image generation, install the separate Qwen 2 skill.
Setup
OPENAI_API_KEY=YOUR_RUNAPI_TOKEN
OPENAI_BASE_URL=https://runapi.ai/v1
Get a RunAPI API Key at .
Core recipe - Chat Completions
from openai import OpenAI
client = OpenAI(
api_key="YOUR_RUNAPI_TOKEN",
base_url="https://runapi.ai/v1",
)
response = client.chat.completions.create(
model="qwen3-next-80b-a3b-instruct",
messages=[{"role": "user", "content": "Write a concise API migration note."}],
)
print(response.choices[0].message.content)
print(response.usage)
import OpenAI from "openai";
const client = new OpenAI({
apiKey: "YOUR_RUNAPI_TOKEN",
baseURL: "https://runapi.ai/v1",
});
const response = await client.chat.completions.create({
model: "qwen3-next-80b-a3b-instruct",
messages: [{ role: "user", content: "Write a concise API migration note." }],
});
Streaming
stream = client.chat.completions.create(
model="qwen3-next-80b-a3b-instruct",
messages=[{"role": "user", "content": "Write a compact implementation plan."}],
stream=True,
)
for chunk in stream:
delta = chunk.choices[0].delta.content
if delta:
print(delta, end="", flush=True)
Streaming runs through a regional edge proxy so the request does not hold a Rails/Puma thread. Long generations should always stream.
Protocol compatibility
Qwen text models are also available through RunAPI's Anthropic-compatible and
Gemini contents client surfaces. RunAPI bridges those request and response
shapes to the OpenAI-compatible chat request format, so use these protocol paths
only when an existing tool expects those formats:
curl -X POST "https://runapi.ai/v1/messages" \
-H "x-api-key: YOUR_RUNAPI_TOKEN" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3-next-80b-a3b-instruct",
"max_tokens": 1024,
"messages": [{"role": "user", "content": "Draft a concise answer."}]
}'
curl -X POST \
"https://runapi.ai/v1beta/models/qwen3-next-80b-a3b-instruct:streamGenerateContent" \
-H "x-goog-api-key: YOUR_RUNAPI_TOKEN" \
-H "Content-Type: application/json" \
-d '{"contents":[{"role":"user","parts":[{"text":"Hello!"}]}]}'
For new app code, prefer the OpenAI-compatible setup.
List models
curl https://runapi.ai/v1/models \
-H "Authorization: Bearer YOUR_RUNAPI_TOKEN"
Supported models
| Model ID | Use when |
|---|---|
qwen3-next-80b-a3b-instruct | Qwen text chat and instruction-following workloads |
References
- Model overview, pricing, and rate limits: https://runapi.ai/models/qwen.md
- Provider comparison: https://runapi.ai/providers/alibaba.md
- Catalog: https://runapi.ai/models.md
Agent rules
- Keep API keys in
OPENAI_API_KEY,RUNAPI_TOKEN, or a secret manager; never inline them in commits or shell history. - Default new integrations to the OpenAI-compatible client at
https://runapi.ai/v1. - Use streaming for responses longer than a few hundred tokens.
- For Qwen image generation, use the Qwen 2 model skill instead of this text LLM skill.
- For pricing, rate-limit, and commercial-usage answers, link to https://runapi.ai/models/qwen.md rather than copying values.
相关技能
Generate and edit images with Qwen Image through RunAPI. Use when the user asks an agent to create, edit, or transform images with Qwen Image. Default to the RunAPI CLI for one-off generation; use SDKs only when the user is integrating RunAPI into an app or backend.
Generate and edit images with Qwen 2 through RunAPI. Use when the user asks an agent to create, edit, or transform images with Qwen 2. Default to the RunAPI CLI for one-off generation; use SDKs only when the user is integrating RunAPI into an app or backend.
Qwen (qwen.ai). Use this skill for ANY Qwen request — reading, creating, updating, and deleting data. Whenever a task involves Qwen, use this skill instead of calling the API directly.
Use when the user asks what RunAPI models are available, compares models, needs pricing, asks for required fields, searches by modality, or wants a recommend...
Call the GLM API (GLM 5 and 4 series) through RunAPI using OpenAI-compatible Chat Completions. Use for GLM text chat, streaming, or an existing compatibility client that needs the conditional reference.