---
title: メッセージごとのeffort
url: https://platform.claude.com/docs/ja/build-with-claude/effort-per-message
description: systemメッセージを使用して会話の途中でeffortレベルを変更し、プロンプトキャッシュを維持します。
featureMetadata:
  status: beta
  betaHeader: mid-conversation-output-config-2026-07-01
  supportedModels:
    - claude-fable-5-2
    - claude-mythos-5-2
    - claude-fable-5-1
    - claude-mythos-5-1
    - claude-opus-5-5
    - claude-opus-5
    - claude-sonnet-5-5
    - claude-haiku-5-5
  supportedPlatforms:
    Claude API: beta
    Amazon Bedrock: beta
    Amazon Bedrock (bedrock-runtime):
      availability: beta
      note: ベータ値はリクエストボディの`anthropic_beta`配列で送信します。
    Claude Platform on AWS: beta
    Claude Models on Google Cloud (Anthropic managed): beta
    Claude Models on Google Cloud (Google managed): beta
    Microsoft Foundry: beta
---

メッセージごとのeffort変更では、リクエストのトップレベルの値を変更せずに、会話の後続のターンに対して新しいeffortレベルを設定するため、キャッシュされたプレフィックスは引き続き一致します。

## effortレベルを変更する

会話の途中でレベルを変更するには、次の手順を実行します。

