Routescope APIRoutescope API
Client Tool Setup

Route Simple Tasks to Qwen / DeepSeek to Reduce Costs

Choose Qwen or DeepSeek in your request or client for summarization, classification, rewriting, and other simple tasks.

The value you directly control is model. For simple tasks, set model to a Qwen or DeepSeek model. For complex tasks, use OpenAI, Claude, or another stronger model.

Step 1: Confirm an available model name

Open Model Plaza, find a Qwen or DeepSeek model available to your account, and copy the full model name. You can also check the model list API:

curl https://api.routescope.ai/v1/models \
  -H "Authorization: Bearer sk-your-token"

Replace your-qwen-model, your-deepseek-model, and your-strong-model in the examples below with real model names available to your account.

Step 2: Send simple tasks to Qwen / DeepSeek

For summarization, classification, format conversion, and short rewrites, change the request model to Qwen or DeepSeek.

curl https://api.routescope.ai/v1/chat/completions \
  -H "Authorization: Bearer sk-your-token" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "your-qwen-model",
    "messages": [
      {
        "role": "user",
        "content": "Summarize the following text into three bullet points: ..."
      }
    ],
    "max_tokens": 400
  }'

If you use Codex, VS Code / Cline, OpenCode, or another OpenAI-compatible client, fill the Qwen or DeepSeek model name in the client model setting. The Base URL stays:

https://api.routescope.ai/v1

Step 3: Pick a model by task type in your code

If you can edit your application code, choose the model based on task type.

const SIMPLE_TASK_MODELS: Record<string, string> = {
  summarize: "your-qwen-model",
  classify: "your-qwen-model",
  rewrite: "your-deepseek-model",
  translate: "your-qwen-model",
};

function pickModel(taskType: string) {
  return SIMPLE_TASK_MODELS[taskType] ?? "your-strong-model";
}

const completion = await client.chat.completions.create({
  model: pickModel(taskType),
  messages,
  max_tokens: taskType === "classify" ? 200 : 1000,
});
TaskRecommended model directionConfiguration tip
Classification, tags, intent detectionQwen / DeepSeekUse a lower-cost model and constrain the output format.
Summarization, rewriting, translationQwen / DeepSeekControl max_tokens and test quality first.
Batch data cleaningQwen / DeepSeekProcess in batches and watch average usage in operation records.
Complex code generationOpenAI / Claude / stronger reasoning modelsDo not optimize only for cost; check quality and failure rate.
Critical production responsesStrong model, plus backup model if neededAdd fallback logic in your own code.

Cost-saving tips

  1. For classification and extraction, ask for only the required format, such as JSON with no explanation.
  2. Set a smaller max_tokens for simple tasks.
  3. Test 20 to 50 real samples before scaling a batch job.
  4. Do not guess model names. Copy them from Model Plaza or /v1/models.

Verify the savings

After a test request, open operation records and check:

ItemWhat to check
Requested modelIt is the Qwen or DeepSeek model you selected.
StatusThe request succeeded, or the error is clear.
TokensInput and output tokens match expectations.
CostIt is lower than the same task on a stronger model.

Last updated on