---
title: Effort（投入程度）
url: https://platform.claude.com/docs/zh-TW/build-with-claude/effort
description: 使用 effort 參數控制 Claude 在回應時使用多少 token，在回應的完整度與 token 效率之間取得平衡。
featureMetadata:
  status: stable
  zdr:
    eligibility: eligible
    note: Excludes [Covered Models](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#model-specific-data-retention-requirements).
  supportedModels:
    - claude-fable-5-2
    - claude-mythos-5-2
    - claude-fable-5-1
    - claude-mythos-5-1
    - claude-fable-5
    - claude-mythos-5
    - claude-mythos-preview
    - claude-opus-5-5
    - claude-opus-5
    - claude-sonnet-5-5
    - claude-sonnet-5
    - claude-haiku-5-5
    - claude-opus-4-8
    - claude-opus-4-7
    - claude-opus-4-6
    - claude-sonnet-4-6
    - claude-opus-4-5-20251101
  supportedPlatforms:
    Claude API: stable
    Amazon Bedrock: stable
    Amazon Bedrock (bedrock-runtime): stable
    Claude Platform on AWS: stable
    Claude Models on Google Cloud (Anthropic managed): stable
    Claude Models on Google Cloud (Google managed): stable
    Microsoft Foundry: stable
---

**API 支援**：用法因產品而異。

* **Messages API**：在請求上設定 `output_config.effort`。若未設定值，則套用模型的預設等級。
* **Managed Agents**：在代理的模型物件上，或在工作階段的模型覆寫中設定 `effort`。若未設定值，Managed Agents 會填入模型的預設值。

effort 參數讓您控制 Claude 在回應請求時花費多少 token。您可以使用單一模型，在回應的完整度與 token 效率之間取得平衡。

<Tip>
  若要了解 effort 如何與思考互動，以及應該使用哪種控制方式，請參閱[思考與 effort](https://platform.claude.com/docs/zh-TW/build-with-claude/thinking#thinking-and-effort)。在可使用 adaptive thinking（自適應思考）的情況下，effort 是控制思考深度的建議方式。
</Tip>

## 設定 effort 等級

在請求中設定 `output_config.effort`。以下範例以 `medium` effort 執行一個請求。

<CodeGroup>
  ```bash cURL
  curl https://api.anthropic.com/v1/messages \
    -H "x-api-key: $ANTHROPIC_API_KEY" \
    -H "anthropic-version: 2026-10-21" \
    -H "content-type: application/json" \
    -d '{
      "model": "claude-opus-5-5",
      "max_tokens": 4096,
      "messages": [{
        "role": "user",
        "content": "Analyze the trade-offs between microservices and monolithic architectures"
      }],
      "output_config": {
        "effort": "medium"
      }
    }'
  ```

  ```bash CLI
  ant messages create \
    --model claude-opus-5-5 \
    --max-tokens 4096 \
    --output-config '{effort: medium}' \
    --message '{role: user, content: "Analyze the trade-offs between microservices and monolithic architectures"}'
  ```

  ```python Python
  client = anthropic.Anthropic()

  response = client.messages.create(
      model="claude-opus-5-5",
      max_tokens=4096,
      messages=[
          {
              "role": "user",
              "content": "Analyze the trade-offs between microservices and monolithic architectures",
          }
      ],
      output_config={"effort": "medium"},
  )

  for block in response.content:
      if block.type == "text":
          print(block.text)
  ```

  ```typescript TypeScript
  const client = new Anthropic();

  const response = await client.messages.create({
    model: "claude-opus-5-5",
    max_tokens: 4096,
    messages: [
      {
        role: "user",
        content: "Analyze the trade-offs between microservices and monolithic architectures"
      }
    ],
    output_config: {
      effort: "medium"
    }
  });

  const textBlock = response.content.find((block) => block.type === "text");
  console.log(textBlock?.text);
  ```

  ```csharp C#
  AnthropicClient client = new();

  var parameters = new MessageCreateParams
  {
      Model = Model.ClaudeOpus5_5,
      MaxTokens = 4096,
      Messages = [
          new UserMessageParam
          {
              Content = "Analyze the trade-offs between microservices and monolithic architectures"
          }
      ],
      OutputConfig = new OutputConfig
      {
          Effort = Effort.Medium
      }
  };

  var message = await client.Messages.Create(parameters);
  foreach (var block in message.Content)
  {
      if (block.TryPickText(out var textBlock))
      {
          Console.WriteLine(textBlock.Text);
      }
  }
  ```

  ```go Go
  client := anthropic.NewClient()

  response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{
  	Model:     anthropic.ModelClaudeOpus5_5,
  	MaxTokens: 4096,
  	Messages: []anthropic.MessageParam{
  		anthropic.NewUserMessage(anthropic.NewTextBlock("Analyze the trade-offs between microservices and monolithic architectures")),
  	},
  	OutputConfig: anthropic.OutputConfigParam{
  		Effort: anthropic.OutputConfigEffortMedium,
  	},
  })
  if err != nil {
  	log.Fatal(err)
  }
  for _, block := range response.Content {
  	if textBlock, ok := block.AsAny().(anthropic.TextBlock); ok {
  		fmt.Println(textBlock.Text)
  	}
  }
  ```

  ```java Java
  import com.anthropic.models.messages.OutputConfig;

  void main() {
      AnthropicClient client = AnthropicOkHttpClient.fromEnv();

      MessageCreateParams params = MessageCreateParams.builder()
          .model(Model.CLAUDE_OPUS_5_5)
          .maxTokens(4096L)
          .addUserMessage("Analyze the trade-offs between microservices and monolithic architectures")
          .outputConfig(OutputConfig.builder()
              .effort(OutputConfig.Effort.MEDIUM)
              .build())
          .build();

      Message response = client.messages().create(params);
      response.content().stream()
          .flatMap(block -> block.text().stream())
          .forEach(textBlock -> IO.println(textBlock.text()));
  }
  ```

  ```php PHP
  use Anthropic\Client;
  use Anthropic\Messages\Model;
  use Anthropic\Messages\TextBlock;

  $client = new Client();

  $message = $client->messages->create(
      maxTokens: 4096,
      messages: [
          ['role' => 'user', 'content' => 'Analyze the trade-offs between microservices and monolithic architectures']
      ],
      model: Model::CLAUDE_OPUS_5_5,
      outputConfig: ['effort' => 'medium'],
  );

  foreach ($message->content as $block) {
      if ($block instanceof TextBlock) {
          echo $block->text, PHP_EOL;
      }
  }
  ```

  ```ruby Ruby
  client = Anthropic::Client.new

  message = client.messages.create(
    model: Anthropic::Model::CLAUDE_OPUS_5_5,
    max_tokens: 4096,
    messages: [
      { role: "user", content: "Analyze the trade-offs between microservices and monolithic architectures" }
    ],
    output_config: {
      effort: "medium"
    }
  )

  message.content.each do |block|
    case block
    when Anthropic::Models::TextBlock
      puts block.text
    end
  end
  ```
</CodeGroup>

## effort 的運作方式

大多數 Claude 模型預設為 high effort，會花費達成出色結果所需的所有 token；Claude Opus 5.5 與 Claude Haiku 5.5 則預設為 medium。您可以將 effort 等級提高到 `max` 以獲得絕對最高的能力，或將其降低以更節省 token 使用量，針對速度與成本進行最佳化，同時接受能力上的部分降低。

<Tip>
  將 `effort` 設定為模型的預設值（Claude Opus 5.5 與 Claude Haiku 5.5 為 `"medium"`，其他模型為 `"high"`），所產生的行為與完全省略 `effort` 參數完全相同。
</Tip>

effort 參數會影響回應中的**所有 token**，包括：

* 文字回應與說明
* 工具呼叫與函式引數
* 思考（啟用時）

由於 effort 適用於每個輸出 token，因此無論是否啟用思考都能運作。較低的 effort 也意味著更少且更簡潔的工具呼叫。

### effort 等級

| 等級 | 說明 | 典型使用情境 |
| ----- | ----- | ----- |
| `max` | 絕對最高的能力，對 token 花費沒有任何限制。可在 Claude Fable 5.2、Claude Mythos 5.2、Claude Fable 5.1、Claude Mythos 5.1、Claude Fable 5、Claude Mythos 5、Claude Mythos Preview、Claude Opus 5.5、Claude Opus 5、Claude Opus 4.8、Claude Opus 4.7、Claude Opus 4.6、Claude Sonnet 5.5、Claude Sonnet 5、Claude Sonnet 4.6 與 Claude Haiku 5.5 上使用。 | 需要最深入推理與最徹底分析的任務 |
| `xhigh` | 適用於長時程工作的延伸能力。可在 Claude Fable 5.2、Claude Mythos 5.2、Claude Fable 5.1、Claude Mythos 5.1、Claude Fable 5、Claude Mythos 5、Claude Opus 5.5、Claude Opus 5、Claude Opus 4.8、Claude Opus 4.7、Claude Sonnet 5.5、Claude Sonnet 5 與 Claude Haiku 5.5 上使用。 | 長時間執行的代理與程式設計任務（超過 30 分鐘），token 預算達數百萬 |
| `high` | 花費任務所需的所有 token 以達成出色結果。除 Claude Opus 5.5 與 Claude Haiku 5.5 外，所有支援 effort 的模型皆以此為預設值。 | 複雜推理、困難的程式設計問題、代理任務 |
| `medium` | 平衡的方式，可適度節省 token。Claude Opus 5.5 與 Claude Haiku 5.5 的預設值。 | 需要在速度、成本與效能之間取得平衡的代理任務 |
| `low` | 最有效率。大幅節省 token，但能力會有所降低。 | 需要最佳速度與最低成本的較簡單任務，例如子代理 |

並非所有支援 `max` 的模型都支援 `xhigh`。

<Note>
  effort 是一種行為訊號，而非嚴格的 token 預算。在較低的 effort 等級下，Claude 在面對足夠困難的問題時仍會思考，但針對同一問題的思考量會少於較高 effort 等級時。
</Note>

以下各模型的建議若與此表格有所不同，則以各模型的建議為準。

## 建議的 effort 等級

**[Claude Fable 5.2](https://platform.claude.com/docs/zh-TW/models/fable-5-2/overview) & [Claude Mythos 5.2](https://platform.claude.com/docs/zh-TW/models/mythos-5-2/overview)** — *For demanding reasoning and long-horizon agentic work*

Claude Fable 5.2 支援全部五種 effort 等級。API 預設值為 `high`。自適應思考始終開啟，因此 effort 是您控制思考深度、延遲與成本的主要手段。

請從 `high` 開始。大部分的能力提升在 `high` 時就已具備，高於此等級的提升並不均勻，且取決於任務。對於您最困難、長時間執行的程式設計與代理式工作，若您已測量到提升，可提升至 `xhigh`。在您的評估顯示品質得以維持時，可降低至 `medium` 或 `low`。請將 `max` 保留用於測量模型的能力上限，以及時間與 token 都不重要的少數任務。在 `max` 時，模型會不計 token 成本地追求能力。其執行速度比 `xhigh` 更慢、成本更高，而提升通常很有限。

請在您自己的評估上執行 effort 掃描，而不是沿用 Claude Fable 5.1 的設定。在 `high` 及以上等級時，請設定較大的 `max_tokens`。這是總輸出（思考加上回應文字）的硬性上限。Effort 幾乎不會改變模型回覆的長度，因此請透過提示來調整回覆長度與語氣。

相同的建議也適用於 Claude Mythos 5.2。

在[支援的平台](https://platform.claude.com/docs/zh-TW/build-with-claude/effort-per-message#feature-availability)上，Claude Fable 5.2 與 Claude Mythos 5.2 也支援透過每則訊息的 `output_config` [在對話中途變更 effort](https://platform.claude.com/docs/zh-TW/build-with-claude/effort-per-message)，這樣可保留提示快取。

See also: [為 Claude Fable 5.2 撰寫提示](https://platform.claude.com/docs/zh-TW/build-with-claude/prompt-engineering/prompting-claude-fable-5-2#calibrate-effort)

**[Claude Opus 5.5](https://platform.claude.com/docs/zh-TW/models/opus-5-5/overview)** — *For long-running agentic coding and knowledge work*

Claude Opus 5.5 支援全部五種 effort 等級，且預設值為 `medium`。Claude Opus 5 及更早的 Opus 模型預設為 `high`，因此省略 `effort` 的請求在 Claude Opus 5.5 上會低一個等級執行。

自適應思考始終開啟且無法關閉，因此 effort 是控制模型推理量以及請求成本的主要控制項。設定 `thinking: {"type": "disabled"}` 的請求在每個 effort 等級都會回傳 400 錯誤。

請在您自己的評估上執行 effort 掃描，而不是沿用先前模型的設定。在 `xhigh` 或 `max` 時，請設定較大的 `max_tokens`。這是總輸出（思考加上回應文字）的硬性上限。

Claude Opus 5.5 也支援透過每則訊息的 `output_config` [在對話中途變更 effort](https://platform.claude.com/docs/zh-TW/build-with-claude/effort-per-message)，這樣可保留提示快取。

See also: [為 Claude Opus 5.5 撰寫提示](https://platform.claude.com/docs/zh-TW/build-with-claude/prompt-engineering/prompting-claude-opus-5-5)

**[Claude Sonnet 5.5](https://platform.claude.com/docs/zh-TW/models/sonnet-5-5/overview)** — *The best combination of speed and intelligence*

Claude Sonnet 5.5 支援全部五種 effort 等級，在 Claude API 上的預設值為 `high`。其等級的校準方式不同，因此同一等級產生的思考量與在 Claude Sonnet 5 上並不相同。請在您的評估上重新執行 effort 掃描，而不是沿用您在 Claude Sonnet 5 上使用的設定。

除非您的工作負載屬於代理式或對延遲敏感，否則請從 `high` 開始。對於代理式程式設計與多步驟工具使用，規格明確的任務請從 `medium` 開始，較困難或較長的任務則改用 `high`。對於聊天及其他對延遲敏感的工作，請從 `medium` 或 `low` 開始。只有在您的評估顯示品質有所提升時，才使用 `xhigh` 或 `max`。

設定 `max_tokens` 時請為思考與回覆預留空間。即使未回傳思考內容，思考仍會計入 `max_tokens`。對於代理式程式設計，請將 `max_tokens` 設為模型上限 128,000，並以串流方式接收回應（請參閱[串流訊息](https://platform.claude.com/docs/zh-TW/build-with-claude/streaming)）。

若要讓模型不先思考就直接回應，請傳送 `thinking: {"type": "between_tools"}`，而非 `"disabled"`。此設定可在 `low`、`medium` 和 `high` effort 下運作。在 `xhigh` 或 `max` 時會回傳 400 錯誤，因此在這些等級請使用預設的自適應思考。請參閱[在不進行預先思考的情況下執行](https://platform.claude.com/docs/zh-TW/build-with-claude/prompt-engineering/prompting-claude-sonnet-5-5#running-without-up-front-thinking)。

在[支援的平台](https://platform.claude.com/docs/zh-TW/build-with-claude/effort-per-message#feature-availability)上，Claude Sonnet 5.5 也支援透過每則訊息的 `output_config` [在對話中途變更 effort](https://platform.claude.com/docs/zh-TW/build-with-claude/effort-per-message)，這樣可保留提示快取。使用 `between_tools` 時，effort 無法在對話中途變更：每則訊息的 `output_config.effort` 若設為不同等級，會回傳 400 錯誤。若要讓每一輪使用不同的 effort，請使用自適應思考。

See also: [為 Claude Sonnet 5.5 撰寫提示](https://platform.claude.com/docs/zh-TW/build-with-claude/prompt-engineering/prompting-claude-sonnet-5-5#calibrate-effort)

**[Claude Haiku 5.5](https://platform.claude.com/docs/zh-TW/models/haiku-5-5/overview)** — *For high-volume, latency-sensitive tasks such as classification, extraction, and routing*

Claude Haiku 5.5 支援全部五種 effort 等級，預設值為 `medium`。Effort 是控制模型思考量的主要手段，並藉此影響品質、延遲與成本。大多數工作（包括代理式程式設計）請**從 `medium` 開始**。對於聊天、簡短的工具任務，以及簡單、大量的請求，請使用最便宜且最快速的等級 `low`。在較長的代理提示中，模型在 `low` 下較可能跳過搜尋、提早停止或略過檢查。對於知識工作、較長的代理任務以及嚴格遵循指示的情境，請使用 `high`。只有在您的評估顯示品質有所提升時，才使用 `xhigh` 或 `max`，並在效能、成本與速度方面將其與 Claude Sonnet 5.5 比較。思考預設為開啟且會計入 `max_tokens`，因此請為其預留空間。

若要減少思考，請降低 effort 等級。您也可以在 `high` 或更低的 effort 下傳送 `thinking: {"type": "disabled"}`。在 `xhigh` 或 `max` 時，這會回傳 400 錯誤，因此在這些等級請使用自適應思考：省略 `thinking` 欄位或傳送 `thinking: {"type": "adaptive"}`。

在[支援的平台](https://platform.claude.com/docs/zh-TW/build-with-claude/effort-per-message#feature-availability)上，Claude Haiku 5.5 也讓您可以透過每則訊息的 `output_config` [在對話中途變更 effort](https://platform.claude.com/docs/zh-TW/build-with-claude/effort-per-message)，這樣可保留提示快取。使用 `thinking: {"type": "disabled"}` 時，effort 無法在對話中途變更：每則訊息的 `output_config.effort` 若設為不同等級，會回傳 400 錯誤。若要讓每一輪使用不同的 effort，請使用自適應思考。

See also: [為 Claude Haiku 5.5 撰寫提示](https://platform.claude.com/docs/zh-TW/build-with-claude/prompt-engineering/prompting-claude-haiku-5-5#use-effort-to-control-thinking)

**[Claude Fable 5.1](https://platform.claude.com/docs/zh-TW/models/fable-5-1/overview) & [Claude Mythos 5.1](https://platform.claude.com/docs/zh-TW/models/mythos-5-1/overview)**

Claude Fable 5.1 支援全部五種 effort 等級。**從預設值 `high` 開始。** 對於最講求能力的代理式與程式設計工作，可提升至 `xhigh` 或 `max`；而在您的評估顯示品質得以維持後，對於例行性或對「latency」（延遲）敏感的工作，可降低至 `medium` 或 `low`。在 `high` 及以上等級時，請設定較大的 `max_tokens`。這是總輸出（思考加上回應文字）的硬性上限。

Claude Fable 5.1 也支援透過每則訊息的 `output_config` [在對話中途變更 effort](https://platform.claude.com/docs/zh-TW/build-with-claude/effort-per-message)，這樣可保留提示快取。

See also: [為 Claude Fable 5.1 撰寫提示](https://platform.claude.com/docs/zh-TW/build-with-claude/prompt-engineering/prompting-claude-fable-5-1#consider-all-effort-levels)

**[Claude Fable 5](https://platform.claude.com/docs/zh-TW/models/fable-5/overview) & [Claude Mythos 5](https://platform.claude.com/docs/zh-TW/models/mythos-5/overview)**

在 Claude Fable 5 上，effort 是在智慧、延遲與成本之間取捨的主要控制項。**大多數任務請從預設值 `high` 開始**，對於最講求能力的工作負載使用 `xhigh`，對於例行性工作則降低至 `medium` 或 `low`。Claude Fable 5 上較低的 effort 設定依然表現良好，且通常超越先前模型在 `xhigh` 下的表現。在 `high` 和 `xhigh` 時，請設定較大的 `max_tokens`。這是總輸出（思考加上回應文字）的硬性上限。請參閱[成本控制](https://platform.claude.com/docs/zh-TW/build-with-claude/thinking-steering-and-cost#cost-control)。

如果任務雖已完成但花費的時間超出必要，或者您想要更快速、更具互動性的工作風格，請降低 effort。

See also: [為 Claude Fable 5 撰寫提示](https://platform.claude.com/docs/zh-TW/build-with-claude/prompt-engineering/prompting-claude-fable-5)

**[Claude Opus 5](https://platform.claude.com/docs/zh-TW/models/opus-5/overview)**

Claude Opus 5 支援全部五種 effort 等級。**從預設值 `high` 開始**，並根據您的評估進行調整：對於要求嚴苛的程式設計與代理式工作，提升至 `xhigh`；當任務值得不受限制地消耗 token 時，則提升至 `max`。只要您的評估顯示品質得以維持，就請大方地使用 `low` 和 `medium`，作為控制 token 成本與回應時間的主要手段。如果您沿用了先前模型的 effort 設定，請在評估上重新執行 effort 掃描，而不是直接重複使用。

Effort 控制的是思考量，而非可見的回應長度：在 Claude Opus 5 上，變更 effort 並不能可靠地縮短回應，因此請改為[透過提示控制長度](https://platform.claude.com/docs/zh-TW/build-with-claude/prompt-engineering/prompting-claude-opus-5#response-length-and-verbosity)。

API 預設值為 `high`。若要使用其他等級，請明確設定 `effort`。您傳入的值會覆寫預設值。

在 Claude Opus 5 上，於 `xhigh` 或 `max` effort 時無法停用思考：在這些等級設定 `thinking: {"type": "disabled"}` 的請求會回傳 400 錯誤。請參閱[搭配思考使用 effort](https://platform.claude.com/docs/zh-TW/build-with-claude/effort#effort-with-thinking)。

以 `xhigh` 或 `max` effort 執行 Claude Opus 5 時，請設定較大的 `max_tokens`，讓模型有空間在子代理與工具呼叫之間思考和行動。從 64k tokens 開始再逐步調整，是合理的預設做法。

在[支援的平台](https://platform.claude.com/docs/zh-TW/build-with-claude/effort-per-message#feature-availability)上，Claude Opus 5 也支援透過每則訊息的 `output_config` [在對話中途變更 effort](https://platform.claude.com/docs/zh-TW/build-with-claude/effort-per-message)，這樣可保留提示快取。

See also: [為 Claude Opus 5 撰寫提示](https://platform.claude.com/docs/zh-TW/build-with-claude/prompt-engineering/prompting-claude-opus-5)

**[Claude Opus 4.8](https://platform.claude.com/docs/zh-TW/models/opus-4-8/overview)**

適用於 Claude Opus 4.7 的指引同樣適用於 Claude Opus 4.8。**程式設計與代理式使用情境請從 `xhigh` 開始**，大多數其他對智慧敏感的工作負載使用 `high`，只有在您已測量確認較低等級能在評估中維持品質時，才降低至 `medium` 或 `low`。

API 預設值為 `high`。若要使用其他等級，請明確設定 `effort`。您傳入的值會覆寫預設值。

以 `xhigh` 或 `max` effort 執行 Claude Opus 4.8 時，請設定較大的 `max_tokens`，讓模型有空間在子代理與工具呼叫之間思考和行動。從 64k tokens 開始再逐步調整，是合理的預設做法。

See also: [為 Claude Opus 4.8 撰寫提示](https://platform.claude.com/docs/zh-TW/build-with-claude/prompt-engineering/prompting-claude-opus-4-8)

**[Claude Opus 4.7](https://platform.claude.com/docs/zh-TW/models/opus-4-7/overview)**

**程式設計與代理式使用情境請從 `xhigh` 開始**，大多數對智慧敏感的工作負載則以 `high` 為最低標準。對成本敏感的工作負載可降低至 `medium`，只有在您的評估顯示 `xhigh` 仍有可測量的提升空間時，才提升至 `max`。

API 預設值為 `high`。若要使用 `xhigh`，請明確設定 `effort`。您傳入的值會覆寫預設值。

* **Low effort：** 有效率，但最適合簡短、範圍明確的任務。如果您的任務包含多個部分，請將 `low` 搭配明確的檢查清單使用。
* **Medium effort：** 適用於一般工作流程的設定，能在降低成本的同時獲得良好結果。
* **High effort：** 適用於仍需在智慧與 token 消耗之間取得平衡的進階使用情境。這通常是品質與 token 效率之間的最佳平衡。
* **Xhigh effort：** 程式設計與代理式工作，以及反覆呼叫工具、詳細網頁搜尋和知識庫搜尋等探索性任務的建議起點。預期 token 用量會明顯高於 `high`。
* **Max effort：** 保留給前沿問題使用。在大多數工作負載上，`max` 會大幅增加成本，但品質提升相對有限；在某些結構化輸出或較不依賴智慧的任務上，還可能導致過度思考。

Claude Opus 4.7 也比 Claude Opus 4.6 更嚴格地遵循 effort 等級，特別是在 `low` 和 `medium` 時。在較低的 effort 等級下，模型會將工作範圍限定在所要求的內容，而不會做超出要求的事。如果您觀察到 Claude Opus 4.7 在複雜問題上推理較淺，請提高 effort，而非透過提示來繞過問題。如果您因延遲考量必須維持較低的 effort，請加入針對性的指引，例如「This task involves multistep reasoning. Think carefully before responding.」

以 `xhigh` 或 `max` effort 執行 Claude Opus 4.7 時，請設定較大的 `max_tokens`，讓模型有空間在子代理與工具呼叫之間思考和行動。從 64k tokens 開始再逐步調整，是合理的預設做法。

See also: [提示最佳實踐](https://platform.claude.com/docs/zh-TW/build-with-claude/prompt-engineering/claude-prompting-best-practices)

**[Claude Sonnet 5](https://platform.claude.com/docs/zh-TW/models/sonnet-5/overview)**

Claude Sonnet 5 在 Claude API 和 Claude Code 上預設為 `high` effort。

* **High effort（預設）：** 適用於品質比速度或成本更重要的複雜推理、程式設計和代理式任務。
* **Xhigh effort：** 適用於最困難的程式設計和代理式任務。
* **Medium effort：** 從預設值降級以節省成本。相當於 Claude Sonnet 4.6 在 high effort 下的表現。
* **Low effort：** 適用於大量或對延遲敏感的工作負載。適合優先考量快速回應的聊天和非程式設計使用情境。
* **Max effort：** 適用於需要絕對最高能力且不限制 token 消耗的任務。

See also: [為 Claude Sonnet 5 撰寫提示](https://platform.claude.com/docs/zh-TW/build-with-claude/prompt-engineering/prompting-claude-sonnet-5#calibrating-effort-and-thinking-depth)

**[Claude Sonnet 4.6](https://platform.claude.com/docs/zh-TW/models/sonnet-4-6/overview)**

Claude Sonnet 4.6 預設為 `high` effort。請明確設定 effort，以避免非預期的延遲：

* **Medium effort（建議）：** 對大多數應用程式而言，在速度、成本和效能之間取得最佳平衡。適用於代理式程式設計、大量使用工具的工作流程和程式碼生成。
* **Low effort：** 適用於大量或對延遲敏感的工作負載。適合優先考量快速回應的聊天和非程式設計使用情境。
* **High effort：** 適用於品質比速度或成本更重要的複雜推理和任務。
* **Max effort：** 適用於需要絕對最高能力且不限制 token 消耗的任務。

See also: [提示最佳實踐](https://platform.claude.com/docs/zh-TW/build-with-claude/prompt-engineering/claude-prompting-best-practices)

## effort 與工具使用

使用工具時，effort 參數會同時影響工具呼叫周圍的說明以及工具呼叫本身。較低的 effort 等級傾向於：

* 將多個操作合併為較少的工具呼叫
* 進行較少的工具呼叫
* 直接採取行動，不做開場說明
* 完成後使用簡潔的確認訊息

較高的 effort 等級可能會：

* 進行更多的工具呼叫
* 在採取行動前說明計畫
* 提供詳細的變更摘要
* 包含更全面的程式碼註解

## effort 與思考

`thinking` 參數控制 Claude 是否在回答之前於[思考區塊](https://platform.claude.com/docs/zh-TW/build-with-claude/thinking)中進行思考；`effort` 參數則控制 Claude 在整個回應中投入多少工作量，在自適應模式下，這包括它思考的頻率與深度。請勿將 `adaptive` 作為 `effort` 的值傳入：`adaptive` 是一種思考模式，而非努力程度等級。

在較高的 effort 等級下，Claude 會更積極且更長時間地思考。在工具使用迴圈中，僅處理工具結果的後續請求在任何等級下仍可能略過思考。在較低的等級下，Claude 對於較簡單的問題可能會完全略過思考。如需這兩種控制方式如何協同運作的完整指引，請參閱[思考與 effort](https://platform.claude.com/docs/zh-TW/build-with-claude/thinking#thinking-and-effort)。

在 Claude Opus 4.5（唯一支援 effort 的僅擴展思考模型）上，effort 會與 [`budget_tokens`](https://platform.claude.com/docs/zh-TW/build-with-claude/extended-thinking) 搭配運作：先為您的任務設定 effort 等級，再根據任務所需的推理深度設定思考 token 預算。

如需各模型的思考可用性，請參閱[各模型設定表](https://platform.claude.com/docs/zh-TW/build-with-claude/thinking-troubleshooting#supported-models)。effort 無論是否啟用思考都能運作。請參閱[effort 的運作方式](https://platform.claude.com/docs/zh-TW/build-with-claude/effort#how-effort-works)。

## 在對話中途變更 effort

您可以透過兩種方式，以不同的 effort 等級執行對話的後續回合。逐訊息的 effort 變更會保留提示快取。在下一個請求中設定新的頂層值，則可能使全部或部分提示快取失效。

### 逐訊息 effort

[逐訊息 effort](https://platform.claude.com/docs/zh-TW/build-with-claude/effort-per-message) 會透過 `messages` 中的一則 `system` 訊息設定新等級。

### 在下一個請求中設定頂層 effort

頂層的 `output_config.effort` 適用於整個請求。若要以不同等級執行對話的後續部分，請在下一個請求中設定新值。由於頂層 effort 會影響所渲染的提示，在請求之間變更它可能會使先前回合的快取前綴失效。如果您在長時間的工作階段中依賴[提示快取](https://platform.claude.com/docs/zh-TW/build-with-claude/prompt-caching)，而您的模型不支援逐訊息 effort，請在一開始就選定 effort 等級並保持不變。

## 最佳實踐

1. **明確設定 effort：**&#x41;PI 預設為 `high`（在 Claude Opus 5.5 與 Claude Haiku 5.5 上為 `medium`），但合適的起點取決於您的模型與工作負載。
2. **對速度敏感或簡單的任務使用 low：**&#x7576;延遲很重要或任務很直接時，low effort 可以大幅降低回應時間與成本。
3. **測試您的使用情境：**&#x65;ffort 等級的影響因任務類型而異。部署前請在您的特定使用情境上評估效能。
4. **考慮動態 effort：**&#x6839;據任務複雜度調整 effort。簡單的查詢可能只需要 low effort，而代理式程式設計與複雜推理則能從 high effort 中受益。在同一個對話中變更 effort 之前，請先參閱下一項。
5. **在有快取的對話中保持頂層 effort 不變：**&#x5728;請求之間變更頂層 effort 值可能會使全部或部分[提示快取](https://platform.claude.com/docs/zh-TW/build-with-claude/prompt-caching)失效，因此請在不同工作負載之間變更，而不是在依賴快取命中的對話中變更。在支援的模型上，請改用[逐訊息 effort](https://platform.claude.com/docs/zh-TW/build-with-claude/effort-per-message) 變更，這會保留快取。請參閱[思考與提示快取](https://platform.claude.com/docs/zh-TW/build-with-claude/thinking#thinking-and-prompt-caching)。

## 後續步驟

<CardGroup>
  <Card title="任務預算" icon="gauge" href="https://platform.claude.com/docs/zh-TW/build-with-claude/task-budgets">
    為 Claude 提供涵蓋整個代理迴圈的建議性 token 預算，協助模型在長時間代理任務中自我調節。
  </Card>

  <Card title="引導思考" icon="compass" href="https://platform.claude.com/docs/zh-TW/build-with-claude/thinking-steering-and-cost">
    了解自適應思考（由 Claude 決定何時思考以及思考多少），並透過 effort 與提示來引導它。
  </Card>

  <Card title="思考" icon="brain" href="https://platform.claude.com/docs/zh-TW/build-with-claude/thinking">
    了解思考的運作方式、Claude 預設何時會思考，以及思考如何與 effort 互動。
  </Card>
</CardGroup>

## 可用性

Effort（投入程度）在特定模型上可供使用，且具備零資料保留和HIPAA 就緒資格。

### API 支援

#### [Messages API](https://platform.claude.com/docs/zh-TW/build-with-claude/working-with-messages)

* 可用性：永遠開啟
* 用法：在請求上設定 `output_config.effort`。若未設定值，則套用模型的預設等級。

| 狀態 | 雲端平台 | 模型 |
| ----- | ----- | ----- |
| 可用 | 所有支援的平台 | [Claude Fable 5.2](https://platform.claude.com/docs/zh-TW/models/fable-5-2/overview), [Claude Mythos 5.2](https://platform.claude.com/docs/zh-TW/models/mythos-5-2/overview), [Claude Fable 5.1](https://platform.claude.com/docs/zh-TW/models/fable-5-1/overview), [Claude Mythos 5.1](https://platform.claude.com/docs/zh-TW/models/mythos-5-1/overview), [Claude Fable 5](https://platform.claude.com/docs/zh-TW/models/fable-5/overview), [Claude Mythos 5](https://platform.claude.com/docs/zh-TW/models/mythos-5/overview), Claude Mythos Preview, [Claude Opus 5.5](https://platform.claude.com/docs/zh-TW/models/opus-5-5/overview), [Claude Opus 5](https://platform.claude.com/docs/zh-TW/models/opus-5/overview), [Claude Sonnet 5.5](https://platform.claude.com/docs/zh-TW/models/sonnet-5-5/overview), [Claude Sonnet 5](https://platform.claude.com/docs/zh-TW/models/sonnet-5/overview), [Claude Haiku 5.5](https://platform.claude.com/docs/zh-TW/models/haiku-5-5/overview), [Claude Opus 4.8](https://platform.claude.com/docs/zh-TW/models/opus-4-8/overview), [Claude Opus 4.7](https://platform.claude.com/docs/zh-TW/models/opus-4-7/overview), [Claude Opus 4.6](https://platform.claude.com/docs/zh-TW/models/opus-4-6/overview), [Claude Sonnet 4.6](https://platform.claude.com/docs/zh-TW/models/sonnet-4-6/overview), [Claude Opus 4.5](https://platform.claude.com/docs/zh-TW/models/opus-4-5/overview) |

#### [Managed Agents](https://platform.claude.com/docs/zh-TW/managed-agents/overview)

* 可用性：永遠開啟
* 用法：在代理的模型物件上，或在工作階段的模型覆寫中設定 `effort`。若未設定值，Managed Agents 會填入模型的預設值。

| 狀態 | 雲端平台 | 模型 |
| ----- | ----- | ----- |
| 可用 | Claude API, [Claude Platform on AWS](https://platform.claude.com/docs/zh-TW/build-with-claude/claude-platform-on-aws) | [Claude Fable 5.2](https://platform.claude.com/docs/zh-TW/models/fable-5-2/overview), [Claude Mythos 5.2](https://platform.claude.com/docs/zh-TW/models/mythos-5-2/overview), [Claude Fable 5.1](https://platform.claude.com/docs/zh-TW/models/fable-5-1/overview), [Claude Mythos 5.1](https://platform.claude.com/docs/zh-TW/models/mythos-5-1/overview), [Claude Fable 5](https://platform.claude.com/docs/zh-TW/models/fable-5/overview), [Claude Mythos 5](https://platform.claude.com/docs/zh-TW/models/mythos-5/overview), Claude Mythos Preview, [Claude Opus 5.5](https://platform.claude.com/docs/zh-TW/models/opus-5-5/overview), [Claude Opus 5](https://platform.claude.com/docs/zh-TW/models/opus-5/overview), [Claude Sonnet 5.5](https://platform.claude.com/docs/zh-TW/models/sonnet-5-5/overview), [Claude Sonnet 5](https://platform.claude.com/docs/zh-TW/models/sonnet-5/overview), [Claude Haiku 5.5](https://platform.claude.com/docs/zh-TW/models/haiku-5-5/overview), [Claude Opus 4.8](https://platform.claude.com/docs/zh-TW/models/opus-4-8/overview), [Claude Opus 4.7](https://platform.claude.com/docs/zh-TW/models/opus-4-7/overview), [Claude Opus 4.6](https://platform.claude.com/docs/zh-TW/models/opus-4-6/overview), [Claude Sonnet 4.6](https://platform.claude.com/docs/zh-TW/models/sonnet-4-6/overview), [Claude Opus 4.5](https://platform.claude.com/docs/zh-TW/models/opus-4-5/overview) |
| 可用 | [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/zh-TW/build-with-claude/claude-models-on-google-cloud/anthropic-managed) | [Claude Fable 5.2](https://platform.claude.com/docs/zh-TW/models/fable-5-2/overview), [Claude Mythos 5.2](https://platform.claude.com/docs/zh-TW/models/mythos-5-2/overview), [Claude Fable 5.1](https://platform.claude.com/docs/zh-TW/models/fable-5-1/overview), [Claude Mythos 5.1](https://platform.claude.com/docs/zh-TW/models/mythos-5-1/overview), [Claude Fable 5](https://platform.claude.com/docs/zh-TW/models/fable-5/overview), [Claude Mythos 5](https://platform.claude.com/docs/zh-TW/models/mythos-5/overview), [Claude Opus 5.5](https://platform.claude.com/docs/zh-TW/models/opus-5-5/overview), [Claude Opus 5](https://platform.claude.com/docs/zh-TW/models/opus-5/overview), [Claude Sonnet 5.5](https://platform.claude.com/docs/zh-TW/models/sonnet-5-5/overview), [Claude Sonnet 5](https://platform.claude.com/docs/zh-TW/models/sonnet-5/overview), [Claude Haiku 5.5](https://platform.claude.com/docs/zh-TW/models/haiku-5-5/overview), [Claude Opus 4.8](https://platform.claude.com/docs/zh-TW/models/opus-4-8/overview), [Claude Opus 4.7](https://platform.claude.com/docs/zh-TW/models/opus-4-7/overview), [Claude Opus 4.6](https://platform.claude.com/docs/zh-TW/models/opus-4-6/overview), [Claude Sonnet 4.6](https://platform.claude.com/docs/zh-TW/models/sonnet-4-6/overview), [Claude Opus 4.5](https://platform.claude.com/docs/zh-TW/models/opus-4-5/overview) |

### 資料處理

[資料處理概覽](https://platform.claude.com/docs/zh-TW/manage-claude/api-and-data-retention#feature-eligibility)

| 項目 | 零資料保留 | HIPAA |
| ----- | ----- | ----- |
| 狀態 | 符合資格（不含 [涵蓋的模型](https://platform.claude.com/docs/zh-TW/manage-claude/api-and-data-retention#model-specific-data-retention-requirements)） | 符合資格 |

適用端點：

* `/v1/messages` 搭配 `effort`