1. `messages`に`role: "system"`メッセージを追加し、`content`を空にして、新しい[effort](https://platform.claude.com/docs/ja/build-with-claude/effort)レベルを`output_config.effort`に指定します。
2. `mid-conversation-output-config-2026-07-01`[ベータヘッダー](https://platform.claude.com/docs/ja/api/beta-headers)を送信します。
3. トップレベルの値は変更しないでください。

次の例では、トップレベルの値を`high`のままにし、定型的なフォローアップでは`low`に下げています。

<CodeGroup>
  ```bash cURL
  # Effortのみのシステムメッセージ: 新しいレベルは次のユーザーターンから有効になります。
  curl https://api.anthropic.com/v1/messages \
    -H "x-api-key: $ANTHROPIC_API_KEY" \
    -H "anthropic-version: 2026-10-21" \
    -H "anthropic-beta: mid-conversation-output-config-2026-07-01" \
    -H "content-type: application/json" \
    -d '{
      "model": "claude-fable-5-1",
      "max_tokens": 4096,
      "output_config": {"effort": "high"},
      "messages": [
        {"role": "user", "content": "Plan a migration from SQLite to PostgreSQL in three short steps."},
        {"role": "assistant", "content": "1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts."},
        {"role": "system", "content": [], "output_config": {"effort": "low"}},
        {"role": "user", "content": "Summarize the plan in one sentence."}
      ]
    }'
  ```

  ```bash CLI
  ant beta:messages create \
    --beta mid-conversation-output-config-2026-07-01 <<'YAML'
  model: claude-fable-5-1
  max_tokens: 4096
  output_config:
    effort: high
  messages:
    - role: user
      content: Plan a migration from SQLite to PostgreSQL in three short steps.
    - role: assistant
      content: "1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts."
    # effort のみのシステムメッセージ: 新しいレベルは次のユーザーターンから有効になります。
    - role: system
      content: []
      output_config:
        effort: low
    - role: user
      content: Summarize the plan in one sentence.
  YAML
  ```

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

  response = client.beta.messages.create(
      model="claude-fable-5-1",
      max_tokens=4096,
      output_config={"effort": "high"},
      messages=[
          {
              "role": "user",
              "content": "Plan a migration from SQLite to PostgreSQL in three short steps.",
          },
          {
              "role": "assistant",
              "content": "1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts.",
          },
          # effort のみのシステムメッセージ: 新しいレベルは次のユーザーターンから有効になります。
          {"role": "system", "content": [], "output_config": {"effort": "low"}},
          {"role": "user", "content": "Summarize the plan in one sentence."},
      ],
      betas=["mid-conversation-output-config-2026-07-01"],
  )

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

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

  const response = await client.beta.messages.create({
    model: "claude-fable-5-1",
    max_tokens: 4096,
    output_config: { effort: "high" },
    messages: [
      {
        role: "user",
        content: "Plan a migration from SQLite to PostgreSQL in three short steps."
      },
      {
        role: "assistant",
        content:
          "1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts."
      },
      // effort のみのシステムメッセージ: 新しいレベルは次のユーザーターンから有効になります。
      { role: "system", content: [], output_config: { effort: "low" } },
      { role: "user", content: "Summarize the plan in one sentence." }
    ],
    betas: ["mid-conversation-output-config-2026-07-01"]
  });

  for (const block of response.content) {
    if (block.type === "text") {
      console.log(block.text);
    }
  }
  ```

  ```csharp C#
  using Anthropic.Models.Beta;
  using Anthropic.Models.Beta.Messages;
  using Model = Anthropic.Models.Messages.Model;

  AnthropicClient client = new();

  var response = await client.Beta.Messages.Create(new MessageCreateParams
  {
      Model = Model.ClaudeFable5_1,
      MaxTokens = 4096,
      OutputConfig = new() { Effort = Effort.High },
      Messages =
      [
          new BetaUserMessageParam { Content = "Plan a migration from SQLite to PostgreSQL in three short steps." },
          new BetaAssistantMessageParam { Content = "1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts." },
          // effort のみのシステムメッセージです。新しいレベルは次のユーザーターンから有効になります。
          new BetaSystemMessageParam
          {
              Content = new([]),
              OutputConfig = new() { Effort = BetaSystemMessageOutputConfigEffort.Low },
          },
          new BetaUserMessageParam { Content = "Summarize the plan in one sentence." },
      ],
      Betas = [AnthropicBeta.MidConversationOutputConfig2026_07_01],
  });

  foreach (var block in response.Content)
  {
      if (block.TryPickText(out var textBlock))
      {
          Console.WriteLine(textBlock.Text);
      }
  }
  ```

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

  response, err := client.Beta.Messages.New(context.Background(), anthropic.BetaMessageNewParams{
  	Model:     anthropic.ModelClaudeFable5_1,
  	MaxTokens: 4096,
  	OutputConfig: anthropic.BetaOutputConfigParam{
  		Effort: anthropic.BetaOutputConfigEffortHigh,
  	},
  	Messages: []anthropic.BetaMessageParam{
  		anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Plan a migration from SQLite to PostgreSQL in three short steps.")),
  		{OfAssistant: &anthropic.BetaAssistantMessageParam{
  			Content: []anthropic.BetaContentBlockParamUnion{anthropic.NewBetaTextBlock("1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts.")},
  		}},
  		// effort のみのシステムメッセージです。新しいレベルは次のユーザーターンから適用されます。
  		anthropic.NewBetaSystemMessage(anthropic.BetaSystemMessageOutputConfigParam{
  			Effort: anthropic.BetaSystemMessageOutputConfigEffortLow,
  		}),
  		anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Summarize the plan in one sentence.")),
  	},
  	Betas: []anthropic.AnthropicBeta{anthropic.AnthropicBetaMidConversationOutputConfig2026_07_01},
  })
  if err != nil {
  	log.Fatal(err)
  }

  for _, block := range response.Content {
  	if textBlock, ok := block.AsAny().(anthropic.BetaTextBlock); ok {
  		fmt.Println(textBlock.Text)
  	}
  }
  ```

  ```java Java
  import com.anthropic.models.beta.AnthropicBeta;
  import com.anthropic.models.beta.messages.BetaMessage;
  import com.anthropic.models.beta.messages.BetaOutputConfig;
  import com.anthropic.models.beta.messages.BetaSystemMessageOutputConfig;
  import com.anthropic.models.beta.messages.BetaSystemMessageParam;
  import com.anthropic.models.beta.messages.MessageCreateParams;
  import com.anthropic.models.messages.Model;

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

      MessageCreateParams params = MessageCreateParams.builder()
          .model(Model.CLAUDE_FABLE_5_1)
          .maxTokens(4096L)
          .addBeta(AnthropicBeta.MID_CONVERSATION_OUTPUT_CONFIG_2026_07_01)
          .outputConfig(BetaOutputConfig.builder()
              .effort(BetaOutputConfig.Effort.HIGH)
              .build())
          .addUserMessage("Plan a migration from SQLite to PostgreSQL in three short steps.")
          .addAssistantMessage("1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts.")
          // Effort のみのシステムメッセージ: 新しいレベルは次のユーザーターンから有効になります。
          .addMessage(BetaSystemMessageParam.builder()
              .contentOfBlocks(List.of())
              .outputConfig(BetaSystemMessageOutputConfig.builder()
                  .effort(BetaSystemMessageOutputConfig.Effort.LOW)
                  .build())
              .build())
          .addUserMessage("Summarize the plan in one sentence.")
          .build();

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

  ```php PHP
  use Anthropic\Beta\AnthropicBeta;
  use Anthropic\Beta\Messages\BetaMessageParam;
  use Anthropic\Beta\Messages\BetaOutputConfig;
  use Anthropic\Beta\Messages\BetaSystemMessageOutputConfig;
  use Anthropic\Beta\Messages\BetaTextBlock;
  use Anthropic\Client;
  use Anthropic\Messages\Model;

  $client = new Client();

  $response = $client->beta->messages->create(
      model: Model::CLAUDE_FABLE_5_1,
      maxTokens: 4096,
      outputConfig: BetaOutputConfig::with(effort: 'high'),
      messages: [
          BetaMessageParam::with(role: 'user', content: 'Plan a migration from SQLite to PostgreSQL in three short steps.'),
          BetaMessageParam::with(role: 'assistant', content: '1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts.'),
          // Effort のみのシステムメッセージ：新しいレベルは次のユーザーターンから有効になります。
          BetaMessageParam::with(
              role: 'system',
              content: [],
              outputConfig: BetaSystemMessageOutputConfig::with(effort: 'low'),
          ),
          BetaMessageParam::with(role: 'user', content: 'Summarize the plan in one sentence.'),
      ],
      betas: [AnthropicBeta::MID_CONVERSATION_OUTPUT_CONFIG_2026_07_01],
  );

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

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

  response = client.beta.messages.create(
    model: Anthropic::Model::CLAUDE_FABLE_5_1,
    max_tokens: 4096,
    output_config: {effort: :high},
    messages: [
      {role: "user", content: "Plan a migration from SQLite to PostgreSQL in three short steps."},
      {role: "assistant", content: "1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts."},
      # effortのみのシステムメッセージ: 新しいレベルは次のユーザーターンから有効になります。
      {role: "system", content: [], output_config: {effort: :low}},
      {role: "user", content: "Summarize the plan in one sentence."}
    ],
    betas: [Anthropic::AnthropicBeta::MID_CONVERSATION_OUTPUT_CONFIG_2026_07_01]
  )

  response.content.each do |block|
    case block
    when Anthropic::Beta::BetaTextBlock
      puts block.text
    end
  end
  ```
</CodeGroup>

メッセージの位置によって、新しいレベルがいつ開始されるかが決まります。

* 新しい入力を含む`user`ターンの直後の場合：そのターンに対するClaudeの応答で新しいレベルが使用されます。
* それ以外の位置の場合（前の例のように`assistant`ターンと次の`user`ターンの間など）：新しいレベルは、新しい入力を含む次の`user`ターンから開始されます。

`tool_result`ブロックのみを含む`user`ターンは新しい入力として扱われません。

新しいレベルは、後続のメッセージで変更されるまで有効なままです。

このメッセージは、すでに送信したすべての内容の後に配置し、以降のリクエストでもその位置に残しておいてください。すでに送信したターンより前に挿入したり、後から移動または削除したりしないでください。「[preserved thinking](https://platform.claude.com/docs/ja/build-with-claude/preserved-thinking)」（保持された思考）を備えたモデルでは、これらのいずれかの変更を行うと、このメッセージより後の`assistant`ターンにある思考ブロックが無効になります。その後に何が起こるかについては、[無効なブロックに対するAPIの処理](https://platform.claude.com/docs/ja/build-with-claude/preserved-thinking#mismatch-behavior)を参照してください。

内容を持つ`system`メッセージの隣に配置した場合、両方のメッセージが[会話途中のシステムメッセージの配置ルール](https://platform.claude.com/docs/ja/build-with-claude/mid-conversation-system-messages#limitations)に従う必要があります。

Amazon BedrockのInvokeModel APIでは、ヘッダーの代わりに、リクエストボディの`anthropic_beta`配列でベータ値を送信してください。InvokeModel APIでメッセージごとのeffortをサポートしているモデルについては、[Bedrockでの会話途中のシステムメッセージ](https://platform.claude.com/docs/ja/build-with-claude/claude-on-amazon-bedrock-legacy#mid-conversation-system-messages-on-bedrock)を参照してください。

## エラー

* ベータヘッダーがない場合、メッセージごとの`output_config`は400エラー`messages.N.output_config: Extra inputs are not permitted`を返します。ここで`N`は`messages`内の`system`メッセージのインデックスです。
* ベータヘッダーがある場合でも、Claude Fable 5などのメッセージごとのeffortをサポートしていないモデルは、400エラー`output_config.effort requires a model that supports per-turn effort; this model does not`を返します。Amazon Bedrockでは、それらのモデルとClaude Opus 5は代わりに`Extra inputs are not permitted`を返します。
* `thinking: {"type": "between_tools"}`を指定したClaude Sonnet 5.5、および`thinking: {"type": "disabled"}`を指定したClaude Haiku 5.5では、会話の途中でeffortレベルを変更できません。これらの場合、新しいレベルを指定したメッセージごとの`output_config.effort`は400エラーを返します。ターンごとにeffortを変えるには、adaptive thinkingを使用してください。

## メッセージごとのeffortかトップレベルのeffortか

リクエスト間で[トップレベルの値を変更する](https://platform.claude.com/docs/ja/build-with-claude/effort#top-level-effort-on-the-next-request)よりも、メッセージごとのeffortを優先してください。メッセージごとの変更では、それより前のすべてが変更されないため、キャッシュされたプレフィックスは引き続き一致します。トップレベルの変更はキャッシュを最初からやり直すことになります。Claude Fable 5.1では、トップレベルの変更によるモデルの誘導の信頼性も低くなります。モデルの以前の応答は前のレベルで書かれており、モデルはそれらとの一貫性を保とうとする傾向があるためです。

## 利用可能状況

メッセージごとのeffortは一部のモデルでベータ版です。

### APIサポート

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

* 利用可能状況：利用可能

| ステータス           | クラウドプラットフォーム                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | モデル                                                                                                                                                                                                                                                                                                                                        |
| --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| ベータ             | Claude API, [Amazon Bedrock](https://platform.claude.com/docs/ja/build-with-claude/claude-in-amazon-bedrock), [Claude Platform on AWS](https://platform.claude.com/docs/ja/build-with-claude/claude-platform-on-aws), [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/ja/build-with-claude/claude-models-on-google-cloud/anthropic-managed), [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/ja/build-with-claude/claude-models-on-google-cloud/google-managed), [Microsoft Foundry](https://platform.claude.com/docs/ja/build-with-claude/claude-in-microsoft-foundry) | [Claude Fable 5.1](https://platform.claude.com/docs/ja/models/fable-5-1/overview), [Claude Opus 5.5](https://platform.claude.com/docs/ja/models/opus-5-5/overview)                                                                                                                                                                         |
| ベータ<sup>1</sup> | [Amazon Bedrock (bedrock-runtime)](https://platform.claude.com/docs/ja/build-with-claude/claude-on-amazon-bedrock-legacy)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | [Claude Fable 5.2](https://platform.claude.com/docs/ja/models/fable-5-2/overview), [Claude Mythos 5.2](https://platform.claude.com/docs/ja/models/mythos-5-2/overview), [Claude Fable 5.1](https://platform.claude.com/docs/ja/models/fable-5-1/overview), [Claude Opus 5.5](https://platform.claude.com/docs/ja/models/opus-5-5/overview) |
| ベータ             | Claude API, [Claude Platform on AWS](https://platform.claude.com/docs/ja/build-with-claude/claude-platform-on-aws), [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/ja/build-with-claude/claude-models-on-google-cloud/anthropic-managed), [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/ja/build-with-claude/claude-models-on-google-cloud/google-managed), [Microsoft Foundry](https://platform.claude.com/docs/ja/build-with-claude/claude-in-microsoft-foundry)                                                                                                   | [Claude Fable 5.2](https://platform.claude.com/docs/ja/models/fable-5-2/overview), [Claude Opus 5](https://platform.claude.com/docs/ja/models/opus-5/overview), [Claude Sonnet 5.5](https://platform.claude.com/docs/ja/models/sonnet-5-5/overview), [Claude Haiku 5.5](https://platform.claude.com/docs/ja/models/haiku-5-5/overview)     |
| ベータ             | Claude API, [Amazon Bedrock](https://platform.claude.com/docs/ja/build-with-claude/claude-in-amazon-bedrock), [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/ja/build-with-claude/claude-models-on-google-cloud/google-managed), [Microsoft Foundry (hosted on Anthropic)](https://platform.claude.com/docs/ja/build-with-claude/claude-in-microsoft-foundry)                                                                                                                                                                                                                                               | [Claude Mythos 5.1](https://platform.claude.com/docs/ja/models/mythos-5-1/overview)                                                                                                                                                                                                                                                        |
| ベータ             | Claude API, [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/ja/build-with-claude/claude-models-on-google-cloud/anthropic-managed), [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/ja/build-with-claude/claude-models-on-google-cloud/google-managed), [Microsoft Foundry (hosted on Anthropic)](https://platform.claude.com/docs/ja/build-with-claude/claude-in-microsoft-foundry)                                                                                                                                                                                     | [Claude Mythos 5.2](https://platform.claude.com/docs/ja/models/mythos-5-2/overview)                                                                                                                                                                                                                                                        |

1. ベータ値はリクエストボディの`anthropic_beta`配列で送信します。

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

* 利用可能状況：利用不可
* 使用方法：代わりに、エージェントのモデル設定をオーバーライドして、セッションのエフォートを設定します。

### 必須のベータヘッダー

[ベータヘッダーの概要](https://platform.claude.com/docs/ja/api/beta-headers)

ベータヘッダーを使用すると、実験的な機能や新しいモデル機能が標準APIに組み込まれる前にアクセスできます。

* `mid-conversation-output-config-2026-07-01`
